The branch, frodo has been updated
       via  f5f392f55710864bc4d99dfaa846f5f2c03a7968 (commit)
       via  2e02abe89c395f79c0de0d9c2c2a858e111c6451 (commit)
      from  c16a2155fdb8841d1159b601b6ba4caeb51b27f8 (commit)

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

commit f5f392f55710864bc4d99dfaa846f5f2c03a7968
Author: Martijn Kaijser <[email protected]>
Date:   Sun May 5 23:05:19 2013 +0200

    [service.watchdog] 0.7.5

diff --git a/service.watchdog/addon.xml b/service.watchdog/addon.xml
index d70e0f5..594ccc6 100644
--- a/service.watchdog/addon.xml
+++ b/service.watchdog/addon.xml
@@ -2,7 +2,7 @@
 <addon
     id="service.watchdog"
     name="Watchdog"
-    version="0.7.4"
+    version="0.7.5"
     provider-name="takoi">
   <requires>
     <import addon="xbmc.python"              version="2.1.0"/>
diff --git a/service.watchdog/changelog.txt b/service.watchdog/changelog.txt
index 19f8283..8fe3d8c 100644
--- a/service.watchdog/changelog.txt
+++ b/service.watchdog/changelog.txt
@@ -1,3 +1,6 @@
+[B]0.7.5[/B]
+- added option for forcing global scan on video sources. This is a workaround 
for a bug that cause XBMC to sometimes fail to recognize the newly added files
+
 [B]0.7.4[/B]
 - fixed encoding related regression affecting posix systems (OpenElec and 
other non-standard distributions)
 
diff --git a/service.watchdog/core/main.py b/service.watchdog/core/main.py
index 76d534e..38ebc24 100644
--- a/service.watchdog/core/main.py
+++ b/service.watchdog/core/main.py
@@ -38,9 +38,9 @@ WATCH_MUSIC = ADDON.getSetting('watchmusic') == 'true'
 DELAY = int("0"+ADDON.getSetting('delay')) or 1
 SHOW_NOTIFICATIONS = ADDON.getSetting('notifications') == 'true'
 PAUSE_ON_PLAYBACK = ADDON.getSetting('pauseonplayback') == 'true'
+FORCE_GLOBAL_SCAN = ADDON.getSetting('forceglobalscan') == 'true'
 EXTENSIONS = 
"|.nsv|.m4a|.flac|.aac|.strm|.pls|.rm|.rma|.mpa|.wav|.wma|.ogg|.mp3|.mp2|.m3u|.mod|.amf|.669|.dmf|.dsm|.far|.gdm|.imf|.it|.m15|.med|.okt|.s3m|.stm|.sfx|.ult|.uni|.xm|.sid|.ac3|.dts|.cue|.aif|.aiff|.wpl|.ape|.mac|.mpc|.mp+|.mpp|.shn|.zip|.rar|.wv|.nsf|.spc|.gym|.adx|.dsp|.adp|.ymf|.ast|.afc|.hps|.xsp|.xwav|.waa|.wvs|.wam|.gcm|.idsp|.mpdsp|.mss|.spt|.rsd|.mid|.kar|.sap|.cmc|.cmr|.dmc|.mpt|.mpd|.rmt|.tmc|.tm8|.tm2|.oga|.url|.pxml|.tta|.rss|.cm3|.cms|.dlt|.brstm|.wtv|.mka|.m4v|.3g2|.3gp|.nsv|.tp|.ts|.ty|.strm|.pls|.rm|.rmvb|.m3u|.ifo|.mov|.qt|.divx|.xvid|.bivx|.vob|.nrg|.img|.iso|.pva|.wmv|.asf|.asx|.ogm|.m2v|.avi|.bin|.dat|.mpg|.mpeg|.mp4|.mkv|.avc|.vp3|.svq3|.nuv|.viv|.dv|.fli|.flv|.rar|.001|.wpl|.zip|.vdr|.dvr-ms|.xsp|.mts|.m2t|.m2ts|.evo|.ogv|.sdp|.avs|.rec|.url|.pxml|.vc1|.h264|.rcv|.rss|.mpls|.webm|.bdmv|.wtv|.m4v|.3g2|.3gp|.nsv|.tp|.ts|.ty|.strm|.pls|.rm|.rmvb|.m3u|.m3u8|.ifo|.mov|.qt|.divx|.xvid|.bivx|.vob|.nrg|.img|.iso|.pva|.wmv|.asf|.asx|.ogm|.m2v|.avi|.bin|.dat|.mpg|.mpeg|.mp4|.mkv|.avc|.vp3|.svq3|.nuv|.viv|.dv|.fli|.flv|.rar|.001|.wpl|.zip|.vdr|.dvr-ms|.xsp|.mts|.m2t|.m2ts|.evo|.ogv|.sdp|.avs|.rec|.url|.pxml|.vc1|.h264|.rcv|.rss|.mpls|.webm|.bdmv|.wtv|"
 
