The branch, dharma has been updated
       via  1f29128441c35481474fbb3987811d70f7987812 (commit)
      from  ed8138f53c2be6cb29c41e9c05ec44b960009963 (commit)

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

commit 1f29128441c35481474fbb3987811d70f7987812
Author: amet <[email protected]>
Date:   Thu Jan 20 12:56:51 2011 +0400

    [script.recentlyadded] -v 2.0.4
    
    - added: corections for LatestSong fields

diff --git a/script.recentlyadded/RecentlyAdded.py 
b/script.recentlyadded/RecentlyAdded.py
index 868b1e1..04f5946 100644
--- a/script.recentlyadded/RecentlyAdded.py
+++ b/script.recentlyadded/RecentlyAdded.py
@@ -45,6 +45,7 @@ class Main:
             self.WINDOW.clearProperty( "LatestMovie.%d.Title" % ( count + 1, ) 
)
             self.WINDOW.clearProperty( "LatestEpisode.%d.ShowTitle" % ( count 
+ 1, ) )
             self.WINDOW.clearProperty( "LatestSong.%d.Title" % ( count + 1, ) )
+            self.WINDOW.clearProperty( "LatestSong.%d.Album" % ( count + 1, ) )
 
     def _get_media( self, path, file ):
         # set default values
@@ -127,10 +128,10 @@ class Main:
             movies_totals[ 0 ] += int( fields[ 0 ] )
             movies_totals[ 1 ] += int( fields[ 1 ] )
             if ( fields[ 29 ] ):
-                movies_totals[ 2 ] = fields[ 3 ] # title
-                movies_totals[ 3 ] = fields[ 10 ] # year
-                movies_totals[ 4 ] = fields[ 14 ] # runningtime
-                movies_totals[ 5 ] = fields[ 17 ] # genre
+                movies_totals[ 2 ] = fields[ 4 ] # title
+                movies_totals[ 3 ] = fields[ 11 ] # year
+                movies_totals[ 4 ] = fields[ 15 ] # runningtime
+                movies_totals[ 5 ] = fields[ 18 ] # genre
                 movies_totals[ 6 ] = "" # last watched
                 date = fields[ 29 ].split( " " )[ 0 ].split( "-" )
                 movies_totals[ 6 ] = datetime.date( int( date[ 0 ] ), int( 
date[ 1 ] ), int( date[ 2 ] ) ).strftime( date_format ) # last played
@@ -286,10 +287,9 @@ class Main:
                     # separate individual fields
                     fields = re.findall( "<field>(.*?)</field>", item, 
re.DOTALL )
                     # set properties
-                    self.WINDOW.setProperty( "LatestSong.%d.Title" % ( count + 
1, ), fields[ 3 ] )
+                    self.WINDOW.setProperty( "LatestSong.%d.Title" % ( count + 
1, ), fields[ 1 ] )
                     self.WINDOW.setProperty( "LatestSong.%d.Year" % ( count + 
1, ), fields[ 8 ] )
                     self.WINDOW.setProperty( "LatestSong.%d.Artist" % ( count 
+ 1, ), fields[ 6 ] )
-                    self.WINDOW.setProperty( "LatestSong.%d.Album" % ( count + 
1, ), fields[ 1 ] )
                     self.WINDOW.setProperty( "LatestSong.%d.Rating" % ( count 
+ 1, ), fields[ 18 ] )
                     # Album Path  (ID)
                     path = 'XBMC.RunScript(script.recentlyadded,albumid=' + 
fields[ 0 ] + ')'
@@ -354,4 +354,4 @@ class Main:
 
 
 if ( __name__ == "__main__" ):
-    Main()
+    Main()
\ No newline at end of file
diff --git a/script.recentlyadded/addon.xml b/script.recentlyadded/addon.xml
index 5a96c91..9e5c72c 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.3"
+       version="2.0.4"
        provider-name="alex">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/script.recentlyadded/changelog.txt 
b/script.recentlyadded/changelog.txt
index 8803ad1..6bc5431 100644
--- a/script.recentlyadded/changelog.txt
+++ b/script.recentlyadded/changelog.txt
@@ -1,3 +1,6 @@
+v 2.0.4 (Ppic):
+- add some corections for LatestSong fields
+
 v 2.0.3 (Ppic):
 - restored album function (clic on random or recently added album will play 
the full album)
   TO SKINNERS: the "playmedia" isn't needed for album, instead of that, 
"LatestSong.%d.Path" will be filled with command to run the script with 
albumid, then the script will make a playlist with all song of the album and 
play it ;)

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

Summary of changes:
 script.recentlyadded/RecentlyAdded.py |   14 +++++++-------
 script.recentlyadded/addon.xml        |    2 +-
 script.recentlyadded/changelog.txt    |    3 +++
 3 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to