Bugzilla – Bug 3044
Lyrics do not display with line spacing correctly.
Last modified: 2008-12-18 11:11:39 UTC
I have lyrics entered via Musicmatch and iTunes. Both show the lyrics with correct line breaks. The Song Info display does not contain any line breaks -- text is just strung together. [I think song lyrics were added in Bug# 1793] Same behaviour in SlimServer Version: 6.2.1 - 5194 - Windows XP - EN - cp1252 and 6.5b1 - (SlimServer_v2006-02-21.exe) Same behavior in Default and Fishbone UI. Also, it sure would be nice if when the Now Playing song isupdated, that it updates the Song Info window if it is being displayed. With this, what is playing would be a glance away.
for 6.5, HTML/EN/Songinfo.html, quick fix. change: <div class="songInfoText">[% itemobj.lyrics | html %]</div> to: <div class="songInfoText"><pre>[% itemobj.lyrics | html %]</pre></div> similarly for 6.2.1, wrap the [% itemobj.lyrics | html %] in <pre></pre> not sure if there is any better way, really. Might be useful to do this same thing for the comments block.
(In reply to comment #1) > for 6.5, HTML/EN/Songinfo.html, quick fix. > > change: > <div class="songInfoText">[% itemobj.lyrics | html %]</div> > > to: > <div class="songInfoText"><pre>[% itemobj.lyrics | html %]</pre></div> > > > similarly for 6.2.1, wrap the [% itemobj.lyrics | html %] in <pre></pre> > > not sure if there is any better way, really. Might be useful to do this same > thing for the comments block. > checked out in 6.2.1 -- had to change HTML for each selected directory - (e.g Default, Fishbone). Linespacing is now correct, however font reverts to Courier and doesn't match font on rest of page.
that's the cost of using <pre>
more complex fix: add a filter to Slim/Web/HTTP.pm (this means you can't test if you are using windows exe) in sub newSkinTemplate, add: 'pre' => \&preFormatted, to FILTERS and: sub preFormatted { my $string = shift; $string =~ s/[\r\n]/<br>/g; return $string; } This munges the lyrics to use an html line break instead of the linefeed/carriage return of standard text. the line in songinfo then becomes: [% itemobj.lyrics | html | pre %] Probably need something that handles unicode characters in lyrics as well. The stuff I pasted into a test file didn't work so well, but I can't guarantee that it was psted with proper locale.
Fixed in change 7986
I just installed 6.5 and the line spacing is still incorrect. Both Default and Fishbone Interface. Version installed: VERSION INFO SlimServer Version: 6.5.0 - 9916 - Windows XP - EN - cp1252 Server IP address: 172.16.10.32 Perl Version: 5.8.7 MSWin32-x86-multi-thread MySQL Version: 5.0.22-community-nt
make sure it's not a caching issue by refreshing the page a few times. Try an uninstall and reinstall, making sure none of the old html stuff is left around from c:\program files\slimserver\server\HTML
looks like this fix was accidentally reverted at change 8014. as I broke it, I'll fix it.
fix committed to trunk at change 10136 and 6.5.1 builds at change 10137 please update and let us know if you find any issues with it.
Not functioning for me. Have uninstalled SlimServer and reinstalled. VERSION INFO SlimServer Version: 6.5.1 - 10311 - Windows XP - EN - cp1252 Server IP address: 172.16.10.36 Perl Version: 5.8.8 MSWin32-x86-multi-thread MySQL Version: 5.0.22-community-nt Lyrics are stored as: My heart is sad and lonely For you I pine, for you dear only Why haven't you seen it? I'm all for you, body and soul. I spend my days in longing And wondering why it's me you're wronging I tell you I mean it I'm all for you, body and soul. ... Display as: My heart is sad and lonely For you I pine, for you dear only Why haven't you seen it? I'm all for you, body and soul. I spend my days in longing And wondering why it's me you're wronging I tell you I mean it I'm all for you, body and soul. I can't believe it, it's hard to conceive it That you'd turn away romance. Are you pretending? It looks like the ending -- Unless I can have Just one more chance, dear. My life a wreck you're making My heart is yours for just the taking. I'll gladly surrender Myself to you, body and soul!
*** Bug 4375 has been marked as a duplicate of this bug. ***
another patch merged in at change 10342. please update and let us know if that works fully.
Working correctly for me with Fishbone UI.