The branch, eden has been updated
via 9266f0cbf523d352ca5231fb5be01ad534d2b464 (commit)
via 9b08f96a45339e9a59f61a8f6c3ab8385d1f6a61 (commit)
from 809ce416ed7b69b1b531aad3119071c7203f60d9 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=9266f0cbf523d352ca5231fb5be01ad534d2b464
commit 9266f0cbf523d352ca5231fb5be01ad534d2b464
Author: amet <[email protected]>
Date: Sun Mar 11 10:53:37 2012 +0400
[script.xbmc.subtitles] -v 2.9.35
- Added Subtitles.gr service, lambda81
- fix the whole lot of utf-8 issues
- fix Titlovi
- add language and minor cleanup in utilities
- temp fix for rar files
- fixed Shooter service after decode utf-8 paths to internal encoding
diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index 47cd374..3e6d5ca 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="2.9.34"
+ version="2.9.35"
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 2220364..7e27cdb 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,11 @@
+2.9.35
+- Added Subtitles.gr service, lambda81
+- fix the whole lot of utf-8 issues
+- fix Titlovi
+- add language and minor cleanup in utilities
+- temp fix for rar files
+- fixed Shooter service after decode utf-8 paths to internal encoding
+
2.9.34
- Titlovi service rewrite using their API, this is now supported by them.
Thanks Nikola for API key and assistance
- cosmetics
diff --git a/script.xbmc.subtitles/resources/lib/gui.py
b/script.xbmc.subtitles/resources/lib/gui.py
index 68ea417..dde9a1d 100644
--- a/script.xbmc.subtitles/resources/lib/gui.py
+++ b/script.xbmc.subtitles/resources/lib/gui.py
@@ -1,4 +1,4 @@
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
import os
import re
@@ -61,7 +61,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.rar = False
self.stack = False
self.autoDownload = False
- movieFullPath = urllib.unquote(xbmc.Player().getPlayingFile())
# Full path of a playing file
+ movieFullPath =
urllib.unquote(xbmc.Player().getPlayingFile()).decode('utf-8')# Full path of a
playing file
path = __addon__.getSetting( "subfolder" ) == "true"
# True for movie folder
self.sub_folder = xbmc.translatePath(__addon__.getSetting(
"subfolderpath" )) # User specified subtitle folder
self.year = xbmc.getInfoLabel("VideoPlayer.Year")
# Year
@@ -85,7 +85,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
elif ( movieFullPath.find("rar://") > -1 ):
self.rar = True
- self.temp = True
+# self.temp = True
movieFullPath = movieFullPath[6:]
if path:
self.sub_folder = os.path.dirname(os.path.dirname( movieFullPath ))
@@ -187,13 +187,13 @@ class GUI( xbmcgui.WindowXMLDialog ):
log( __name__ ,"Services : [%s]" % self.service_list)
log( __name__ ,"Temp?: [%s]" % self.temp)
log( __name__ ,"Rar?: [%s]" % self.rar)
- log( __name__ ,"File Path: [%s]" % self.file_original_path)
+ log( __name__ ,"File Path: [%s]" %
self.file_original_path.encode('utf-8'))
log( __name__ ,"Year: [%s]" % str(self.year))
log( __name__ ,"Tv Show Title: [%s]" % self.tvshow)
log( __name__ ,"Tv Show Season: [%s]" % self.season)
log( __name__ ,"Tv Show Episode: [%s]" % self.episode)
log( __name__ ,"Movie/Episode Title: [%s]" % self.title)
- log( __name__ ,"Subtitle Folder: [%s]" % self.sub_folder)
+ log( __name__ ,"Subtitle Folder: [%s]" %
self.sub_folder.encode('utf-8'))
log( __name__ ,"Languages: [%s] [%s] [%s]" % (self.language_1,
self.language_2, self.language_3,))
log( __name__ ,"Parent Folder Search: [%s]" % self.parsearch)
log( __name__ ,"Stacked(CD1/CD2)?: [%s]" % self.stack)
@@ -297,7 +297,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
else:
file_name = "%s%s" % ( sub_name, sub_ext )
file_from = file.replace('\\','/')
- file_to = os.path.join(self.sub_folder, file_name).replace('\\','/')
+ file_to = os.path.join(self.sub_folder.encode("utf-8"),
file_name).replace('\\','/')
# Create a files list of from-to tuples so that multiple files may be
# copied (sub+idx etc')
files_list = [(file_from,file_to)]
@@ -307,10 +307,11 @@ class GUI( xbmcgui.WindowXMLDialog ):
log( __name__ ,"found .sub+.idx pair %s + %s" %
(file_from,file_from[:-3]+"idx"))
files_list.append((file_from[:-3]+"idx",file_to[:-3]+"idx"))
for cur_file_from, cur_file_to in files_list:
- subtitle_set,file_path = copy_files( cur_file_from, cur_file_to )
+ subtitle_set,file_path = copy_files( cur_file_from.encode("utf-8"),
cur_file_to.encode("utf-8") )
# Choose the last pair in the list, second item (destination file)
if subtitle_set:
- xbmc.Player().setSubtitles(files_list[-1][1])
+ subtitle = files_list[-1][1]
+ xbmc.Player().setSubtitles(subtitle.encode("utf-8"))
self.close()
else:
if gui:
@@ -359,19 +360,19 @@ class GUI( xbmcgui.WindowXMLDialog ):
for subName in self.stackPath:
if (re.split("(?x)(?i)\CD(\d)", zip_entry)[1]) ==
(re.split("(?x)(?i)\CD(\d)", urllib.unquote ( subName ))[1]):
subtitle_file, file_path =
self.create_name(zip_entry,urllib.unquote ( os.path.basename(subName[8:])
),subtitle_lang)
- subtitle_set,file_path = copy_files( subtitle_file,
file_path )
+ subtitle_set,file_path = copy_files(
subtitle_file.encode("utf-8"), file_path.encode("utf-8") )
if re.split("(?x)(?i)\CD(\d)", zip_entry)[1] == "1":
subToActivate = file_path
except:
subtitle_set = False
- else:
- subtitle_set,subToActivate = copy_files( subtitle_file,
file_path )
+ else:
+ subtitle_set,subToActivate = copy_files(
subtitle_file.encode("utf-8"), file_path.encode("utf-8") )
if not subtitle_set:
for zip_entry in files:
if os.path.splitext( zip_entry )[1] in exts:
subtitle_file, file_path =
self.create_name(zip_entry,sub_filename,subtitle_lang)
- subtitle_set,subToActivate = copy_files( subtitle_file, file_path
)
+ subtitle_set,subToActivate = copy_files(
subtitle_file.encode("utf-8"), file_path.encode("utf-8") )
if subtitle_set :
xbmc.Player().setSubtitles(subToActivate)
diff --git a/script.xbmc.subtitles/resources/lib/services/Shooter/service.py
b/script.xbmc.subtitles/resources/lib/services/Shooter/service.py
index 7b713dc..e056145 100644
--- a/script.xbmc.subtitles/resources/lib/services/Shooter/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Shooter/service.py
@@ -230,7 +230,7 @@ def download_subtitles (subtitles_list, pos, zip_subs,
tmp_sub_dir, sub_folder,
barename = subtitles_list[pos][ "filename" ].rsplit(".",1)[0]
language = subtitles_list[pos][ "language_name" ]
for file in subtitles_list[pos][ "filedata" ]:
- filename = os.path.join(tmp_sub_dir, ".".join([barename,
file.ExtName]))
+ filename = os.path.join(tmp_sub_dir, ".".join([barename,
file.ExtName]).decode("utf-8")).encode('utf-8')
fn = unicode(filename, 'utf-8')
open(fn,"wb").write(file.FileData)
if (file.ExtName in ["srt", "txt", "ssa", "smi", "sub"]):
diff --git a/script.xbmc.subtitles/resources/lib/services/Titlovi/service.py
b/script.xbmc.subtitles/resources/lib/services/Titlovi/service.py
index c0c4b5a..efca583 100644
--- a/script.xbmc.subtitles/resources/lib/services/Titlovi/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Titlovi/service.py
@@ -49,7 +49,10 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
if lang_full in languages:
sub_id = subtitle.getElementsByTagName("url")[0].firstChild.data
movie =
subtitle.getElementsByTagName("safeTitle")[0].firstChild.data
- filename = "%s - %s" % (movie,
subtitle.getElementsByTagName("release")[0].firstChild.data)
+ if subtitle.getElementsByTagName("release")[0].firstChild:
+ filename = "%s - %s" % (movie,
subtitle.getElementsByTagName("release")[0].firstChild.data)
+ else:
+ filename = movie
rating =
int(subtitle.getElementsByTagName("score")[0].firstChild.data)*2
flag_image = "flags/%s.gif" % lang
link = url_base % sub_id.split("-")[-1].replace("/","")
diff --git a/script.xbmc.subtitles/resources/lib/utilities.py
b/script.xbmc.subtitles/resources/lib/utilities.py
index 9dc6f69..0081dbf 100644
--- a/script.xbmc.subtitles/resources/lib/utilities.py
+++ b/script.xbmc.subtitles/resources/lib/utilities.py
@@ -10,6 +10,7 @@ import shutil
import xbmcgui
__scriptname__ = sys.modules[ "__main__" ].__scriptname__
+_ = sys.modules[ "__main__" ].__language__
LANGUAGES = (
@@ -115,7 +116,7 @@ def regex_tvshow(compare, file, sub = ""):
for regex in REGEX_EXPRESSIONS:
response_file = re.findall(regex, file)
if len(response_file) > 0 :
- print "Regex File Se: %s, Ep: %s," %
(str(response_file[0][0]),str(response_file[0][1]),)
+ log( __name__ , "Regex File Se: %s, Ep: %s," %
(str(response_file[0][0]),str(response_file[0][1]),) )
tvshow = 1
if not compare :
title = re.split(regex, file)[0]
@@ -161,9 +162,7 @@ def rem_files(directory):
try:
for root, dirs, files in os.walk(directory, topdown=False):
for items in dirs:
- print os.path.join(root, items)
shutil.rmtree(os.path.join(root, items), ignore_errors=True,
onerror=None)
- print files
for name in files:
os.remove(os.path.join(root, name))
except:
diff --git a/script.xbmc.subtitles/resources/settings.xml
b/script.xbmc.subtitles/resources/settings.xml
index 07ad983..08d455d 100644
--- a/script.xbmc.subtitles/resources/settings.xml
+++ b/script.xbmc.subtitles/resources/settings.xml
@@ -52,6 +52,7 @@
<setting id="Sublight" type="bool" label="Sublight.si" default="false"/>
<setting id="Subscene" type="bool" label="Subscene.com" default="false"/>
<setting id="Subscenter" type="bool" label="Subscenter.org"
default="false"/>
+ <setting id="SubtitlesGr" type="bool" label="Subtitles.gr (Greek subs
only)" default="false"/>
<setting id="SuperSubtitles" type="bool" label="SuperSubtitles
(Feliratok.info)" default="false"/>
<setting id="Swesub" type="bool" label="Swesub.nu" default="false"/>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=9b08f96a45339e9a59f61a8f6c3ab8385d1f6a61
commit 9b08f96a45339e9a59f61a8f6c3ab8385d1f6a61
Author: amet <[email protected]>
Date: Sun Mar 11 10:50:02 2012 +0400
[service.libraryautoupdate] -v0.5.6
Version 0.5.5
-changed cron expression library. Croniter will allow iterating through the
cron expressions and show the next update time
-added methods to display a "countdown" when the next update will occur,
and settings to display notifications
Version 0.5.6
-updated the manual run interface to include information about when the
updater will run again
diff --git a/service.libraryautoupdate/README.txt
b/service.libraryautoupdate/README.txt
index e39c79d..000f4d5 100644
--- a/service.libraryautoupdate/README.txt
+++ b/service.libraryautoupdate/README.txt
@@ -2,9 +2,16 @@ The XBMC Library Updater will update your music and/or video
libraries according
Thanks to pkscuot for several small tweaks to this addon!
-A note on Timers:
+General Settings:
-Standard Timer - specify an interval to run the library update process. It
will be launched every X hours within the interval unless on of the conditions
specified by you as been met (don't run during media playback, etc) in which
case it will be run at the next earliest convenience.
+Update video - updates video library
+update music - updates music library
+Show Notifications - shows notifications when the updater will run again
+Run During Playback - should the addon run when you are playing media
+
+Timers:
+
+Standard Timer - specify an interval to run the library update process. It
will be launched every X hours within the interval unless on of the conditions
specified by you as been met (don't run during media playback, etc) in which
case it will be run at the next earliest convenience. There is also a startup
delay that can be used on XBMC startup
Advanced Timer - specify a cron expression to use as an interval for the
update process. By default the expression will run at the top of every hour.
More advanced expressions can be configured such as:
@@ -15,8 +22,9 @@ Advanced Timer - specify a cron expression to use as an
interval for the update
| | | | .---- day of week (0 - 6) or Sun(0 or 7), Mon(1) ... Sat(6)
V V V V V
* * * * *
+Example:
+ 0 */5 ** 1-5 - runs update every five hours Monday - Friday
+ 0,15,30,45 0,15-18 * * * - runs update every quarter hour during
midnight hour and 3pm-6pm
-0 */5 * * 1-5 - every five hours Monday - Friday
-0,15,30,45 0,15-18 * * * - every quarter hour during the midnight hour and 3pm
- 6pm
-Read up on cron for more information on how to create these expressions
\ No newline at end of file
+Read up on cron (http://en.wikipedia.org/wiki/Cron) for more information on
how to create these expressions
\ No newline at end of file
diff --git a/service.libraryautoupdate/addon.xml
b/service.libraryautoupdate/addon.xml
index d33ad62..a598b63 100644
--- a/service.libraryautoupdate/addon.xml
+++ b/service.libraryautoupdate/addon.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.libraryautoupdate"
- name="XBMC Library Auto Update" version="0.5.4" provider-name="robweber">
+ name="XBMC Library Auto Update" version="0.5.6" provider-name="robweber">
<requires>
<import addon="xbmc.python" version="2.0"/>
</requires>
diff --git a/service.libraryautoupdate/changelog.txt
b/service.libraryautoupdate/changelog.txt
index f0ca499..2d9a1da 100644
--- a/service.libraryautoupdate/changelog.txt
+++ b/service.libraryautoupdate/changelog.txt
@@ -44,4 +44,14 @@
[B]Version 0.5.4[/B]
- -fixed issue with startup timer, thanks stevenD
\ No newline at end of file
+ -fixed issue with startup timer, thanks stevenD
+
+[B]Version 0.5.5[/B]
+
+-changed cron expression library. Croniter will allow iterating through the
cron expressions and show the next update time
+
+-added methods to display a "countdown" when the next update will occur, and
settings to display notifications
+
+[B]Version 0.5.6[/B]
+
+-updated the manual run interface to include information about when the
updater will run again
\ No newline at end of file
diff --git a/service.libraryautoupdate/manual.py
b/service.libraryautoupdate/manual.py
index a3270b7..a777fbc 100644
--- a/service.libraryautoupdate/manual.py
+++ b/service.libraryautoupdate/manual.py
@@ -1,6 +1,17 @@
import xbmc
+import xbmcaddon
+import xbmcgui
from service import AutoUpdater
+addon_id = "service.libraryautoupdate"
+Addon = xbmcaddon.Addon(addon_id)
-#run the program
-xbmc.log("Update Library Manual Run...")
-AutoUpdater().runUpdates()
+autoUpdate = AutoUpdater()
+
+nextRun = autoUpdate.calcNextRun()
+#check if we should run updates
+runUpdate =
xbmcgui.Dialog().yesno(Addon.getLocalizedString(30010),Addon.getLocalizedString(30011)
+ nextRun,Addon.getLocalizedString(30012))
+
+if(runUpdate):
+ #run the program
+ xbmc.log("Update Library Manual Run...")
+ autoUpdate.runUpdates()
diff --git a/service.libraryautoupdate/resources/language/English/strings.xml
b/service.libraryautoupdate/resources/language/English/strings.xml
index ddfec69..afb8a5f 100644
--- a/service.libraryautoupdate/resources/language/English/strings.xml
+++ b/service.libraryautoupdate/resources/language/English/strings.xml
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<strings>
- <!-- Plugin settings -->
+ <string id="30010">XBMC Library Auto Update</string>
<string id="30000">General</string>
<string id="30001">Amount of time between updates (hours)</string>
<string id="30002">Update Video Library</string>
<string id="30003">Update Music Library</string>
<string id="30004">Startup Delay (minutes)</string>
<string id="30008">Run during playback</string>
+ <string id="30009">Show Notifications</string>
<string id="30005">Timers</string>
<string id="30006">Used Advanced Timer</string>
<string id="30007">Cron Expression</string>
+
+ <!-- gui -->
+ <string id="30011">Update will run again </string>
+ <string id="30012">Do you wish to manually run an update?</string>
</strings>
diff --git a/service.libraryautoupdate/resources/settings.xml
b/service.libraryautoupdate/resources/settings.xml
index 4afbfda..86fe273 100644
--- a/service.libraryautoupdate/resources/settings.xml
+++ b/service.libraryautoupdate/resources/settings.xml
@@ -3,6 +3,7 @@
<category id="general" label="30000">
<setting id="update_video" type="bool" label="30002" default="true"
/>
<setting id="update_music" type="bool" label="30003"
default="false" />
+ <setting id="notify_next_run" type="bool" label="30009"
default="true" />
<setting id="run_during_playback" type="bool" label="30008"
default="false" />
</category>
<category id="advanced" label="30005">
diff --git a/service.libraryautoupdate/service.py
b/service.libraryautoupdate/service.py
index d36fcb9..d640c4a 100644
--- a/service.libraryautoupdate/service.py
+++ b/service.libraryautoupdate/service.py
@@ -1,15 +1,18 @@
import time
+from datetime import datetime
import xbmc
import xbmcaddon
import os
-from cronex import CronExpression
+from resources.lib.croniter import croniter
class AutoUpdater:
addon_id = "service.libraryautoupdate"
Addon = xbmcaddon.Addon(addon_id)
datadir = Addon.getAddonInfo('profile')
+ addondir = Addon.getAddonInfo('path')
sleep_time = 10
forceUpdate = False
+ previousTimer = 0
#setup the timer amounts
timer_amounts = {}
@@ -19,13 +22,15 @@ class AutoUpdater:
timer_amounts['3'] = 10
timer_amounts['4'] = 15
timer_amounts['5'] = 24
+
+ def __init__(self):
+ self.readLastRun()
def runProgram(self):
-
+
if(self.Addon.getSetting('use_advanced_timer') == 'false'):
#check if we should delay the first run
if(int(self.Addon.getSetting("startup_delay")) != 0):
- self.readLastRun()
#check if we would have run an update anyway
if(time.time() >= self.last_run +
(self.timer_amounts[self.Addon.getSetting('timer_amount')] * 60 * 60)):
@@ -34,9 +39,17 @@ class AutoUpdater:
self.writeLastRun()
self.log("Setting delay at " +
self.Addon.getSetting("startup_delay") + " minute")
+ self.showNotify(self.last_run +
(self.timer_amounts[self.Addon.getSetting('timer_amount')] * 60 * 60))
+ self.currentTimer = self.Addon.getSetting('timer_amount')
+ else:
+ self.currentTimer = self.Addon.getSetting("cron_expression")
+ cronExp =
croniter(self.Addon.getSetting("cron_expression"),datetime.now())
+ self.showNotify(cronExp.get_next(float))
+
#run until XBMC quits
while(not xbmc.abortRequested):
-
+ self.checkTimer()
+
if(self.Addon.getSetting('use_advanced_timer') == 'true'):
self.runAdvanced()
else:
@@ -52,12 +65,13 @@ class AutoUpdater:
self.readLastRun()
#check if we should run an update
- if(now >= self.last_run +
(self.timer_amounts[self.Addon.getSetting('timer_amount')] * 60 * 60)):
+ if(now >= self.last_run + (self.timer_amounts[self.currentTimer] * 60
* 60)):
#make sure player isn't running
if(xbmc.Player().isPlaying() == False or
self.Addon.getSetting('run_during_playback') == 'true'):
if(self.scanRunning() == False):
self.runUpdates()
- self.log("will run again in " +
str(self.timer_amounts[self.Addon.getSetting("timer_amount")]) + " hours")
+ self.showNotify(self.last_run +
(self.timer_amounts[self.currentTimer] * 60 * 60))
+ self.log("will run again in " +
str(self.timer_amounts[self.currentTimer]) + " hours")
else:
self.log("Player is running, waiting until finished")
@@ -66,19 +80,22 @@ class AutoUpdater:
def runAdvanced(self):
self.readLastRun()
-
+ now = time.time()
+
#create the cron expression
- cron = CronExpression(self.Addon.getSetting("cron_expression") + "
XBMC_COMMAND")
-
+ cron = croniter(self.currentTimer,datetime.fromtimestamp(now - 60))
+ runCron = cron.get_next(float)
+
#check if we should run, and that we haven't already run the update
within the past minute - alternatively check that we shouldn't force an update
- structTime = time.localtime()
-
if((cron.check_trigger((structTime[0],structTime[1],structTime[2],structTime[3],structTime[4]))
and time.time() > self.last_run + 60) or self.forceUpdate):
+ if((runCron <= now and time.time() > self.last_run + 60) or
self.forceUpdate):
#make sure player isn't running
if(xbmc.Player().isPlaying() == False or
self.Addon.getSetting('run_during_playback') == 'true'):
self.forceUpdate = False
if(self.scanRunning() == False):
self.runUpdates()
- self.log("will run again according to: " +
self.Addon.getSetting("cron_expression"))
+ nextRun = cron.get_next(float)
+ self.showNotify(nextRun)
+ self.log("will run again in " + self.nextRun(nextRun))
else:
#force an update if this
@@ -133,6 +150,58 @@ class AutoUpdater:
f.write(str(self.last_run));
f.close();
+ def showNotify(self,timestamp):
+ #don't show anything if the update will happen now
+ if(timestamp > time.time() and
self.Addon.getSetting('notify_next_run') == 'true'):
+ self.log(self.addondir)
+ xbmc.executebuiltin("Notification(Library Auto Update,Next run: "
+ self.nextRun(timestamp) + ",4000," + xbmc.translatePath(self.addondir +
"/icon.png") + ")")
+
+ def calcNextRun(self):
+ if(self.Addon.getSetting('use_advanced_timer') == 'false'):
+ return self.nextRun(self.last_run +
(self.timer_amounts[self.Addon.getSetting('timer_amount')] * 60 * 60))
+ else:
+ cronExp =
croniter(self.Addon.getSetting("cron_expression"),datetime.now())
+ return self.nextRun(cronExp.get_next(float))
+
+
+ def nextRun(self,nextRun):
+ #compare now with next date
+ cronDiff = nextRun - time.time() + 60
+
+ if cronDiff < 0:
+ return ""
+
+ hours = int((cronDiff / 60) / 60)
+ minutes = int((cronDiff / 60) - hours * 60)
+
+ #we always have at least one minute
+ if minutes == 0:
+ minutes = 1
+
+ result = str(hours) + " h " + str(minutes) + " m"
+ if hours == 0:
+ result = str(minutes) + " m"
+ elif hours > 36:
+ #just show the date instead
+ result = datetime.fromtimestamp(nextRun).strftime('%m/%d %I:%M%p')
+ elif hours > 24:
+ days = int(hours / 24)
+ hours = hours - days * 24
+ result = str(days) + " d " + str(hours) + " h " + str(minutes) + "
m"
+
+ return result
+
+ def checkTimer(self):
+ if(self.Addon.getSetting('use_advanced_timer') == 'false'):
+ if self.Addon.getSetting('timer_amount') != self.currentTimer:
+ self.showNotify(self.last_run +
(self.timer_amounts[self.Addon.getSetting('timer_amount')] * 60 * 60))
+ self.currentTimer = self.Addon.getSetting('timer_amount')
+ else:
+ if self.Addon.getSetting("cron_expression") != self.currentTimer:
+ cronExp =
croniter(self.Addon.getSetting("cron_expression"),datetime.now())
+ self.showNotify(cronExp.get_next(float))
+ self.currentTimer = self.Addon.getSetting("cron_expression")
+
def log(self,message):
xbmc.log('service.libraryautoupdate: ' + message)
-----------------------------------------------------------------------
Summary of changes:
script.xbmc.subtitles/addon.xml | 2 +-
script.xbmc.subtitles/changelog.txt | 8 +
script.xbmc.subtitles/resources/lib/gui.py | 25 +-
.../resources/lib/services/Shooter/service.py | 2 +-
.../lib/services/SubtitlesGr}/__init__.py | 0
.../resources/lib/services/SubtitlesGr/logo.png | Bin 0 -> 10032 bytes
.../resources/lib/services/SubtitlesGr/service.py | 94 +++
.../resources/lib/services/Titlovi/service.py | 5 +-
script.xbmc.subtitles/resources/lib/utilities.py | 5 +-
script.xbmc.subtitles/resources/settings.xml | 1 +
service.libraryautoupdate/README.txt | 18 +-
service.libraryautoupdate/addon.xml | 2 +-
service.libraryautoupdate/changelog.txt | 12 +-
service.libraryautoupdate/cronex.py | 355 --------
service.libraryautoupdate/manual.py | 17 +-
.../resources}/__init__.py | 0
.../resources/language/English/strings.xml | 7 +-
.../resources/lib}/__init__.py | 0
.../resources/lib/croniter.py | 308 +++++++
.../resources/lib}/relativedelta.py | 862 ++++++++++----------
service.libraryautoupdate/resources/settings.xml | 1 +
service.libraryautoupdate/service.py | 93 ++-
22 files changed, 989 insertions(+), 828 deletions(-)
copy {script.cu.lyrics/resources/lib/scrapers =>
script.xbmc.subtitles/resources/lib/services/SubtitlesGr}/__init__.py (100%)
create mode 100644
script.xbmc.subtitles/resources/lib/services/SubtitlesGr/logo.png
create mode 100644
script.xbmc.subtitles/resources/lib/services/SubtitlesGr/service.py
delete mode 100644 service.libraryautoupdate/cronex.py
copy {script.cu.lyrics/resources/lib/scrapers =>
service.libraryautoupdate/resources}/__init__.py (100%)
copy {script.cu.lyrics/resources/lib/scrapers =>
service.libraryautoupdate/resources/lib}/__init__.py (100%)
create mode 100644 service.libraryautoupdate/resources/lib/croniter.py
copy {script.tv.show.next.aired/dateutil =>
service.libraryautoupdate/resources/lib}/relativedelta.py (97%)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons