service.subtitles.opensubtitles_by_opensubtitles icon indicating copy to clipboard operation
service.subtitles.opensubtitles_by_opensubtitles copied to clipboard

v5.2.15. Ported to python 3

Open juokelis opened this issue 4 years ago • 4 comments

Fixes #22 as requested by @zdzichu :)

juokelis avatar Apr 27 '20 18:04 juokelis

Not tested though. Please come back if something wrong.

juokelis avatar Apr 27 '20 18:04 juokelis

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:

smortex avatar Dec 29 '20 04:12 smortex

Any chance we can get a merge here?

Thanks for your work on this @juokelis!

aanderse avatar Mar 22 '21 01:03 aanderse

@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!

smortex avatar Mar 22 '21 17:03 smortex