[spotify] Remove options to exclude starred songs from the artist/album

override
This commit is contained in:
chme 2016-03-05 12:55:34 +01:00
parent 7aba0bf332
commit 167d5117be
3 changed files with 2 additions and 19 deletions

View File

@ -198,11 +198,6 @@ spotify {
# album artist for spotify items that are not in the starred playlist. # album artist for spotify items that are not in the starred playlist.
# artist_override = false # artist_override = false
# Like artist_override, the starred_artist_override flag can be set to true,
# in order to use the compilation_artist for items in the spotify starred
# playlist.
# starred_artist_override = false
# Similar to the different artists in spotify playlists, the playlist items # Similar to the different artists in spotify playlists, the playlist items
# belong to different albums, and if you do not want every album to be listed # belong to different albums, and if you do not want every album to be listed
# when browsing in Remote, you can set the album_override flag to true. This # when browsing in Remote, you can set the album_override flag to true. This
@ -210,10 +205,6 @@ spotify {
# the starred playlist. Notice that if an item is in more than one playlist, # the starred playlist. Notice that if an item is in more than one playlist,
# it will only appear in one album when browsing (in which album is random). # it will only appear in one album when browsing (in which album is random).
# album_override = false # album_override = false
# Like album_override, the starred_album_override flag can be set to true,
# in order to use the playlist name as album name.
# starred_album_override = false
} }
# MPD configuration (only have effect if MPD enabled - see README/INSTALL) # MPD configuration (only have effect if MPD enabled - see README/INSTALL)

View File

@ -119,9 +119,7 @@ static cfg_opt_t sec_spotify[] =
CFG_INT("bitrate", 0, CFGF_NONE), CFG_INT("bitrate", 0, CFGF_NONE),
CFG_BOOL("base_playlist_disable", cfg_false, CFGF_NONE), CFG_BOOL("base_playlist_disable", cfg_false, CFGF_NONE),
CFG_BOOL("artist_override", cfg_false, CFGF_NONE), CFG_BOOL("artist_override", cfg_false, CFGF_NONE),
CFG_BOOL("starred_artist_override", cfg_false, CFGF_NONE),
CFG_BOOL("album_override", cfg_false, CFGF_NONE), CFG_BOOL("album_override", cfg_false, CFGF_NONE),
CFG_BOOL("starred_album_override", cfg_false, CFGF_NONE),
CFG_END() CFG_END()
}; };

View File

@ -489,9 +489,7 @@ spotify_metadata_get(sp_track *track, struct media_file_info *mfi, const char *p
{ {
cfg_t *spotify_cfg; cfg_t *spotify_cfg;
bool artist_override; bool artist_override;
bool starred_artist_override;
bool album_override; bool album_override;
bool starred_album_override;
sp_album *album; sp_album *album;
sp_artist *artist; sp_artist *artist;
sp_albumtype albumtype; sp_albumtype albumtype;
@ -501,9 +499,7 @@ spotify_metadata_get(sp_track *track, struct media_file_info *mfi, const char *p
spotify_cfg = cfg_getsec(cfg, "spotify"); spotify_cfg = cfg_getsec(cfg, "spotify");
artist_override = cfg_getbool(spotify_cfg, "artist_override"); artist_override = cfg_getbool(spotify_cfg, "artist_override");
starred_artist_override = cfg_getbool(spotify_cfg, "starred_artist_override");
album_override = cfg_getbool(spotify_cfg, "album_override"); album_override = cfg_getbool(spotify_cfg, "album_override");
starred_album_override = cfg_getbool(spotify_cfg, "starred_album_override");
album = fptr_sp_track_album(track); album = fptr_sp_track_album(track);
if (!album) if (!album)
@ -523,11 +519,9 @@ spotify_metadata_get(sp_track *track, struct media_file_info *mfi, const char *p
* - starred_artist_override in config is set to true and track is part of the starred playlist * - starred_artist_override in config is set to true and track is part of the starred playlist
*/ */
compilation = ((albumtype == SP_ALBUMTYPE_COMPILATION) compilation = ((albumtype == SP_ALBUMTYPE_COMPILATION)
|| (starred && starred_artist_override) || artist_override);
|| (!starred && artist_override));
if ((starred && starred_album_override) if (album_override)
|| (!starred && album_override))
albumname = strdup(pltitle); albumname = strdup(pltitle);
else else
albumname = strdup(fptr_sp_album_name(album)); albumname = strdup(fptr_sp_album_name(album));