aboutsummaryrefslogtreecommitdiff
path: root/src/episode.h
blob: 66c4e8ab0bcbe89fc32cb120bd92543614c8b2c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef EPISODE_H
#define EPISODE_H

typedef struct {
    char episode_name[512];

    /* These are pointers inside @episode_name */
    char *group_name;
    char *anime_name;
    char *episode;
    char *resolution;
    char *extension;
} EpisodeInfo;

/* Fails if @episode_name is more than 500 characters long or if group or anime name is missing/cant be parsed */
int episode_info_create_from_episode_name(EpisodeInfo *self, const char *episode_name);
int episode_info_get_generic_name(EpisodeInfo *self, char *output_buffer, int output_buffer_size);

#endif