aboutsummaryrefslogtreecommitdiff
path: root/src/episode.h
blob: 34353919feb85aff6e49a2856931ce80fb50d951 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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;
    int resolution_in_brackets;
} 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