[SOLVED] (Tiny) layout issue - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [SOLVED] (Tiny) layout issue (/showthread.php?tid=7120) Pages:
1
2
|
(Tiny) layout issue - PJVervoorn - 11-22-2024 [attachment=4193]As mentioned in the subject, a tiny issue... I have a compilation album (Global Sounds 3) where the name of one the artists contains a super script 2 or power of 2: [attachment=4190] As you can see this messes up the layout. To confirm it is not a typo, the info from Discogs: [attachment=4191] ==== Update ==== The issue is *not* the 2, but maybe in the track name of the previous item. That track name is <BPM> If that track is playing the layout is wrong: [attachment=4192] When that track is gone the layout is correct: [attachment=4193] The track name is not visible in the list, but is correctly displayed on the right hand side: [attachment=4194] RE: (Tiny) layout issue - TheOldPresbyope - 11-22-2024 Well, strictly speaking, this is a trio with two artists named Morelenbaum and one named Sakamoto. The superscript 2 appears in the overly clever name of the trio. I imagine Tim will need to know what the actual track metadata are to get a handle on how to protect the UI layout. ETA - I just caught your comment about the track title including "<" and ">" characters. Interesting. Regards, Kent RE: (Tiny) layout issue - steve4star - 11-22-2024 I assume the <BPM> in the track name is being treated as the start of a HTML tag. Not sure how the title is presented to the UI, but it would require escaping special HTML characters. RE: (Tiny) layout issue - Tim Curtis - 11-22-2024 (11-22-2024, 07:00 PM)PJVervoorn Wrote: As mentioned in the subject, a tiny issue... I have some tracks in one of my test collection with <> in the title and no issues. To troubleshoot try the following. 1. Right click on the Queue item and "Inspect" the element in the Browser console. Post a screen shot of the HTML. 2. Bring up Audio info for the track(s) and post some screen shots showing all the metadata. RE: (Tiny) layout issue - TheOldPresbyope - 11-22-2024 I can repro the issue. Created a fake album with three FLAC tracks. Using mediainfo, the first track is Code: General The second is Code: General The third is Code: General And track 3 is indented in the queue. I'll post the HTML in a bit. Regards, Kent RE: (Tiny) layout issue - Tim Curtis - 11-22-2024 (11-22-2024, 09:46 PM)TheOldPresbyope Wrote: I can repro the issue. Created a fake album with three FLAC tracks. Nice. PM me a download link for the flac that reproduces the issue and I'll test on my end. RE: (Tiny) layout issue - PJVervoorn - 11-22-2024 Thanks for the replies. I can confirm the <BPM> is the cause of this strange effect, but it is the artist, not the track name. [attachment=4195] Screencap with code: [attachment=4196] I have a link with the track, let me see if I can forward it to you.. RE: (Tiny) layout issue - Tim Curtis - 11-22-2024 @PJVervoorn I just got your download and can repro the issue, same as @TheOldPresbyope. I'll investigate in a bit but it does appear that the angle brackets in "<BPM>" are not unescaped as @steve4star suggested and are being treated as an HTML tag. RE: (Tiny) layout issue - Tim Curtis - 11-22-2024 Fixed. All sample files from @PJVervoorn and @TheOldPresbyope looking good. Add the bolded line below to function getPlayqueue() in file /var/www/command/queue.php. No need to reboot. // Return MPD queue function getPlayqueue($resp) { if (is_null($resp)) { debugLog('getPlayqueue(): Returned null'); return null; } else { $queue = array(); $line = strtok($resp,"\n"); $idx = -1; while ($line) { list ($element, $value) = explode(': ', $line, 2); $value = htmlspecialchars($value, ENT_NOQUOTES); if ($element == 'file') { $idx++; . . . RE: (Tiny) layout issue - TheOldPresbyope - 11-22-2024 Works here. Regards, Kent |