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 - Momberg - 2015-02-15

Hey CrowleyAJ.

i have some trouble with the subscene addon as it only return a script error when trying to get a list of subs.

here is the debug log as you usually request it when people have trouble : http://xbmclogs.com/show.php?id=427916
also of what i can see the problem is around line 1054, just to make it easier for you just in case.

thank you for your support for this app, and keep up the good work Smile


RE: service.subtitles.subscene - CrowleyAJ - 2015-02-15

Hi kaitaba and Momberg,
I'm not quite sure how to handle that issue, since I can't reproduce it on my system. It seems to only affect OpenELEC installations.
I made a new test version. Could you please install that zip file an tell me if it helps?
https://github.com/manacker/service.subtitles.subscene/archive/master.zip


RE: service.subtitles.subscene - kataiba - 2015-02-16

I've installed your github version and now i can search fine everything appears but when i try downloading i get script failed and failed to download subtitle log here thank you


RE: service.subtitles.subscene - CrowleyAJ - 2015-02-16

Hi kataiba, thanks for your assistance. I think we're getting there. Would you please get the current version from github and try again?


RE: service.subtitles.subscene - Momberg - 2015-02-16

Hi crowleyAJ

Thank You for looking in to it that fast.
Although I'm a novice in kodi/xbmc/openelec I'll try to install it. If I can make the time I will do it tomorrow.


RE: service.subtitles.subscene - kataiba - 2015-02-17

Hi CrowleyAJ. I've installed the latest github release and getting same errors as before . Log. Thank you


RE: service.subtitles.subscene - Momberg - 2015-02-21

hi again.

sorry for the long wait. had alot to do the last couple of days and had trouble with xbmc log uploader app.

here is the new log. atleast i think this is the one. i had to upload it manually and im not sure i have chosen the correct language (chose python)
http://xbmclogs.com/pe3rvl7wy
its there for a week from now.


RE: service.subtitles.subscene - Momberg - 2015-02-21

it starts at line 1217


RE: service.subtitles.subscene - kooroshtaha - 2015-02-27

Hey CrowleyAJ.

i have some trouble with the subscene addon as it only return a script error when trying to get a list of subs.

it was working well but sense last week it dose not working at all.

thank you for your support for this app, and keep up the good work Smile


RE: service.subtitles.subscene - CrowleyAJ - 2015-02-27

Hi kooroshtaha,

as always, I have to ask you for a debug log (wiki). Also it would help if you describe your setup a bit. What distribution are you using, on what hardware.
I'm still struggling to fix some issues on OpenELEC and couldn't reproduce them yet.


RE: service.subtitles.subscene - Momberg - 2015-03-01

hey crowleyAJ.

please tell me if you need a new debug log to adress the problems on openelec.
i hasve installed the zip as you suggested as in my previous debug log.

thanks again.


RE: service.subtitles.subscene - parcel - 2015-03-11

There is a unicode relate error at log(...), it simply fixed by removing that. script line 369.
And fix invalid subtitle file is assigned at zip file archive type downloading.

(edit) more correction in file time comparision.
(edit) create unique filename based on url.

Code:
--- E:/download/service.subtitles.subscene-master/service.py    Mon Feb 16 12:34:02 2015
+++ E:/download/service.subtitles.subscene-master/service.subtitles.subscene-master/service.py    Sun Mar 15 11:28:36 2015
@@ -14,6 +14,7 @@
import string
import difflib
import HTMLParser
+import time

__addon__ = xbmcaddon.Addon()
__author__ = __addon__.getAddonInfo('author')
@@ -289,6 +290,13 @@
     downloadlink_pattern = "...<a href=\"(.+?)\" rel=\"nofollow\" onclick=\"DownloadSubtitle"

     content, response_url = geturl(link)
+    # get unique name of file based on link
+    base_file_idx = link.rfind('/')
+    if base_file_idx != -1:
+        local_base_file = link[base_file_idx+1:]
+    else:
+        local_base_file = "subscene"
+
     match = re.compile(downloadlink_pattern).findall(content)
     if match:
         downloadlink = main_url + match[0]
@@ -319,7 +327,7 @@
                 shutil.rmtree(__temp__.encode('utf-8'))
         xbmcvfs.mkdirs(__temp__)

-        local_tmp_file = os.path.join(__temp__, "subscene.xxx")
+        local_tmp_file = os.path.join(__temp__, local_base_file + ".xxx")
         packed = False

         try:
@@ -346,8 +354,8 @@
                     packed = False
                     log(__name__, "Discovered a non-archive file")
             myfile.close()
-            local_tmp_file = os.path.join(__temp__, "subscene." + typeid)
-            os.rename(os.path.join(__temp__, "subscene.xxx"), local_tmp_file)
+            local_tmp_file = os.path.join(__temp__, local_base_file + "." + typeid)
+            os.rename(os.path.join(__temp__, local_base_file + ".xxx"), local_tmp_file)
             log(__name__, "Saving to %s" % local_tmp_file)
         except:
             log(__name__, "Failed to save subtitle to %s" % local_tmp_file)
@@ -356,6 +364,8 @@
             xbmc.sleep(500)
             xbmc.executebuiltin(('XBMC.Extract("%s","%s")' % (local_tmp_file, __temp__,)).encode('utf-8'), True)

+        packfile_time = os.stat(local_tmp_file).st_mtime
+
         for file in xbmcvfs.listdir(__temp__)[1]:
             if sys.platform.startswith('win'):
                 file = os.path.join(__temp__, file)
@@ -364,8 +374,10 @@
             if os.path.splitext(file)[1] in exts:
                 if search_string and string.find(string.lower(file), string.lower(search_string)) == -1:
                     continue
-                log(__name__, "=== returning subtitle file %s" % file)
-                subtitle_list.append(file)
+                ## log(__name__, "=== returning subtitle file %s" % file.decode('utf-8'))
+                cfile_time = os.stat(file).st_mtime
+                if cfile_time >= packfile_time and cfile_time <= time.time():
+                    subtitle_list.append(file)

         if len(subtitle_list) == 0:
             if search_string:

service.subtitles.subscene-master_(12).zip


RE: service.subtitles.subscene - kooroshtaha - 2015-03-15

(2015-02-27, 17:36)CrowleyAJ Wrote: Hi kooroshtaha,

as always, I have to ask you for a debug log (wiki). Also it would help if you describe your setup a bit. What distribution are you using, on what hardware.
I'm still struggling to fix some issues on OpenELEC and couldn't reproduce them yet.

HI CrowleyAj.

thanks for your answer,i found something about how should i fix it and it worked.
File manager: profile directory/addon_data/service.subtitles.subscene/temp

in this location delete all the information there

cheers .


RE: service.subtitles.subscene - ztrust - 2015-03-22

hey
for the longest time NCIS subtitle search comes back as family guy ?
just to report


RE: service.subtitles.subscene - CrowleyAJ - 2015-03-23

Hi ztrust,

can you provide a debug log (wiki) please?