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

UTF8 encoded XMLTV file throw exception #130

Closed
goooroooX opened this issue Jun 7, 2017 · 1 comment
Closed

UTF8 encoded XMLTV file throw exception #130

goooroooX opened this issue Jun 7, 2017 · 1 comment
Assignees

Comments

@goooroooX
Copy link

Hi,

I got following error(s) when loading XMLTV file from one of telecom companies of Belarus:

#287	2017-06-07 15:42:55,884 (7ffb46ffd700) : CRITICAL (runtime:1128) - Exception in thread named 'GuideReloader' (most recent call last):
#288	File "/usr/lib/plexmediaserver/Resources/Plug-ins-995f1dead/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1126, in _start_thread
#289	f(*args, **kwargs)
#290	File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/IPTV.bundle/Contents/Code/xmltv_parser.py", line 114, in GuideReloader
#291	LoadGuide()
#292	File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/IPTV.bundle/Contents/Code/xmltv_parser.py", line 59, in LoadGuide
#293	key = unicode(name.text, errors = 'replace')
#294	TypeError: decoding Unicode is not supported

The reason is unicode() can't convert a string already in unicode.
The quick fix and sample XML are attached (coding also should be there at the top).

It would be nice if you can integrate this or your own fix to main.

Another thing I would kindly ask is to take a look on "icon" tag in XML. Is it possible to get channel picture from URL in XML?

	<channel id="000000414">
		<display-name lang="ru">Fox HD</display-name>
		<icon src="http://help.telecom.by/_files/TelecomTV/icons/000000414.jpg"/>
	</channel>

Thanks!
plex_iptv_unicode_fix.zip

@Cigaras
Copy link
Owner

Cigaras commented Jun 13, 2017

Thank You @goooroooX, very nice fix, will incorporate it in in few upcomming days, sorry for not doing it sooner, was on vacation 😄

@Cigaras Cigaras added the Bug label Jun 13, 2017
@Cigaras Cigaras self-assigned this Jun 13, 2017
Cigaras added a commit that referenced this issue Jun 14, 2017
* Unicode decoding fix (#129, #130)
* Program guide icons (#130)
@Cigaras Cigaras added the Fixed label Jun 22, 2017
@Cigaras Cigaras closed this as completed Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants