Accomodate TV meta-data in internal structures

Add new fields for TV-related metadata to struct media_file_info and
struct db_media_file_info.
This commit is contained in:
Ace Jones 2009-12-26 08:28:28 +01:00 committed by Julien BLACHE
parent 30e07abae3
commit a0b015f1e4
2 changed files with 22 additions and 0 deletions

View File

@ -276,6 +276,15 @@ free_mfi(struct media_file_info *mfi, int content_only)
if (mfi->album_artist)
free(mfi->album_artist);
if (mfi->tv_series_name)
free(mfi->tv_series_name);
if (mfi->tv_episode_num_str)
free(mfi->tv_episode_num_str);
if (mfi->tv_network_name)
free(mfi->tv_network_name);
if (!content_only)
free(mfi);
}

View File

@ -102,6 +102,13 @@ struct media_file_info {
uint32_t has_video;
uint32_t bits_per_sample;
uint32_t media_kind;
uint32_t tv_episode_sort;
uint32_t tv_season_num;
char *tv_series_name;
char *tv_episode_num_str; /* com.apple.itunes.episode-num-str, used as a unique episode identifier */
char *tv_network_name;
char *album_artist;
};
@ -178,6 +185,12 @@ struct db_media_file_info {
char *contentrating;
char *bits_per_sample;
char *album_artist;
char *media_kind;
char *tv_episode_sort;
char *tv_season_num;
char *tv_series_name;
char *tv_episode_num_str;
char *tv_network_name;
};
#define dbmfi_offsetof(field) offsetof(struct db_media_file_info, field)