The branch, frodo has been updated
       via  ae5173cc2c2e33f32a2c065fcd132fe8b9df5912 (commit)
      from  1912d71db9b5440f12626920d2dac58ead870da1 (commit)

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

commit ae5173cc2c2e33f32a2c065fcd132fe8b9df5912
Author: Martijn Kaijser <[email protected]>
Date:   Sat May 25 20:55:25 2013 +0200

    [script.randomandlastitems] 2.1.5

diff --git a/script.randomandlastitems/README.txt 
b/script.randomandlastitems/README.txt
index 8de6765..a79b8b8 100644
--- a/script.randomandlastitems/README.txt
+++ b/script.randomandlastitems/README.txt
@@ -95,25 +95,27 @@ Properties return to Home window (id 10000) :
 %s.%d.Art(tvshow.banner)
 %s.%d.Art(tvshow.clearlogo)
 %s.%d.Art(tvshow.clearart)
-%s.%d.Art(tvshow.landscape)"
-%s.%d.Art(fanart)"
-%s.%d.Art(poster)"
-%s.%d.Art(banner)"
-%s.%d.Art(clearlogo)"
-%s.%d.Art(clearart)"
-%s.%d.Art(landscape)"
-%s.%d.Resume"
-%s.%d.PercentPlayed"
-%s.%d.File"
-%s.%d.MPAA"
-%s.%d.Studio"
-%s.%d.Path"
+%s.%d.Art(tvshow.landscape)
+%s.%d.Art(fanart)
+%s.%d.Art(poster)
+%s.%d.Art(banner)
+%s.%d.Art(clearlogo)
+%s.%d.Art(clearart)
+%s.%d.Art(landscape)
+%s.%d.Resume
+%s.%d.Watched
+%s.%d.Runtime
+%s.%d.PercentPlayed
+%s.%d.File
+%s.%d.MPAA
+%s.%d.Studio
+%s.%d.Path
 %s.%d.Play
-%s.%d.VideoCodec"
-%s.%d.VideoResolution"
-%s.%d.VideoAspect"
-%s.%d.AudioCodec"
-%s.%d.AudioChannels"
+%s.%d.VideoCodec
+%s.%d.VideoResolution
+%s.%d.VideoAspect
+%s.%d.AudioCodec
+%s.%d.AudioChannels
 
 * type=Music
 
diff --git a/script.randomandlastitems/addon.xml 
b/script.randomandlastitems/addon.xml
index 46f0852..2353ce3 100644
--- a/script.randomandlastitems/addon.xml
+++ b/script.randomandlastitems/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.randomandlastitems" name="Random and Last items script" 
version="2.1.4" provider-name="MikeBZH44|Martijn|`Black">
+<addon id="script.randomandlastitems" name="Random and Last items script" 
version="2.1.5" provider-name="MikeBZH44|Martijn|`Black">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
         <import addon="xbmc.json" version="6.0.0"/>
diff --git a/script.randomandlastitems/changelog.txt 
b/script.randomandlastitems/changelog.txt
index a42ebc8..14e05c2 100644
--- a/script.randomandlastitems/changelog.txt
+++ b/script.randomandlastitems/changelog.txt
@@ -1,3 +1,6 @@
+v2.1.5
+- Add %s.%d.Watched property for episodes or TV shows
+
 v2.1.4
 - Add %s.%d.Runtime property for episodes or TV shows
 - Add new method 'Playlist' which keeps the playlist order
diff --git a/script.randomandlastitems/randomandlastitems.py 
b/script.randomandlastitems/randomandlastitems.py
index e44c179..250015e 100644
--- a/script.randomandlastitems/randomandlastitems.py
+++ b/script.randomandlastitems/randomandlastitems.py
@@ -74,11 +74,13 @@ def _watchedOrResume ( _total, _watched, _unwatched, 
_result, _file ):
     global UNWATCHED
     _total += 1
     _playcount = _file['playcount']
-    if RESUME == 'True':
-        _resume = _file['resume']['position']
+    _resume = _file['resume']['position']
+    # Add Watched flag and counter for episodes
     if _playcount == 0:
+        _file['watched']='False'
         _unwatched += 1
     else:
+        _file['watched']='True'
         _watched += 1
     if (UNWATCHED == 'False' and RESUME == 'False') or (UNWATCHED == 'True' 
and _playcount == 0) or (RESUME == 'True' and _resume != 0) and 
_file.get('dateadded'):
         _result.append(_file)
@@ -561,6 +563,7 @@ def _setEpisodeProperties ( _episode, _count ):
         _setProperty("%s.%d.Art(clearart)"         % ( PROPERTY, _count ), 
art.get('tvshow.clearart',''))
         _setProperty("%s.%d.Art(landscape)"        % ( PROPERTY, _count ), 
art.get('tvshow.landscape',''))
         _setProperty("%s.%d.Resume"                % ( PROPERTY, _count ), 
resume)
+        _setProperty("%s.%d.Watched"               % ( PROPERTY, _count ), 
_episode['watched'])
         _setProperty("%s.%d.Runtime"               % ( PROPERTY, _count ), 
runtime)
         _setProperty("%s.%d.PercentPlayed"         % ( PROPERTY, _count ), 
played)
         _setProperty("%s.%d.File"                  % ( PROPERTY, _count ), 
_episode['file'])

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

Summary of changes:
 script.randomandlastitems/README.txt            |   38 ++++++++++++-----------
 script.randomandlastitems/addon.xml             |    2 +-
 script.randomandlastitems/changelog.txt         |    3 ++
 script.randomandlastitems/randomandlastitems.py |    7 +++-
 4 files changed, 29 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to