The branch, dharma has been updated
via b8f35a2031c8e11cb4647ab689b07db03025be86 (commit)
via 18afae3753bdcc6dbddc3e61b9c4cf619f510007 (commit)
from edbbd2ff17f72ada324b6eaf91d01e4ee48ac2b6 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=b8f35a2031c8e11cb4647ab689b07db03025be86
commit b8f35a2031c8e11cb4647ab689b07db03025be86
Author: amet <[email protected]>
Date: Wed Feb 23 10:49:51 2011 +0400
[script.recentlyadded] - v2.0.5:
- don't clear window properties when playing an album
diff --git a/script.recentlyadded/RecentlyAdded.py
b/script.recentlyadded/RecentlyAdded.py
index 04f5946..6413fca 100644
--- a/script.recentlyadded/RecentlyAdded.py
+++ b/script.recentlyadded/RecentlyAdded.py
@@ -67,8 +67,6 @@ class Main:
except:
# no params passed
params = {}
-
-
# set our preferences
print params
self.LIMIT = int( params.get( "limit", "5" ) )
@@ -91,18 +89,20 @@ class Main:
def __init__( self ):
# parse argv for any preferences
self._parse_argv()
- # clear properties
- self._clear_properties()
- # set any alarm
- self._set_alarm()
# format our records start and end
xbmc.executehttpapi( "SetResponseFormat()" )
xbmc.executehttpapi( "SetResponseFormat(OpenRecord,%s)" % (
"<record>", ) )
xbmc.executehttpapi( "SetResponseFormat(CloseRecord,%s)" % (
"</record>", ) )
- # fetch media info
+ # check if we were executed internally
print self.ALBUMID
- if self.ALBUMID: self._Play_Album( self.ALBUMID )
+ if self.ALBUMID:
+ self._Play_Album( self.ALBUMID )
else:
+ # clear properties
+ self._clear_properties()
+ # set any alarm
+ self._set_alarm()
+ # fetch media info
self._fetch_totals()
self._fetch_movie_info()
self._fetch_tvshow_info()
@@ -154,11 +154,9 @@ class Main:
tvshows_totals[ 2 ] += int( fields[ 26 ] ) # watched?
tvshows_totals[ 3 ] += int( fields[ 25 ] ) # number of
episodes watched
# sql statement for tv albums/songs totals
-
sql_totals = "select count(1), count(distinct strAlbum),
count(distinct strArtist) from songview"
totals_xml = xbmc.executehttpapi( "QueryMusicDatabase(%s)" %
quote_plus( sql_totals ), )
- music_totals = re.findall( "<field>(.+?)</field>", totals_xml,
re.DOTALL )
-
+ music_totals = re.findall( "<field>(.+?)</field>", totals_xml,
re.DOTALL )
# set properties
self.WINDOW.setProperty( "Movies.Count" , str( movies_totals[ 0 ] ) or
"" )
self.WINDOW.setProperty( "Movies.Watched" , str( movies_totals[ 1 ] )
or "" )
@@ -168,18 +166,15 @@ class Main:
self.WINDOW.setProperty( "Movies.LastWatchedRuntime" , movies_totals[
4 ] or "" )
self.WINDOW.setProperty( "Movies.LastWatchedGenre" , movies_totals[ 5
] or "" )
self.WINDOW.setProperty( "Movies.LastWatchedDate" , movies_totals[ 6 ]
or "" )
-
self.WINDOW.setProperty( "MusicVideos.Count" , mvideos_totals[ 0 ] or
"" )
self.WINDOW.setProperty( "MusicVideos.Watched" , mvideos_totals[ 1 ]
or "" )
self.WINDOW.setProperty( "MusicVideos.UnWatched" , str( int(
mvideos_totals[ 0 ] ) - int( mvideos_totals[ 1 ] ) ) or "" )
-
self.WINDOW.setProperty( "TVShows.Count" , str( tvshows_totals[ 0 ] )
or "" )
self.WINDOW.setProperty( "TVShows.Watched" , str( tvshows_totals[ 2 ]
) or "" )
self.WINDOW.setProperty( "TVShows.UnWatched" , str( tvshows_totals[ 0
] - tvshows_totals[ 2 ] ) or "" )
self.WINDOW.setProperty( "Episodes.Count" , str( tvshows_totals[ 1 ] )
or "" )
self.WINDOW.setProperty( "Episodes.Watched" , str( tvshows_totals[ 3 ]
) or "" )
self.WINDOW.setProperty( "Episodes.UnWatched" , str( tvshows_totals[ 1
] - tvshows_totals[ 3 ] ) or "" )
-
self.WINDOW.setProperty( "Music.SongsCount" , music_totals[ 0 ] or "" )
self.WINDOW.setProperty( "Music.AlbumsCount" , music_totals[ 1 ] or ""
)
self.WINDOW.setProperty( "Music.ArtistsCount" , music_totals[ 2 ] or
"" )
@@ -206,7 +201,6 @@ class Main:
# separate individual fields
fields = re.findall( "<field>(.*?)</field>", movie, re.DOTALL )
# set properties
-
self.WINDOW.setProperty( "LatestMovie.%d.Title" % ( count + 1, ),
fields[ 2 ] )
self.WINDOW.setProperty( "LatestMovie.%d.Rating" % ( count + 1, ),
fields[ 7 ] )
self.WINDOW.setProperty( "LatestMovie.%d.Year" % ( count + 1, ),
fields[ 9 ] )
@@ -352,6 +346,5 @@ class Main:
xbmc.PlayList(0).add (path, listitem )
xbmc.Player().play(playlist)
-
if ( __name__ == "__main__" ):
- Main()
\ No newline at end of file
+ Main()
diff --git a/script.recentlyadded/addon.xml b/script.recentlyadded/addon.xml
index 9e5c72c..9e29c20 100644
--- a/script.recentlyadded/addon.xml
+++ b/script.recentlyadded/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.recentlyadded"
name="Recently Added XBMC Script"
- version="2.0.4"
+ version="2.0.5"
provider-name="alex">
<requires>
<import addon="xbmc.python" version="1.0"/>
diff --git a/script.recentlyadded/changelog.txt
b/script.recentlyadded/changelog.txt
index 6bc5431..a9cc678 100644
--- a/script.recentlyadded/changelog.txt
+++ b/script.recentlyadded/changelog.txt
@@ -1,3 +1,6 @@
+v 2.0.5:
+- don't clear window properties when playing an album
+
v 2.0.4 (Ppic):
- add some corections for LatestSong fields
@@ -58,4 +61,4 @@ v 2.0.3 (Ppic):
<onclick>$INFO[Window.Property(LatestSong.1.Path)]</onclick>
<visible>Skin.HasSetting(PlayAlbums) +
!IsEmpty(Window.Property(LatestSong.1.Artist))</visible>
</item>
-
\ No newline at end of file
+
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=18afae3753bdcc6dbddc3e61b9c4cf619f510007
commit 18afae3753bdcc6dbddc3e61b9c4cf619f510007
Author: amet <[email protected]>
Date: Wed Feb 23 10:46:28 2011 +0400
[script.randomitems] -v 1.0.10:
- don't clear window properties when playing an album
- don't execute script.recentlyadded internally
diff --git a/script.randomitems/RandomItems.py
b/script.randomitems/RandomItems.py
index 96a9b24..eb45905 100644
--- a/script.randomitems/RandomItems.py
+++ b/script.randomitems/RandomItems.py
@@ -82,18 +82,23 @@ class Main:
def __init__( self ):
# parse argv for any preferences
self._parse_argv()
- # clear properties
- self._clear_properties()
- # set any alarm
- self._set_alarm()
# format our records start and end
xbmc.executehttpapi( "SetResponseFormat()" )
xbmc.executehttpapi( "SetResponseFormat(OpenRecord,%s)" % (
"<record>", ) )
xbmc.executehttpapi( "SetResponseFormat(CloseRecord,%s)" % (
"</record>", ) )
- # fetch media info
- self._fetch_movie_info()
- self._fetch_tvshow_info()
- self._fetch_music_info()
+ # check if we were executed internally
+ print self.ALBUMID
+ if self.ALBUMID:
+ self._Play_Album( self.ALBUMID )
+ else:
+ # clear properties
+ self._clear_properties()
+ # set any alarm
+ self._set_alarm()
+ # fetch media info
+ self._fetch_movie_info()
+ self._fetch_tvshow_info()
+ self._fetch_music_info()
def _fetch_movie_info( self ):
# set our unplayed query
@@ -194,7 +199,7 @@ class Main:
self.WINDOW.setProperty( "RandomSong.%d.Artist" % ( count
+ 1, ), fields[ 6 ] )
self.WINDOW.setProperty( "RandomSong.%d.Rating" % ( count
+ 1, ), fields[ 18 ] )
# Album Path (ID)
- path = 'XBMC.RunScript(script.recentlyadded,albumid=' +
fields[ 0 ] + ')'
+ path = 'XBMC.RunScript(script.randomitems,albumid=' +
fields[ 0 ] + ')'
self.WINDOW.setProperty( "RandomSong.%d.Path" % ( count +
1, ), path )
# get cache name of path to use for fanart
cache_name = xbmc.getCacheThumbName( fields[ 6 ] )
@@ -250,4 +255,4 @@ class Main:
xbmc.Player().play(playlist)
if ( __name__ == "__main__" ):
- Main()
\ No newline at end of file
+ Main()
diff --git a/script.randomitems/addon.xml b/script.randomitems/addon.xml
index 94a15d4..5bd9b17 100644
--- a/script.randomitems/addon.xml
+++ b/script.randomitems/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.randomitems" name="Random Items script" version="1.0.9"
provider-name="Hitcher">
+<addon id="script.randomitems" name="Random Items script" version="1.0.10"
provider-name="Hitcher">
<requires>
<import addon="xbmc.python" version="1.0"/>
</requires>
@@ -9,4 +9,4 @@
<description lang="en">Script to get Random Videos and Music
from the database.</description>
<platform>all</platform>
</extension>
-</addon>
+</addon>
-----------------------------------------------------------------------
Summary of changes:
script.randomitems/RandomItems.py | 25 +++++++++++++++----------
script.randomitems/addon.xml | 4 ++--
script.randomitems/changelog.txt | 3 +++
script.recentlyadded/RecentlyAdded.py | 27 ++++++++++-----------------
script.recentlyadded/addon.xml | 2 +-
script.recentlyadded/changelog.txt | 5 ++++-
6 files changed, 35 insertions(+), 31 deletions(-)
create mode 100644 script.randomitems/changelog.txt
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons