SpaceOgre / SortTV

My custom version of SortTV: http://sourceforge.net/projects/sorttv/
12 stars 2 forks source link

XML::Simple issue #6

Open s3812502 opened 4 years ago

s3812502 commented 4 years ago

Error at line 260

Anyone still support this repo?

SpaceOgre commented 4 years ago

I try to support it, but with two small children my time is very limited and I don't really have TV access ;p

When do you get this error? And what file?

marticster commented 4 years ago

I have been getting this error too occasionally for a few years. Can't figure out anything common about the files it has trouble with. I suspect it was an update to XML::Simple or TVDB::API modules at some stage. Some example filenames: Star.Trek.S02E01.Amok.Time.1080p.AMZN.WEB-DL.DDP5.1.H265-SiGMA.mkv conan.2020.04.07.stephen.colbert.720p.web.x264-xlf[eztv].mkv

INFO: Currently checking file: Star.Trek.S02E01.Amok.Time.1080p.AMZN.WEB-DL.DDP5.1.H265-SiGMA.mkv INFO: trying to move Star Trek season 2 episode 1 Only Comments, PIs and whitespace allowed at end of document [Ln: 1, Col: 2622086517128313136] XML::Simple called at /usr/local/share/perl/5.26.1/TVDB/API.pm line 260.

Appreciate you have taken on this project and your limited time!

SpaceOgre commented 4 years ago

I have not managed to fix this yet, but TVDB::API module have not been updated in ages (like 9 years from what I can see).

It might have something to do with this: https://forums.thetvdb.com/viewtopic.php?f=17&t=60086

In any case I think the problem is in TVDB::API or the official API, so it is hard to fix without doing a lot of work :(

marticster commented 4 years ago

Yes definitely TVDB:API.

I followed the steps from https://forum.kodi.tv/showthread.php?tid=75949&pid=2913385#pid2913385

and it has resolved it for me :)

locate TVDB/API.pm mine was in "/usr/local/share/perl5/5.30/TVDB/API.pm" add the following line:

if ($xml =~ s/<\/Data><\?xml.*?Banners>|<\/Banners><\?xml.*?Actors>//gs) {
$xml =~ s/<\/Actors>$/<\/Data>/s;
}
$xml =~ s/<\/Data><Banners>.*/<\/Data>/; #<----ADD THIS LINE

For me this was added between line 251 and 252 under the sub '_downloadZip'

Hope this helps!