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
1269fd82
Commit
1269fd82
authored
Jan 05, 2016
by
Hugo Beauzée-Luyssen
Browse files
VLCMetadataService: Don't fetch a track artist if it's the same as the album artist
parent
0d4e4bad
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/metadata_services/vlc/VLCMetadataService.cpp
View file @
1269fd82
...
...
@@ -336,8 +336,14 @@ std::shared_ptr<Album> VLCMetadataService::handleAlbum( std::shared_ptr<Media> m
return
album
;
}
/* Artists handling */
///
/// \brief VLCMetadataService::handleArtists Returns Artist's involved on a track
/// \param media The track to analyze
/// \param vlcMedia VLC's media
/// \return A pair containing:
/// The album artist as a first element
/// The track artist as a second element, if it differs from the album artist.
///
std
::
pair
<
std
::
shared_ptr
<
Artist
>
,
std
::
shared_ptr
<
Artist
>>
VLCMetadataService
::
handleArtists
(
std
::
shared_ptr
<
Media
>
media
,
VLC
::
Media
&
vlcMedia
)
const
{
std
::
shared_ptr
<
Artist
>
albumArtist
;
...
...
@@ -363,7 +369,7 @@ std::pair<std::shared_ptr<Artist>, std::shared_ptr<Artist>> VLCMetadataService::
}
}
}
if
(
artistName
.
empty
()
==
false
)
if
(
artistName
.
empty
()
==
false
&&
artistName
!=
albumArtistName
)
{
artist
=
std
::
static_pointer_cast
<
Artist
>
(
m_ml
->
artist
(
artistName
)
);
if
(
artist
==
nullptr
)
...
...
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