Kodi Community Forum
Release service.subtitles.subscene - 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: Release service.subtitles.subscene (/showthread.php?tid=184854)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


RE: service.subtitles.subscene - CrowleyAJ - 2014-02-12

I pushed version 0.9.2 to github. If you use the ZIP download from github keep in mind that you might haver to remove the "-master" portion from the directory as mentioned by bass63.

@NCKYTUN: This version should fix your issue.

Since throwing a full scene release file name at subscene seems to give very mixed results, I try some heuristics first to determine if its a movie (i.e. it has a year in its filename) or a TV show (it has an episode code) before just doing a file name search.


RE: service.subtitles.subscene - NCKYTUN - 2014-02-13

Thanks so much CrowleyAJ and amet!!! it works perfect.


RE: service.subtitles.subscene - CrowleyAJ - 2014-02-14

Glad to hear. I'll send it to the official repo then


RE: service.subtitles.subscene - warlion - 2014-02-14

crowley sorry about the delay t report , it work perfect i using it as default , thanks


RE: service.subtitles.subscene - nard - 2014-05-11

Hello, since the last update I made I'm getting an Unicode/decode error in script when downloading a sub (wherever the sub file is) with subscene service. Logs are available in http://sprunge.us/fKRZ (last error is related to podnapisi but the previous one is subscene). Any hints ?


RE: service.subtitles.subscene - CrowleyAJ - 2014-05-12

Hi nard,

thanks for your report. I had a look at it, but unfortunately I'm not sure, what to do about it. The problem occurs inside a Python library, when cleaning up the temp directory before extracting new files and there seems to be an encoding problem in a filename. Maybe someone reads this, who is bit more proficient in Python and XBMC add-on development and can give me a hint, how to solve this problem.

The error message is this:
Code:
Error Type: <type 'exceptions.UnicodeDecodeError'>
  Error Contents: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
  Traceback (most recent call last):
    File "/storage/.xbmc/addons/service.subtitles.subscene/service.py", line 422, in <module>
      subs = download(params["link"])
    File "/storage/.xbmc/addons/service.subtitles.subscene/service.py", line 294, in download
      shutil.rmtree(__temp__)
    File "/home/stephan/projects/openelec-4.0/build.OpenELEC-Generic.x86_64-4.0.0/Python-2.7.3/.install_pkg/usr/lib/python2.7/shutil.py", line 239, in rmtree
    File "/home/stephan/projects/openelec-4.0/build.OpenELEC-Generic.x86_64-4.0.0/Python-2.7.3/.install_pkg/usr/lib/python2.7/posixpath.py", line 71, in join
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)

And it occurs while just calling "shutil.rmtree(__temp__)". Has anyone an idea?


RE: service.subtitles.subscene - nard - 2014-05-12

Perhaps I could clean the temp manually if remains there a file with some encoding error in it.
Where is this temp dir ? is it the .xbmc/temp (in that case it's already empty) ?


RE: service.subtitles.subscene - CrowleyAJ - 2014-05-12

that would be .xbmc/userdata/addon_data/service.subtitles.subscene/temp/


RE: service.subtitles.subscene - nard - 2014-05-13

There was an srt file probably corrupted there, I removed it manually and now it works. Thanks for your help !


RE: service.subtitles.subscene - shikigami - 2014-06-01

When executing a subtitle search as soon as the video starts playing/loading on my raspberry, the addon causes an exception. Allowing the video to fully buffer and run a few seconds does not produce the exception. See below

Code:
18:28:09 T:2640110656   ERROR: EXCEPTION: XBMC is not playing any file
18:28:10 T:2640110656   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: XBMC is not playing any file
                                            Traceback (most recent call last):
                                              File "/home/pi/.xbmc/addons/service.subtitles.subscene/service.py", line 387, in <module>
                                                item['file_original_path'] = urllib.unquote(xbmc.Player().getPlayingFile().decode('utf-8'))  # Full path
                                            RuntimeError: XBMC is not playing any file
                                            -->End of Python script error report<--
18:28:10 T:2631722048   ERROR: GetDirectory - Error getting plugin://service.subtitles.subscene/?action=search&languages=English

I'm using raspbmc running v13 of xbmc on a raspberry pi


RE: service.subtitles.subscene - Mafarricos - 2014-06-03

(2014-05-12, 00:18)CrowleyAJ Wrote: Hi nard,

thanks for your report. I had a look at it, but unfortunately I'm not sure, what to do about it. The problem occurs inside a Python library, when cleaning up the temp directory before extracting new files and there seems to be an encoding problem in a filename. Maybe someone reads this, who is bit more proficient in Python and XBMC add-on development and can give me a hint, how to solve this problem.

The error message is this:
Code:
Error Type: <type 'exceptions.UnicodeDecodeError'>
  Error Contents: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
  Traceback (most recent call last):
    File "/storage/.xbmc/addons/service.subtitles.subscene/service.py", line 422, in <module>
      subs = download(params["link"])
    File "/storage/.xbmc/addons/service.subtitles.subscene/service.py", line 294, in download
      shutil.rmtree(__temp__)
    File "/home/stephan/projects/openelec-4.0/build.OpenELEC-Generic.x86_64-4.0.0/Python-2.7.3/.install_pkg/usr/lib/python2.7/shutil.py", line 239, in rmtree
    File "/home/stephan/projects/openelec-4.0/build.OpenELEC-Generic.x86_64-4.0.0/Python-2.7.3/.install_pkg/usr/lib/python2.7/posixpath.py", line 71, in join
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)

And it occurs while just calling "shutil.rmtree(__temp__)". Has anyone an idea?

In latest OpenElec Release I'm having this kind of error. Usually is because of corrupt subtitle files in the temp folder of subtitle addon?

How that relates to change this:
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') ).decode("utf-8")
to
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') )

and start working all the times?


RE: service.subtitles.subscene - Martijn - 2014-06-03

That sounds wrong. A lot of addons use
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') ).decode("utf-8")

so i see no reason why that doesn't work. That line is exactly the reason a lot of addon DO work.


RE: service.subtitles.subscene - Mafarricos - 2014-06-03

(2014-06-03, 11:13)Martijn Wrote: That sounds wrong. A lot of addons use
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') ).decode("utf-8")

so i see no reason why that doesn't work. That line is exactly the reason a lot of addon DO work.

So is more probable that is because some corrupt file in the temp folder?

Isn't there a way of prior to download files to the temp folder the addon delete any file on the folder?


RE: service.subtitles.subscene - Mafarricos - 2014-06-03

I think I made a dumb question, because the problem is right with the code that tries to delete the temp folder with a corrupt file? And has to be treated manually?

So by the code:
__temp__ = xbmc.translatePath(pjoin(__profile__, 'temp')).decode("utf-8")

Is telling that variable __temp_ has the path to temp directory decoded to utf-8 and then:
Code:
"""Called when subtitle download request from XBMC."""
    # Cleanup temp dir, we recomend you download/unzip your subs in temp folder and
    # pass that to XBMC to copy and activate
    if xbmcvfs.exists(__temp__):
        shutil.rmtree(__temp__)
    xbmcvfs.mkdirs(__temp__)

The problem relies on shutil.rmtree(__temp__)
if folder is decoded I get the error, but if is not encoded I don't have, what relates with having a problem with a corrupt file?
To delete folder and every files shouldn't be the same?


RE: service.subtitles.subscene - meminletgo - 2014-07-08

hi some day ago, i see problem with subscene, not working, always return not found.
My device is a iPad mini retina running iOS 7.0.4. Please help me. Thanks