The branch, eden has been updated
via 38f24cb252e1fb25fa388f3c32c780a9f0452379 (commit)
via 5e5d45e0779dd8c6a544291181651a6770d82257 (commit)
from 78e8d79540075bca3ae43b3ddac58f54c66e6856 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=38f24cb252e1fb25fa388f3c32c780a9f0452379
commit 38f24cb252e1fb25fa388f3c32c780a9f0452379
Author: amet <[email protected]>
Date: Sun Oct 7 12:07:08 2012 +0400
[script.xbmc.subtitles] -v 3.4.0
- New service Pipocas.tv, thx highlandr
- Pipocas.tv and LegendasDivx.com both with pt-pt and pt-br, thx highlandr
- [fix] crash - check if temp folder exists before trying to create it
- [fix] crash - create "Subs" folder using xbmcvfs.mkdir instead of mkdirs
that is only available on Frodo
diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index 0444068..8b9f987 100755
--- a/script.xbmc.subtitles/addon.xml
+++ b/script.xbmc.subtitles/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmc.subtitles"
name="XBMC Subtitles"
- version="3.3.5"
+ version="3.4.0"
provider-name="amet, mr_blobby">
<requires>
<import addon="xbmc.python" version="2.0"/>
diff --git a/script.xbmc.subtitles/changelog.txt
b/script.xbmc.subtitles/changelog.txt
index 1cd72a0..5f8abc1 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,9 @@
+3.4.0
+- New service Pipocas.tv, thx highlandr
+- Pipocas.tv and LegendasDivx.com both with pt-pt and pt-br, thx highlandr
+- [fix] crash - check if temp folder exists before trying to create it
+- [fix] crash - create "Subs" folder using xbmcvfs.mkdir, instead of mkdirs
that is only available on Frodo
+
3.3.5
- [fix] of a previous [fix]
diff --git a/script.xbmc.subtitles/resources/lib/gui.py
b/script.xbmc.subtitles/resources/lib/gui.py
index 393a6a5..539672f 100644
--- a/script.xbmc.subtitles/resources/lib/gui.py
+++ b/script.xbmc.subtitles/resources/lib/gui.py
@@ -99,7 +99,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.sub_folder = dialog.browse( 0, _( 766 ), "files")
if not xbmcvfs.exists(self.sub_folder):
- xbmcvfs.mkdirs(self.sub_folder)
+ xbmcvfs.mkdir(self.sub_folder)
if self.episode.lower().find("s") > -1: #
Check if season is "Special"
self.season = "0" #
diff --git
a/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
b/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
index 12a7210..8e0e4cc 100644
--- a/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Service LegendasDivx.com version 0.2.4
+# Service LegendasDivx.com version 0.2.5
# Code based on Undertext service
# Coded by HiGhLaNdR@OLDSCHOOL
# Help by VaRaTRoN
@@ -8,6 +8,9 @@
# http://www.teknorage.com
# License: GPL v2
#
+# NEW on Service LegendasDivx.com v0.2.5:
+# Added PortugueseBrazilian. After a few requests the language is now
available.
+#
# NEW on Service LegendasDivx.com v0.2.4:
# Added uuid for better file handling, no more hangups.
#
@@ -122,6 +125,8 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, su
page = 1
if languageshort == "pt":
url = main_url +
"modules.php?name=Downloads&file=jz&d_op=search_next&order=&form_cat=28&page="
+ str(page) + "&query=" + urllib.quote_plus(searchstring)
+ if languageshort == "pb":
+ url = main_url +
"modules.php?name=Downloads&file=jz&d_op=search_next&order=&form_cat=29&page="
+ str(page) + "&query=" + urllib.quote_plus(searchstring)
content = geturl(url)
log( __name__ ,"%s Getting '%s' subs ..." % (debug_pretext,
languageshort))
@@ -181,7 +186,10 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, su
filename = filename + " " + "(" + movieyear + ")" + "
" + hits + "Hits" + " - " + desc
subtitles_list.append({'rating': str(downloads),
'no_files': no_files, 'filename': filename, 'desc': desc, 'sync': sync, 'hits'
: hits, 'id': id, 'language_flag': 'flags/' + languageshort + '.gif',
'language_name': languagelong})
page = page + 1
- url = main_url +
"modules.php?name=Downloads&file=jz&d_op=search_next&order=&form_cat=28&page="
+ str(page) + "&query=" + urllib.quote_plus(searchstring)
+ if languageshort == "pt":
+ url = main_url +
"modules.php?name=Downloads&file=jz&d_op=search_next&order=&form_cat=28&page="
+ str(page) + "&query=" + urllib.quote_plus(searchstring)
+ if languageshort == "pb":
+ url = main_url +
"modules.php?name=Downloads&file=jz&d_op=search_next&order=&form_cat=29&page="
+ str(page) + "&query=" + urllib.quote_plus(searchstring)
content = geturl(url)
if subtitles_list != []:
@@ -268,11 +276,28 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
elif string.lower(lang2) == "portuguese": portuguese = 2
elif string.lower(lang3) == "portuguese": portuguese = 3
- getallsubs(searchstring, "pt", "Portuguese", file_original_path,
subtitles_list, searchstring_notclean)
-
- if portuguese == 0:
- msg = "Won't work, LegendasDivx is only for Portuguese
subtitles!"
+ portuguesebrazil = 0
+ if string.lower(lang1) == "portuguesebrazil": portuguesebrazil = 1
+ elif string.lower(lang2) == "portuguesebrazil": portuguesebrazil = 2
+ elif string.lower(lang3) == "portuguesebrazil": portuguesebrazil = 3
+ if ((portuguese > 0) and (portuguesebrazil == 0)):
+ getallsubs(searchstring, "pt", "Portuguese",
file_original_path, subtitles_list, searchstring_notclean)
+
+ if ((portuguesebrazil > 0) and (portuguese == 0)):
+ getallsubs(searchstring, "pb", "PortugueseBrazil",
file_original_path, subtitles_list, searchstring_notclean)
+
+ if ((portuguese > 0) and (portuguesebrazil > 0) and (portuguese <
portuguesebrazil)):
+ getallsubs(searchstring, "pt", "Portuguese",
file_original_path, subtitles_list, searchstring_notclean)
+ getallsubs(searchstring, "pb", "PortugueseBrazil",
file_original_path, subtitles_list, searchstring_notclean)
+
+ if ((portuguese > 0) and (portuguesebrazil > 0) and (portuguese >
portuguesebrazil)):
+ getallsubs(searchstring, "pb", "PortugueseBrazil",
file_original_path, subtitles_list, searchstring_notclean)
+ getallsubs(searchstring, "pt", "Portuguese",
file_original_path, subtitles_list, searchstring_notclean)
+
+ if ((portuguese == 0) and (portuguesebrazil == 0)):
+ msg = "Won't work, LegendasDivx.com is only for
Portuguese and Portuguese Brazil subtitles."
+
return subtitles_list, "", msg #standard output
def recursive_glob(treeroot, pattern):
@@ -306,8 +331,8 @@ def download_subtitles (subtitles_list, pos, zip_subs,
tmp_sub_dir, sub_folder,
d = resp1.read()
#Now you download the subtitles
language = subtitles_list[pos][ "language_name" ]
- if string.lower(language) == "portuguese":
- content =
opener.open('http://www.legendasdivx.com/modules.php?name=Downloads&d_op=getit&lid='
+ id + '&username=highlander')
+# if string.lower(language) == "portuguese" or string.lower(language) ==
"portuguesebrazilian":
+ content =
opener.open('http://www.legendasdivx.com/modules.php?name=Downloads&d_op=getit&lid='
+ id + '&username=highlander')
if content is not None:
header =
content.info()['Content-Disposition'].split('filename')[1].split('.')[-1].strip("\"")
diff --git a/script.xbmc.subtitles/resources/lib/utilities.py
b/script.xbmc.subtitles/resources/lib/utilities.py
index f2c1f29..a59aa39 100644
--- a/script.xbmc.subtitles/resources/lib/utilities.py
+++ b/script.xbmc.subtitles/resources/lib/utilities.py
@@ -172,8 +172,9 @@ def rem_files(directory):
shutil.rmtree(directory)
except:
pass
-
- os.makedirs(directory)
+
+ if not xbmcvfs.exists(directory):
+ os.makedirs(directory)
def copy_files( subtitle_file, file_path ):
subtitle_set = False
diff --git a/script.xbmc.subtitles/resources/settings.xml
b/script.xbmc.subtitles/resources/settings.xml
index 7cd1db8..3620657 100644
--- a/script.xbmc.subtitles/resources/settings.xml
+++ b/script.xbmc.subtitles/resources/settings.xml
@@ -38,6 +38,7 @@
<setting id="Ondertitel" type="bool" label="Ondertitel.com (Movies and
Dutch subs only)" default="false"/>
<setting id="OpenSubtitles" type="bool" label="OpenSubtitles.org"
default="true"/>
+ <setting id="Pipocas" type="bool" label="Pipocas.tv" default="false"/>
<setting id="Podnapisi" type="bool" label="Podnapisi.net"
default="true"/>
<setting id="PNuser" type="text" visible= "eq(-1,true)"
enable="eq(-1,true)" label="30104" default=""/>
<setting id="PNpass" type="text" option = "hidden" visible=
"eq(-2,true)" enable="eq(-2,true)" label="30105" default=""/>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=5e5d45e0779dd8c6a544291181651a6770d82257
commit 5e5d45e0779dd8c6a544291181651a6770d82257
Author: amet <[email protected]>
Date: Sun Oct 7 12:04:42 2012 +0400
[script.module.xbmcswift2] -v1.2.0
- Addon name, id and filepath are now no longer necessary for Plugin(). They
will be discovered automatically.
- Plugin() now creates the storage folder
- Plugin.set_info now supports different info types
- Sort methods can be passed as strings to plugin.finish()
- Plugin caching has been renamed to storage and now works properly
diff --git a/script.module.xbmcswift2/addon.xml
b/script.module.xbmcswift2/addon.xml
index ec634ad..86b96fb 100644
--- a/script.module.xbmcswift2/addon.xml
+++ b/script.module.xbmcswift2/addon.xml
@@ -1,4 +1,4 @@
-<addon id="script.module.xbmcswift2" name="xbmcswift2" provider-name="Jonathan
Beluch (jbel)" version="1.1.1">
+<addon id="script.module.xbmcswift2" name="xbmcswift2" provider-name="Jonathan
Beluch (jbel)" version="1.2.0">
<requires>
<import addon="xbmc.python" version="2.0" />
</requires>
diff --git a/script.module.xbmcswift2/changelog.txt
b/script.module.xbmcswift2/changelog.txt
index 3b89881..bb8ccc2 100644
--- a/script.module.xbmcswift2/changelog.txt
+++ b/script.module.xbmcswift2/changelog.txt
@@ -2,6 +2,17 @@ CHANGES
=======
+Version 1.2
+-----------
+
+- Addon name, id and filepath are now no longer necessary for Plugin(). They
+ will be discovered automatically.
+- Plugin() now creates the storage folder
+- Plugin.set_info now supports different info types
+- Sort methods can be passed as strings to plugin.finish()
+- Plugin caching has been renamed to storage and now works properly
+
+
Version 1.1.1
-------------
diff --git a/script.module.xbmcswift2/lib/xbmcswift2/__init__.py
b/script.module.xbmcswift2/lib/xbmcswift2/__init__.py
index 73aebc4..8c411d1 100644
--- a/script.module.xbmcswift2/lib/xbmcswift2/__init__.py
+++ b/script.module.xbmcswift2/lib/xbmcswift2/__init__.py
@@ -13,13 +13,15 @@ from types import ModuleType
class module(ModuleType):
'''A wrapper class for a module used to override __getattr__. This class
will behave normally for any existing module attributes. For any attributes
- which do not existin in the wrapped module, a mock function will be
+ which do not existi in in the wrapped module, a mock function will be
returned. This function will also return itself enabling multiple mock
function calls.
'''
def __init__(self, wrapped=None):
self.wrapped = wrapped
+ if wrapped:
+ self.__dict__.update(wrapped.__dict__)
def __getattr__(self, name):
'''Returns any existing attr for the wrapped module or returns a mock
@@ -60,7 +62,7 @@ except ImportError:
xbmcvfs = module()
-from xbmcswift2.cache import Cache, TimedCache
+from xbmcswift2.storage import TimedStorage
from xbmcswift2.request import Request
from xbmcswift2.common import (xbmc_url, enum, clean_dict, pickle_dict,
unpickle_args, unpickle_dict, download_page, unhex)
diff --git a/script.module.xbmcswift2/lib/xbmcswift2/constants.py
b/script.module.xbmcswift2/lib/xbmcswift2/constants.py
index 58f59f5..0a25692 100644
--- a/script.module.xbmcswift2/lib/xbmcswift2/constants.py
+++ b/script.module.xbmcswift2/lib/xbmcswift2/constants.py
@@ -19,7 +19,16 @@ class SortMethod(object):
e.g. SORT_METHOD_TITLE becomes SortMethod.TITLE
'''
- pass
+
+ @classmethod
+ def from_string(cls, sort_method):
+ '''Returns the sort method specified. sort_method is case insensitive.
+ Will raise an AttributeError if the provided sort_method does not
+ exist.
+
+ >>> SortMethod.from_string('title')
+ '''
+ return getattr(cls, sort_method.upper())
PREFIX = 'SORT_METHOD_'
diff --git a/script.module.xbmcswift2/lib/xbmcswift2/listitem.py
b/script.module.xbmcswift2/lib/xbmcswift2/listitem.py
index 09c2676..fd6db23 100644
--- a/script.module.xbmcswift2/lib/xbmcswift2/listitem.py
+++ b/script.module.xbmcswift2/lib/xbmcswift2/listitem.py
@@ -181,7 +181,7 @@ class ListI ib/xbmcswift2/listitem.py em.py
b/script.module.xbmcswift2/lib/xbmcswift2/listitem.py t=""/>
b.quote_plus(searchstring) _flag': 'flags/' + languageshort + '.gif',
'language_name': languagelong}) ÿ ÐÛÿ k n]6+ 6
è è! è! Ûÿ Ûÿ xÔ^6+ Ûÿ n]6+
n]6+ Ûÿ `n]6+ ßÛÿ ÀÏî^6+ u
n]6+ Àî^6+ ØÄî^6+ ¨Éî^6+ *o]6+ xÔ^6+ Ûÿ ÐÛÿ k
n]6+ à! à! Ûÿ Ûÿ Hj^6+ àÛÿ n]6+
n]6+ Ûÿ `n]6+ ßÛÿ ÐÛÿ ÈÛÿ 8+]6+ p Ûÿ u
n]6+ *o]6+ àÛÿ °Ûÿ k
n]6+ G H I J K M N O P Ûÿ Ûÿ HUA^6+ Ûÿ n]6+
n]6+ Ûÿ 0Ïî^6+ u
n]6+ à^6+ ^6+ Àî^6+ ØÄî^6+ ¨Éî^6+ *o]6+ HUA^6+ Ûÿ ÀÛÿ k
n]6+ 8UA^6+ Ûÿ ðÛÿ k
n]6+ (UA^6+ Ûÿ Ûÿ k
n]6+ UA^6+ Ûÿ PÛÿ k n]6+ ¨Îî^6+ u
n]6+ ¨Éî^6+ ÐÛÿ Ø^6+ e
n]6+ ØÄî^6+ ðÛÿ yØ^6+ e n]6+ Àî^6+
Ûÿ ZØ^6+ e
n]6+ Ø^6+ à^6+ ^6+ Àî^6+ Øä^6+ ØÄî^6+ ¨Éî^6+ *o]6+ 8+]6+ Mê]6+ Ûÿ p^6+ ÐÛÿ Ûÿ k
n]6+ 5 6 7 8 : <