Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
eaa92d61
Commit
eaa92d61
authored
Oct 21, 2015
by
Hugo Beauzée-Luyssen
Browse files
VLCMetadataService: Fallback to Artist if AlbumArtist is empty
parent
8c36ec59
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/metadata_services/vlc/VLCMetadataService.cpp
View file @
eaa92d61
...
...
@@ -201,6 +201,10 @@ bool VLCMetadataService::handleArtist( std::shared_ptr<Album> album, std::shared
auto
newArtist
=
false
;
auto
albumArtistName
=
vlcMedia
.
meta
(
libvlc_meta_AlbumArtist
);
auto
artistName
=
vlcMedia
.
meta
(
libvlc_meta_Artist
);
if
(
albumArtistName
.
empty
()
==
true
)
albumArtistName
=
artistName
;
if
(
albumArtistName
.
length
()
>
0
)
{
auto
artist
=
std
::
static_pointer_cast
<
Artist
>
(
m_ml
->
artist
(
albumArtistName
)
);
...
...
@@ -224,9 +228,12 @@ bool VLCMetadataService::handleArtist( std::shared_ptr<Album> album, std::shared
}
}
else
{
std
::
static_pointer_cast
<
Artist
>
(
m_ml
->
unknownArtist
()
)
->
addMedia
(
media
.
get
()
);
// If we get here, it means we have neither artist nor albumartist tags. We can't do much more.
return
true
;
}
auto
artistName
=
vlcMedia
.
meta
(
libvlc_meta_Artist
);
if
(
artistName
.
length
()
>
0
)
media
->
setArtist
(
artistName
);
else
if
(
albumArtistName
.
length
()
>
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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