mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 09:43:45 -04:00
Split out VORBIS field names into a dedicated extra md_map
This commit is contained in:
parent
f36261be65
commit
b219b912f2
@ -62,7 +62,6 @@ static const struct metadata_map md_map_generic[] =
|
|||||||
{ "artist", 0, mfi_offsetof(artist) },
|
{ "artist", 0, mfi_offsetof(artist) },
|
||||||
{ "author", 0, mfi_offsetof(artist) },
|
{ "author", 0, mfi_offsetof(artist) },
|
||||||
{ "album_artist", 0, mfi_offsetof(album_artist) },
|
{ "album_artist", 0, mfi_offsetof(album_artist) },
|
||||||
{ "albumartist", 0, mfi_offsetof(album_artist) },
|
|
||||||
{ "album", 0, mfi_offsetof(album) },
|
{ "album", 0, mfi_offsetof(album) },
|
||||||
{ "genre", 0, mfi_offsetof(genre) },
|
{ "genre", 0, mfi_offsetof(genre) },
|
||||||
{ "composer", 0, mfi_offsetof(composer) },
|
{ "composer", 0, mfi_offsetof(composer) },
|
||||||
@ -71,14 +70,8 @@ static const struct metadata_map md_map_generic[] =
|
|||||||
{ "conductor", 0, mfi_offsetof(conductor) },
|
{ "conductor", 0, mfi_offsetof(conductor) },
|
||||||
{ "comment", 0, mfi_offsetof(comment) },
|
{ "comment", 0, mfi_offsetof(comment) },
|
||||||
{ "description", 0, mfi_offsetof(comment) },
|
{ "description", 0, mfi_offsetof(comment) },
|
||||||
{ "tracktotal", 1, mfi_offsetof(total_tracks) },
|
|
||||||
{ "totaltracks", 1, mfi_offsetof(total_tracks) },
|
|
||||||
{ "track", 1, mfi_offsetof(track) },
|
{ "track", 1, mfi_offsetof(track) },
|
||||||
{ "tracknumber", 1, mfi_offsetof(track) },
|
|
||||||
{ "disctotal", 1, mfi_offsetof(total_discs) },
|
|
||||||
{ "totaldiscs", 1, mfi_offsetof(total_discs) },
|
|
||||||
{ "disc", 1, mfi_offsetof(disc) },
|
{ "disc", 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) },
|
||||||
|
|
||||||
@ -97,6 +90,29 @@ static const struct metadata_map md_map_tv[] =
|
|||||||
{ NULL, 0, 0 }
|
{ NULL, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* NOTE about VORBIS comments:
|
||||||
|
* Only a small set of VORBIS comment fields are officially designated. Most
|
||||||
|
* common tags are at best de facto standards. Currently, metadata conversion
|
||||||
|
* functionality in ffmpeg only adds support for a couple of tags. Specifically,
|
||||||
|
* ALBUMARTIST and TRACKNUMBER are handled as of Feb 1, 2010 (rev 21587). Tags
|
||||||
|
* with names that already match the generic ffmpeg scheme--TITLE and ARTIST,
|
||||||
|
* for example--are of course handled. The rest of these tags are reported to
|
||||||
|
* have been used by various programs in the wild.
|
||||||
|
*/
|
||||||
|
static const struct metadata_map md_map_vorbis[] =
|
||||||
|
{
|
||||||
|
{ "albumartist", 0, mfi_offsetof(album_artist) },
|
||||||
|
{ "album artist", 0, mfi_offsetof(album_artist) },
|
||||||
|
{ "tracknumber", 1, mfi_offsetof(track) },
|
||||||
|
{ "tracktotal", 1, mfi_offsetof(total_tracks) },
|
||||||
|
{ "totaltracks", 1, mfi_offsetof(total_tracks) },
|
||||||
|
{ "discnumber", 1, mfi_offsetof(disc) },
|
||||||
|
{ "disctotal", 1, mfi_offsetof(total_discs) },
|
||||||
|
{ "totaldiscs", 1, mfi_offsetof(total_discs) },
|
||||||
|
|
||||||
|
{ NULL, 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
/* NOTE about ID3 tag names:
|
/* NOTE about ID3 tag names:
|
||||||
* metadata conversion for ID3v2 tags was added in ffmpeg in september 2009
|
* metadata conversion for ID3v2 tags was added in ffmpeg in september 2009
|
||||||
* (rev 20073) for ID3v2.3; support for ID3v2.2 tag names was added in december
|
* (rev 20073) for ID3v2.3; support for ID3v2.2 tag names was added in december
|
||||||
@ -353,6 +369,8 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
|
|||||||
mfi->type = strdup("flac");
|
mfi->type = strdup("flac");
|
||||||
mfi->codectype = strdup("flac");
|
mfi->codectype = strdup("flac");
|
||||||
mfi->description = strdup("FLAC audio file");
|
mfi->description = strdup("FLAC audio file");
|
||||||
|
|
||||||
|
extra_md_map = md_map_vorbis;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CODEC_ID_MUSEPACK7:
|
case CODEC_ID_MUSEPACK7:
|
||||||
@ -387,6 +405,8 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
|
|||||||
mfi->type = strdup("ogg");
|
mfi->type = strdup("ogg");
|
||||||
mfi->codectype = strdup("ogg");
|
mfi->codectype = strdup("ogg");
|
||||||
mfi->description = strdup("Ogg Vorbis audio file");
|
mfi->description = strdup("Ogg Vorbis audio file");
|
||||||
|
|
||||||
|
extra_md_map = md_map_vorbis;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CODEC_ID_WMAVOICE:
|
case CODEC_ID_WMAVOICE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user