Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
45d50c43
Commit
45d50c43
authored
Feb 06, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Taglib: use an extradata to store MB releases
parent
ccca9bec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletion
+39
-1
include/vlc_meta.h
include/vlc_meta.h
+1
-0
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+38
-1
No files found.
include/vlc_meta.h
View file @
45d50c43
...
...
@@ -160,5 +160,6 @@ VLC_API int input_item_WriteMeta(vlc_object_t *, input_item_t *);
#define VLC_META_SHOW_NAME vlc_meta_TypeToLocalizedString( vlc_meta_ShowName )
#define VLC_META_ACTORS vlc_meta_TypeToLocalizedString( vlc_meta_Actors )
#define VLC_META_EXTRA_MB_ALBUMID "MB_ALBUMID"
#endif
modules/meta_engine/taglib.cpp
View file @
45d50c43
...
...
@@ -167,7 +167,11 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
#define SET( keyName, metaName ) \
item = tag->itemListMap()[keyName]; \
if( !item.isEmpty() ) vlc_meta_Set##metaName( p_meta, item.toString().toCString( true ) ); \
if( !item.isEmpty() ) vlc_meta_Set##metaName( p_meta, item.toString().toCString( true ) );
#define SET_EXTRA( keyName, metaName ) \
item = tag->itemListMap()[keyName]; \
if( !item.isEmpty() ) vlc_meta_AddExtra( p_meta, metaName, item.toString().toCString( true ) );
SET
(
"ALBUM"
,
Album
);
SET
(
"ARTIST"
,
Artist
);
...
...
@@ -179,7 +183,10 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
SET
(
"PUBLISHER"
,
Publisher
);
SET
(
"MUSICBRAINZ_TRACKID"
,
TrackID
);
SET_EXTRA
(
"MUSICBRAINZ_ALBUMID"
,
VLC_META_EXTRA_MB_ALBUMID
);
#undef SET
#undef SET_EXTRA
/* */
item
=
tag
->
itemListMap
()[
"TRACK"
];
...
...
@@ -207,9 +214,18 @@ static void ReadMetaFromASF( ASF::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
vlc_meta_Set##metaName( p_meta, list.front().toString().toCString( true ) ); \
}
#define SET_EXTRA( keyName, metaName ) \
if( tag->attributeListMap().contains(keyName) ) \
{ \
list = tag->attributeListMap()[keyName]; \
vlc_meta_AddExtra( p_meta, metaName, list.front().toString().toCString( true ) ); \
}
SET
(
"MusicBrainz/Track Id"
,
TrackID
);
SET_EXTRA
(
"MusicBrainz/Album Id"
,
VLC_META_EXTRA_MB_ALBUMID
);
#undef SET
#undef SET_EXTRA
#ifdef TAGLIB_HAVE_ASFPICTURE_H
// List the pictures
...
...
@@ -299,6 +315,11 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_meta_t* p_demux_meta, vlc_
vlc_meta_Set
(
p_meta
,
vlc_meta_TrackTotal
,
p_txxx
->
fieldList
().
back
().
toCString
(
true
)
);
continue
;
}
if
(
!
strcmp
(
p_txxx
->
description
().
toCString
(
true
),
"MusicBrainz Album Id"
)
)
{
vlc_meta_AddExtra
(
p_meta
,
VLC_META_EXTRA_MB_ALBUMID
,
p_txxx
->
fieldList
().
back
().
toCString
(
true
)
);
continue
;
}
vlc_meta_AddExtra
(
p_meta
,
p_txxx
->
description
().
toCString
(
true
),
p_txxx
->
fieldList
().
back
().
toCString
(
true
)
);
}
...
...
@@ -449,6 +470,11 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_meta_t* p_demux_meta,
if( !list.isEmpty() ) \
vlc_meta_Set##metaName( p_meta, (*list.begin()).toCString( true ) );
#define SET_EXTRA( keyName, metaName ) \
list = tag->fieldListMap()[keyName]; \
if( !list.isEmpty() ) \
vlc_meta_AddExtra( p_meta, keyName, (*list.begin()).toCString( true ) );
SET
(
"COPYRIGHT"
,
Copyright
);
SET
(
"ORGANIZATION"
,
Publisher
);
SET
(
"DATE"
,
Date
);
...
...
@@ -456,7 +482,10 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_meta_t* p_demux_meta,
SET
(
"RATING"
,
Rating
);
SET
(
"LANGUAGE"
,
Language
);
SET
(
"MUSICBRAINZ_TRACKID"
,
TrackID
);
SET_EXTRA
(
"MUSICBRAINZ_ALBUMID"
,
VLC_META_EXTRA_MB_ALBUMID
);
#undef SET
#undef SET_EXTRA
list
=
tag
->
fieldListMap
()[
"TRACKNUMBER"
];
if
(
!
list
.
isEmpty
()
)
...
...
@@ -560,10 +589,18 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta_t *p_demux_meta, vlc_meta
list = tag->itemListMap()[keyName]; \
vlc_meta_Set##metaName( p_meta, list.toStringList().front().toCString( true ) ); \
}
#define SET_EXTRA( keyName, metaName ) \
if( tag->itemListMap().contains(keyName) ) \
{ \
list = tag->itemListMap()[keyName]; \
vlc_meta_AddExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \
}
SET
(
"----:com.apple.iTunes:MusicBrainz Track Id"
,
TrackID
);
SET_EXTRA
(
"----:com.apple.iTunes:MusicBrainz Album Id"
,
VLC_META_EXTRA_MB_ALBUMID
);
#undef SET
#undef SET_EXTRA
if
(
tag
->
itemListMap
().
contains
(
"covr"
)
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment