The branch, gotham has been updated
       via  71031027f3bf66c8e4008e7919393cde3776b19e (commit)
      from  e423dccc8b8e63a77b80fa7a9702ec888fb01b26 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=71031027f3bf66c8e4008e7919393cde3776b19e

commit 71031027f3bf66c8e4008e7919393cde3776b19e
Author: sphere <[email protected]>
Date:   Tue Jul 15 16:13:02 2014 +0200

    [service.subtitles.napiprojekt] updated to version 1.0.2

diff --git a/service.subtitles.napiprojekt/addon.xml 
b/service.subtitles.napiprojekt/addon.xml
index 26dc682..95b9554 100644
--- a/service.subtitles.napiprojekt/addon.xml
+++ b/service.subtitles.napiprojekt/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="service.subtitles.napiprojekt"
        name="Napiprojekt.pl"
-       version="1.0.1"
+       version="1.0.2"
        provider-name="CaTz">
     <requires>
         <import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.napiprojekt/changelog.txt 
b/service.subtitles.napiprojekt/changelog.txt
index ef13e63..2517be7 100644
--- a/service.subtitles.napiprojekt/changelog.txt
+++ b/service.subtitles.napiprojekt/changelog.txt
@@ -1,5 +1,8 @@
+1.0.2 - by ciukacz 10/07/2014
+- fix: hash-based subtitle search for videos inside archives
+
 1.0.1 - by CaTz 15/03/2014
 - Change python version for Gotham
 
 1.0.0 - by CaTz 14/02/2014
-- Redesign the code to support Gotham version
\ No newline at end of file
+- Redesign the code to support Gotham version
diff --git 
a/service.subtitles.napiprojekt/resources/language/English/strings.po 
b/service.subtitles.napiprojekt/resources/language/English/strings.po
index 7217a6b..b2a4761 100644
--- a/service.subtitles.napiprojekt/resources/language/English/strings.po
+++ b/service.subtitles.napiprojekt/resources/language/English/strings.po
@@ -14,6 +14,6 @@ msgstr ""
 
 #English
 
-msgctxt "#24000"
+msgctxt "#30001"
 msgid "Some Error Msg"
 msgstr ""
diff --git a/service.subtitles.napiprojekt/service.py 
b/service.subtitles.napiprojekt/service.py
index 2c78b38..b169e71 100644
--- a/service.subtitles.napiprojekt/service.py
+++ b/service.subtitles.napiprojekt/service.py
@@ -56,7 +56,12 @@ def set_filehash(path, rar):
     d = md5()
     qpath = urllib.quote(path)
     if rar:
-        path = """rar://""" + qpath
+        path = """rar://""" + qpath + '/'
+        for file in xbmcvfs.listdir(path)[1]:
+            if (file.lower().endswith(('.avi','.mkv','.mp4'))):
+                path = path + file
+                break
+
     d.update(xbmcvfs.File(path, "rb").read(10485760))
     return d
 
@@ -120,14 +125,6 @@ def Search(item):
             xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url, 
listitem=listitem, isFolder=False)
 
 
-# item = {'episode': '11', 'temp': False, 'title': '', 'season': '11', 'year': 
'', 'rar': False,
-#         'tvshow': 'Two and a Half Men',
-#         'file_original_path': 
u'D:\\Videos\\Series\\Two.and.a.Half.Men\\Season 
11\\Two.and.a.Half.Men.S11E13.480p.HDTV.X264-DIMENSION.mkv',
-#         '3let_language': ['eng', 'heb']}
-#
-# print Search(item)
-
-
 def Download(l, f, t, filename):
     subtitle_list = []
     ## Cleanup temp dir, we recomend you download/unzip your subs in temp 
folder and
@@ -188,8 +185,6 @@ def get_params():
 
 params = get_params()
 
-print params
-
 if params['action'] == 'search':
     item = {}
     item['temp'] = False
@@ -234,4 +229,4 @@ elif params['action'] == 'download':
         listitem = xbmcgui.ListItem(label=sub)
         xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=sub, 
listitem=listitem, isFolder=False)
 
-xbmcplugin.endOfDirectory(int(sys.argv[1]))  ## send end of directory to XBMC
\ No newline at end of file
+xbmcplugin.endOfDirectory(int(sys.argv[1]))  ## send end of directory to XBMC

-----------------------------------------------------------------------

Summary of changes:
 service.subtitles.napiprojekt/addon.xml            |    2 +-
 service.subtitles.napiprojekt/changelog.txt        |    5 ++++-
 .../resources/language/English/strings.po          |    2 +-
 service.subtitles.napiprojekt/service.py           |   19 +++++++------------
 4 files changed, 13 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to