opensubtitles / service.subtitles.opensubtitles_by_opensubtitles

KODI OpenSubtitles.org addon modified by opensubtitles, works without login
https://forum.opensubtitles.org/viewtopic.php?f=8&p=36070
94 stars 37 forks source link

v5.2.15. Ported to python 3 #25

Open juokelis opened 4 years ago

juokelis commented 4 years ago

Fixes #22 as requested by @zdzichu :)

juokelis commented 4 years ago

Not tested though. Please come back if something wrong.

smortex commented 3 years ago

I needed to tune this too:

diff --git a/service.py b/service.py
index 1d9f004..ac9ea15 100644
--- a/service.py
+++ b/service.py
@@ -88,7 +88,7 @@ def Download(id,url,format,stack=False):
     zip = os.path.join( __temp__, "OpenSubtitles.zip")
     f = urllib.urlopen(url)
     if not os.path.exists( __temp__ ):
-        os.mkdir( __temp__, mode=0775 )
+        os.mkdir( __temp__, mode=0o775 )
     with open(zip, "wb") as subFile:
       subFile.write(f.read())
     subFile.close()

Then Kodi is able to download subtitles :tada:

aanderse commented 3 years ago

Any chance we can get a merge here?

Thanks for your work on this @juokelis!

smortex commented 3 years ago

@aanderse according to https://github.com/juokelis/service.subtitles.opensubtitles_by_opensubtitles/pull/1#issuecomment-752057129, the code is now hosted here: https://github.com/juokelis/service.subtitles.opensubtitles. In order to use it with a recent version of Kodi, I had to tweak it a bit, see PR in that project if needed and maybe provide feedback to it if you give it a try.

Thanks!