-
 class XBMCActor(pykka.ThreadingActor):
   """ Messaging interface to xbmc's executebuiltin calls """
   def _xbmc_is_busy(self):
@@ -54,7 +54,10 @@ class XBMCActor(pykka.ThreadingActor):
     while self._xbmc_is_busy():
       pass
     log("scanning %s (%s)" % (path, library))
-    xbmc.executebuiltin("UpdateLibrary(%s,%s)" % (library, escape_param(path)))
+    if library == 'video' and FORCE_GLOBAL_SCAN:
+      xbmc.executebuiltin("UpdateLibrary(video)")
+    else:
+      xbmc.executebuiltin("UpdateLibrary(%s,%s)" % (library, 
escape_param(path)))
   
   def clean(self, library, path=None):
     """ Tell xbmc to clean. Returns immediately when scanning has started. """
@@ -190,6 +193,8 @@ def watch(library, xbmc_actor):
   sources = get_media_sources(library)
   log("%s sources %s" % (library, sources))
   for path in sources:
+    if xbmc.abortRequested:
+      break
     observer_cls = select_observer(path)
     if observer_cls:
       try:
@@ -218,7 +223,6 @@ def main():
     threads.extend(watch('video', xbmc_actor))
   if WATCH_MUSIC:
     threads.extend(watch('music', xbmc_actor))
-  
   while not xbmc.abortRequested:
     sleep(1)
   for th in threads:
diff --git a/service.watchdog/resources/language/English/strings.xml 
b/service.watchdog/resources/language/English/strings.xml
index e69c574..7114dd2 100644
--- a/service.watchdog/resources/language/English/strings.xml
+++ b/service.watchdog/resources/language/English/strings.xml
@@ -16,5 +16,8 @@
   <string id="30014">Depth 2 (Look 2 directories deep)</string>
   <string id="30015">Depth inf. (Look in every subdirectory)</string>
   <string id="30016">Pause on playback</string>
+  <string id="30017">Force global scan (fixes xbmc sometimes not picking up 
new tv episodes)</string>
+  <string id="30018">Note: You must restart XBMC or disable/re-enable 
Watchdog</string>
+  <string id="30019">for changes to take effect</string>
 </strings>
 
diff --git a/service.watchdog/resources/settings.xml 
b/service.watchdog/resources/settings.xml
index 81ec9df..f2588fb 100644
--- a/service.watchdog/resources/settings.xml
+++ b/service.watchdog/resources/settings.xml
@@ -6,10 +6,15 @@
     <setting label="30005" id="clean" type="bool" default="false"/>
     <setting label="30011" id="notifications" type="bool" default="true"/>
     <setting label="30016" id="pauseonplayback" type="bool" default="true"/>
+    <setting label="30018" type="lsep"/>
+    <setting label="30019" type="lsep"/>
   </category>
   <category label="30002">
     <setting label="30006" id="method" type="select" lvalues="30007|30008" 
default="0"/>
     <setting label="30012" id="pollingmethod" type="select" 
lvalues="30013|30014|30015" default="2"/>
     <setting label="30010" id="delay" type="number" default="1"/>
+    <setting label="30017" id="forceglobalscan" type="bool" default="false"/>
+    <setting label="30018" type="lsep"/>
+    <setting label="30019" type="lsep"/>
   </category>
 </settings>

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=2e02abe89c395f79c0de0d9c2c2a858e111c6451

commit 2e02abe89c395f79c0de0d9c2c2a858e111c6451
Author: Martijn Kaijser <[email protected]>
Date:   Sun May 5 23:03:56 2013 +0200

    [script.module.bigpictures] 1.1.1

diff --git a/script.module.bigpictures/addon.xml 
b/script.module.bigpictures/addon.xml
index f081405..4801907 100644
--- a/script.module.bigpictures/addon.xml
+++ b/script.module.bigpictures/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.module.bigpictures" name="The Big Pictures Scrapers" 
version="1.0.1" provider-name="Tristan Fischer ([email protected])">
+<addon id="script.module.bigpictures" name="The Big Pictures Scrapers" 
version="1.1.1" provider-name="Tristan Fischer ([email protected])">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
         <import addon="script.module.beautifulsoup" version="3.0.8"/>
