Bugzilla – Bug 3898
'Now Playing' in web interface shows Artist and Album twice
Last modified: 2008-12-15 13:07:37 UTC
With 6.5 r8881, using Default skin and Firefox on WinXP, I see the following: In the 'Now Playing' part of the web interface I see <Track> from <Album> by <Artist> from <Album> by <Artist>. The album and artist are shown twice. I will upload an image that illustrates the problem.
Created attachment 1410 [details] Image showing the duplicated info
I expect you have your titleformat set to TITLE by ARTIST ? changing titleformat to TITLE will clear that up as a workaround the handling of 'includeArtist' and 'includeAlbum' is clearly a bit flakey in places.
Please let us know if that cleared it up.
Changing Title Format to TITLE clears up this problem. And I still get from <Album> by <Artist>. Why? May be the titleformat 'TITLE from ALBUM by ARTIST' is of no use?
Why...is because the title format is use for the song link. The from... and by... provide album and artist links when artist or title arent' used in the TITLEFORMAT. it's confusing and, personally, I think the only format that should be used is TITLE since it isn't practical to provide a flexible format with links on each. The design is still broken as the server should be telling the skins about the content of the titleformat so that redundancies do not come up. The change is really for a workaround :)
I took the liberty of setting this to fix after 6.5. If you feel like looking at it before then, Dan, you are of course welcome to.
This is a really simple fix, which I'll put in tonight. HTML/Default/status_header.html: line 169 changes to: [% IF itemobj.album.title && itemobj.album.title != noAlbum && includeAlbum %] line 177 changes to: [% IF itemobj.artist && itemobj.artist != noArtist && includeArtist %] post 6.5 task might be to look at the titleformat design. reconsider the purpose of the formatting of what is just a title link, and the purpose of having the artist and album links. Maybe they should ONLY be there if format is just TITLE or maybe they can be replacing ALBUM and ARTIST only when included in the titleformat. etc etc.
fixed in change 8903 well enough for now. I'll leave open but feel free to close if you feel so inclined.
For the above fix to have the intended effect, I believe the following (or a similar) patch is needed: Index: server/Slim/Web/Pages/Status.pm =================================================================== --- server/Slim/Web/Pages/Status.pm (revision 8930) +++ server/Slim/Web/Pages/Status.pm (working copy) @@ -190,7 +190,16 @@ $params->{'current_playlist_name'} = Slim::Music::Info::standardTitle($client, $client->currentPlaylist); } } + + my $format = Slim::Utils::Prefs::getInd("titleFormat", Slim::Utils::Prefs::get("titleFormatWeb")); + if ($format !~ /ARTIST/) { + $params->{'includeArtist'} = 1; + } + if ($format !~ /ALBUM/) { + $params->{'includeAlbum'} = 1; + } + return Slim::Web::HTTP::filltemplatefile($params->{'omit_playlist'} ? "status_header.html" : "status.html" , $params); }
KDF, I took the liberty to add you to the CC list in order to get your opinion on my additional patch above.
that might not be the right place Since we have a displayAsHTML routine for track results, it would make sense to use that existing code. however, I had tested this so I'll have to check back to find out why this changed.
As I understand it, it is Slim/Web/Pages/Status.pm that supplies the data to status_header.html. If includeArtist and includeAlbum is not set in Status.pm, these variables will always be false in status_header.html, and the if statements will never be true.
correct.
try: Slim::Player::Playlist::song($client)->displayAsHTML($params); at line 154 of Status.pm instead. This will leverage existing code.
That works, and is the preferred solution. Thanks.
fixed at change 8964
This bug appears to have been fixed in the latest release! If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look. Make sure to include the version number of the software you are seeing the error with.