Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode issues with podcast titles #195

Open
molobrakos opened this issue Feb 16, 2018 · 22 comments

Comments

@molobrakos
Copy link

commented Feb 16, 2018

For some reason, unexpected unicode characters are sometimes inserted at beginning of podcast titles.

Default UI

screenshot 2018-02-16 at 13 34 19
Observe empty squares in each title.

Mobile skin

screenshot 2018-02-16 at 13 35 21
Observe empty squares in each title.

Json-rpc example

> curl -d '{"id":1,"method":"slim.request","params":["<mac>",["podcasts","items",0,1,"item_id:9f20fb47.4","want_url:1"]]}' http://muzak:9000/jsonrpc.js 
{"id":1,"params":["<mac>",["podcasts","items","0",1,"item_id:9f20fb47.4","want_url:1"]],"method":"slim.request","result":{"count":299,"title":"Alex & Sigges podcast","loop_loop":[{"id":"9f20fb47.4.0","title":"\u001d\u0003\u0004\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0004\u0003\u001c  299. Var är alla?","image":"/imageproxy/http%3A%2F%2Fstatic.libsyn.com%2Fp%2Fassets%2Fc%2Fa%2Fd%2Fd%2Fcadd2211366e4d04%2Fales_och_sigges_banner_kvadrat2.jpg/image.jpg","isaudio":1,"hasitems":1}]}}

Observe \u001d\u0003\u0004\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0004\u0003\u001c at start of the title.

Directly accessing the original podcast url

> curl -s http://alexosigge.libsyn.com/rss | grep "<title>"  | head -n 5
                <title>Alex &amp; Sigges podcast</title>
                        <title>Alex &amp; Sigges podcast</title>
                        <title>299. Var är alla?</title>
                        <title>298. Solblås</title>
                        <title>297. Syndrom</title>

Observe no unexpected characters at start of each title.

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 16, 2018

Btw, I am running LMS in a docker container (https://hub.docker.com/r/molobrakos/lms/) - could this be a config/environment issue (some missing unicode support)?

@mherger

This comment has been minimized.

Copy link
Contributor

commented Feb 16, 2018

Looking good here. What LMS version is this? I'm a bit confused, as I wouldn't get the artwork with every line, but only at the top (in the web UI)

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 16, 2018

Logitech Media Server Version: 7.9.1 - 1518692686 @ Thu Feb 15 12:29:16 UTC 2018
Värdnamn: 245dbbaeb8b1
IP: 172.17.0.2
HTTP-port: 9000
Operativsystem: Debian - SV - utf8
Plattform: x86_64-linux
Perl-version: 5.24.1 - x86_64-linux-gnu-thread-multi
Audio::Scan: 0.95
Databasversion: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
Totalt antal anslutna spelare: 5

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 16, 2018

I think we also can rule out any temporary issue on the podcast feed server, since this happens for many different podcasts with different origins.

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 16, 2018

Btw, I do get the artwork on every line in the default web ui. I have no local modifications (or plugins) for this, so I guess it is some kind of default behaviour.

@craigmaloney

This comment has been minimized.

Copy link
Contributor

commented Feb 16, 2018

I've noticed this on a few devices as well. The only difference I can come up with is that I've noticed this on an Intel machine vs. AMD being everywhere else in the house.

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 16, 2018

Some buffer overflow issue in the xml parser? Seems to be 16 bytes prepended.

@mherger

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2018

@molobrakos - can you confirm @craigmaloney's observation? It certainly doesn't happen on my Intel based MacBook :-). Will have to double-check with my Linux box at home.

@fsbruva

This comment has been minimized.

Copy link

commented Feb 23, 2018

Could this be related to or resolved by: Logitech/slimserver-platforms#7 ?

@mherger

This comment has been minimized.

Copy link
Contributor

commented Feb 23, 2018

Unlikely. The ICU data is only being used by the database.

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 23, 2018

I'm running two different instances (with very similar config) of LMS, both in docker containers on Intel NUC. I see this issue on both installation. I will try to install standalone to see if this is isolated to the docker environment.

@sanc909

This comment has been minimized.

Copy link

commented Feb 27, 2018

This could be me but I get this issue if I view on Chrome but not in Edge or Firefox. I think it relates to Parser.pm in the Podcast Plugin

https://github.com/Logitech/slimserver/blob/public/7.9/Slim/Plugin/Podcast/Parser.pm#L89 and
https://github.com/Logitech/slimserver/blob/public/7.9/Slim/Plugin/Podcast/Parser.pm#L124

Which I think attempts to track progress "if $client && !$client->display->isa('Slim::Display::NoDisplay');" If I comment these lines out, chrome doesn't show the strange characters.

( I think it's trying to do something like draw a number of boxes, either filled in or not depending on position retrieved from the cache?)

Progress is then prepended to the podcast title in Line 127
https://github.com/Logitech/slimserver/blob/public/7.9/Slim/Plugin/Podcast/Parser.pm#L127

So guessing that Chrome either somehow passes "if $client && !$client->display->isa('Slim::Display::NoDisplay');" or displays the progress characters and other browsers don't?

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 27, 2018

Ah, it is a progress bar!
If that is the case, it is maybe preferred in the JSON-RPC case to instead get the progress/position as a separate property instead of prepended to the title?

@mherger

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2018

@sanc909 - great finding! Of course, that must be it. I thought I would not show that progress bar in the web UI. But I guess I have to review this.

May I ask what browser you're using?

@sanc909

This comment has been minimized.

Copy link

commented Feb 28, 2018

Hi @mherger. I see the strange characters on Windows 10 in Chrome Version 64.0.3282.186 (Official Build) (64-bit)

But not in MS Edge Microsoft Edge 41.16299.248.0 or Firefox 58.0.2 (64-bit), also on Win10.

FWIW I did add some simple debug to display length and value of $progress - in the log all browsers show length as 14 but for me only chrome shows the 14 boxes in the log. So it's populated but not displayed in Edge and Firefox?

Hope this helps.

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 28, 2018

Using Chrome (on Linux and ChromeOS) as well.

@mherger

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2018

Thanks - good data point. I rarely use Chrome with LMS.

@mherger

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2018

What players are you using?

@molobrakos

This comment has been minimized.

Copy link
Author

commented Feb 28, 2018

Radio + Boom

@sanc909

This comment has been minimized.

Copy link

commented Feb 28, 2018

I'm using an SB3 and squeezelite, running on an RPI.

@mherger mherger self-assigned this Mar 14, 2018
@mherger mherger added the bug label Mar 14, 2018
@craigmaloney

This comment has been minimized.

Copy link
Contributor

commented Mar 21, 2018

I'm using three Squeezebox radios, a SB3, and a SB Touch, as well as Squeezelite. Most of my interactions are on the website of the server or through Squeeze Ctrl.

@mherger

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2018

Thanks guys. This seems to be a problem if an ip3k based player is involved only. You listing confirms you're all using one of them. I'll have to figure something out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.