diff --git a/script.module.bigpictures/changelog.txt 
b/script.module.bigpictures/changelog.txt
index 5cea0eb..d3815c9 100644
--- a/script.module.bigpictures/changelog.txt
+++ b/script.module.bigpictures/changelog.txt
@@ -1,4 +1,8 @@
-1.0.1
+1.1.1 (05.05.2013)
+ - added possibility to choose enabled scrapers
+
+1.0.1 (08.03.2013)
  - added temporary fix for new york times lens blog
-1.0.0
-- initial release
\ No newline at end of file
+
+1.0.0 (21.02.2013)
+- initial release
diff --git a/script.module.bigpictures/lib/scrapers.py 
b/script.module.bigpictures/lib/scrapers.py
index eb59bb8..38414de 100644
--- a/script.module.bigpictures/lib/scrapers.py
+++ b/script.module.bigpictures/lib/scrapers.py
@@ -24,6 +24,16 @@ from BeautifulSoup import BeautifulSoup
 
 import xbmc
 
+ALL_SCRAPERS = (
+    'TheBigPictures',
+    'AtlanticInFocus',
+    'SacBeeFrame',
+    'WallStreetJournal',
+    'TotallyCoolPix',
+    'TimeLightbox',
+    'NewYorkTimesLens',
+)
+
 
 class BasePlugin(object):
 
@@ -76,6 +86,15 @@ class BasePlugin(object):
             self.__class__.__name__, msg
         ))
 
+    @classmethod
+    def get_scrapers(cls, name_list):
+        enabled_scrapers = []
+        for sub_class in cls.__subclasses__():
+            if sub_class.__name__ in name_list:
+                enabled_scrapers.append(sub_class)
+                print '%s in %s' % (sub_class.__name__, name_list)
+        return enabled_scrapers
+
 
 class TheBigPictures(BasePlugin):
 
@@ -425,15 +444,11 @@ class NewYorkTimesLens(BasePlugin):
         return txt.replace('&#x2019;s', "'")
 
 
-def get_scrapers():
-    ENABLED_SCRAPERS = (
-        TheBigPictures,
-        AtlanticInFocus,
-        SacBeeFrame,
-        WallStreetJournal,
-        TotallyCoolPix,
-        TimeLightbox,
-        NewYorkTimesLens,
-    )
-    scrapers = [scraper(i) for i, scraper in enumerate(ENABLED_SCRAPERS)]
+def get_scrapers(enabled_scrapers=None):
+    if enabled_scrapers is None:
+        enabled_scrapers = ALL_SCRAPERS
+    scrapers = [
+        scraper(i) for i, scraper
+        in enumerate(BasePlugin.get_scrapers(enabled_scrapers))
+    ]
     return scrapers
diff --git a/script.module.bigpictures/lib/thebigpictures.py 
b/script.module.bigpictures/lib/thebigpictures.py
index b38db8d..881a786 100644
--- a/script.module.bigpictures/lib/thebigpictures.py
+++ b/script.module.bigpictures/lib/thebigpictures.py
@@ -18,16 +18,16 @@
 #
 
 import random
-import scrapers
+from scrapers import ALL_SCRAPERS, get_scrapers
 
 import xbmc
 
 
 class ScraperManager(object):
 
-    def __init__(self):
-        self.log('__init__')
-        self._scrapers = scrapers.get_scrapers()
+    def __init__(self, enabled_scrapers=None):
+        self.log('__init__ with enabled_scrapers: %s' % enabled_scrapers)
+        self._scrapers = get_scrapers(enabled_scrapers)
         self._current_index = 0
         self._num_scrapers = len(self._scrapers)
 

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

Summary of changes:
 script.module.bigpictures/addon.xml                |    2 +-
 script.module.bigpictures/changelog.txt            |   10 ++++--
 script.module.bigpictures/lib/scrapers.py          |   37 ++++++++++++++------
 script.module.bigpictures/lib/thebigpictures.py    |    8 ++--
 service.watchdog/addon.xml                         |    2 +-
 service.watchdog/changelog.txt                     |    3 ++
 service.watchdog/core/main.py                      |   10 ++++--
 .../resources/language/English/strings.xml         |    3 ++
 service.watchdog/resources/settings.xml            |    5 +++
 9 files changed, 57 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to