Kodi Community Forum
[REQUEST] Sublight Subtitles Plugin, anyone interested in developing this? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Subtitle Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=143)
+---- Thread: [REQUEST] Sublight Subtitles Plugin, anyone interested in developing this? (/showthread.php?tid=44385)

Pages: 1 2 3


- Dan Dare - 2009-05-11

@macofaco
I'm having a problem with extracting the subtitle zip from Python (zipfile barfs with an OverflowError exception, "long int too large to convert to int"), and I've noticed the archive is ZIP64 format?!

I extracted normal ZIP files before using the above library with no problems, so I'm just wondering how much trouble would be for you to change from ZIP64 to ZIP format - from what I understand the ZIP64 extension allows for large files and all that, something quite unlikely for subtitles...


- rwparris2 - 2009-05-11

Dan Dare Wrote:@macofaco
I'm having a problem with extracting the subtitle zip from Python (zipfile barfs with an OverflowError exception, "long int too large to convert to int"), and I've noticed the archive is ZIP64 format?!

I extracted normal ZIP files before using the above library with no problems, so I'm just wondering how much trouble would be for you to change from ZIP64 to ZIP format - from what I understand the ZIP64 extension allows for large files and all that, something quite unlikely for subtitles...

I assume your problems are with xbmc's builtin zip handling? If so, try
Code:
import zipfile
Big Grin http://docs.python.org/library/zipfile.html
speed may be an issue, you'll have to experiment to figure it out.


- macofaco - 2009-05-11

Hello.

ZIP files are created with #ziplib library (http://www.icsharpcode.net/OpenSource/SharpZipLib). I thought that generated archives are just ordinary ZIP archives Smile
Did you try to write your Base 64 decoded ZIP file to disk first and decompress it with ordinary ZIP utilities (try more than one utility).

Could you also try what rwparris2 suggested?

If nothing works then I will try to see if files are really in ZIP64 format and how to convert them to ordinary ZIP files.


- Dan Dare - 2009-05-11

@rwparris2
I actually use zipfile, your reference is for Python 2.6 - it's just that in Python 2.4, there's no support for ZIP64.
http://www.python.org/doc/2.4/lib/module-zipfile.html

But that be an idea, I'll try to extract zipfile.py from 2.6 and try it on in xbmc...

@macofaco
That's how I did it and then use WinRAR info button and noticed the ZIP64 format. Apparently the SharpZipLib library creates ZIP64 by default and it has a UseZip64 property to turn that on/off.

http://wiki.sharpdevelop.net/Default.aspx?Page=SharpZipLib_FAQ&AspxAutoDetectCookieSupport=1

Don't do anything just yet, I might try the above first and let you know.


- macofaco - 2009-05-11

Dan Dare, don't bother. I updated Sublight server. Now ALL subtitles should be in normal ZIP format.

I hope I didn't create any bugs Smile

Could you try again?


- Dan Dare - 2009-05-12

Thanks macofaco, it works ok now. Going for the final push... Wink


- rwparris2 - 2009-05-12

Quote:@rwparris2
I actually use zipfile, your reference is for Python 2.6 - it's just that in Python 2.4, there's no support for ZIP64.
http://www.python.org/doc/2.4/lib/module-zipfile.html

Ah should have looked closer


- Dan Dare - 2009-05-12

neah, I did the same before you posted, should've seen me at 2 am staring at the doc page, "wth, it says it can handle ZIP64" :-)


- Dan Dare - 2009-05-18

Finally, it's out the door, thanks macofaco! Big Grin

Release / support thread here:
http://forum.xbmc.org/showthread.php?tid=51256


- macofaco - 2009-05-18

Really great news!

I will test it as soon as possible!


- queeup - 2009-05-19

Hi @macofaco,

I really pleased your job here. Also thx @Dan Dare for plugin. I want to Turkish Subtitle Site Request for Turkish peps. On OpenSubtitle there are not much Turkish subtitle. I sow "How to develop Sublight plugin?" post on your site but i'm not coder and i have no idea how can i do that. If you have a time pls consider that request.

Site: http://www.turkcealtyazi.org/
Description: Tons of Turkish and English subtitles.

Some info about query:
http://www.turkcealtyazi.org/tt0468569
('http://www.turkcealtyazi.org/' + IMDbID)

If you have any questions pls ask...
Thx and Best Regards.
O.B.


- macofaco - 2009-05-19

Thank you.

Regarding Turkish subtitle site. Please contact them and ask if I am allowed to develop Sublight plugin for their site.