Pick up TV-related metadata in MP4 video files

TV-related metadata as found in TV shows bought on the iTunes store, for
instance.

At the time of writing, ffmpeg doesn't support this yet. Until it does,
contact Ace Jones <ace.jones1@yahoo.com> for patches and instructions.
This commit is contained in:
Ace Jones 2009-12-26 08:31:12 +01:00 committed by Julien BLACHE
parent a0b015f1e4
commit 2ae6fcd864

View File

@ -78,6 +78,14 @@ static struct metadata_map md_map[] =
{ "discnumber", 1, mfi_offsetof(disc) }, { "discnumber", 1, mfi_offsetof(disc) },
{ "year", 1, mfi_offsetof(year) }, { "year", 1, mfi_offsetof(year) },
{ "date", 1, mfi_offsetof(year) }, { "date", 1, mfi_offsetof(year) },
{ "stik", 1, mfi_offsetof(media_kind) },
{ "show", 0, mfi_offsetof(tv_series_name) },
{ "episode_id", 0, mfi_offsetof(tv_episode_num_str) },
{ "network", 0, mfi_offsetof(tv_network_name) },
{ "episode_sort", 1, mfi_offsetof(tv_episode_sort) },
{ "season_number",1, mfi_offsetof(tv_season_num) },
{ NULL, 0, 0 } { NULL, 0, 0 }
}; };
@ -362,6 +370,13 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
} }
} }
/* fix up TV metadata */
if (mfi->media_kind == 10)
{
/* I have no idea why this is, but iTunes reports a media kind of 64 for stik==10 (?!) */
mfi->media_kind = 64;
}
skip_extract: skip_extract:
if (mdcount == 0) if (mdcount == 0)
{ {