• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 14
[RELEASE] RecentlyAdded Script (RecentlyAdded.py) Recently Added for Skins / Skinners
#61
ronie Wrote:yep, try the one from the T! svn:
http://code.google.com/p/transparency-xb...loads/list

that one is working fine on my end (requires xbmc r30369 or up).

I have tied that one on rev 30515 with the latest SVN of Transparency! Same error :/
Reply
#62
I installed SVN 30538 and now it works! Big Grin
Reply
#63
A couple of questions -

1) Can the VideoResolution (ie 480, 576, 540, 720, 1080) be added as I'd like to use that please.

2) Also the 'date added' would be helpful.


EDIT: Forget about the above I've been looking at the database and you can't get this info anyway.

3) Can this way of playing full albums be added to the official version -
CF2009 Wrote:one more thing i have just added to my script is the ability to play full albums from the Recently Added script (extras.py).

i'm not using unplayed or songs like yours but you can see how it works...

PHP Code:
# Current Working Directory
CWD os.getcwd() 
PHP Code:
def _fetch_music_infoself ):
        
# sql statement
        
if ( self.RANDOM_ORDER ):
            
sql_music "select * from albumview order by RANDOM() limit %d" % ( self.LIMIT, )
        else:
            
sql_music "select * from albumview order by idAlbum desc limit %d" % ( self.LIMIT, )
        
# query the database for recently added albums
        
music_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plussql_music ), )
        
# separate the records
        
items re.findall"<record>(.+?)</record>"music_xmlre.DOTALL )
        
# enumerate thru our records and set our properties
        
for countitem in enumerateitems ):
            
# separate individual fields
            
fields re.findall"<field>(.*?)</field>"itemre.DOTALL )
            
# set properties
            
self.WINDOW.setProperty"LatestSong.%d.Genre" % ( count 1, ), fields] )
            
self.WINDOW.setProperty"LatestSong.%d.Year" % ( count 1, ), fields] )
            
self.WINDOW.setProperty"LatestSong.%d.Artist" % ( count 1, ), fields] )
            
self.WINDOW.setProperty"LatestSong.%d.Album" % ( count 1, ), fields] )
            
self.WINDOW.setProperty"LatestSong.%d.Plot" % ( count 1, ), fields14 ] )
            
# Album Path  (ID)
            
path 'XBMC.RunScript(' CWD 'extras.py,albumid=' fields] + ')'
            
self.WINDOW.setProperty"LatestSong.%d.Path" % ( count 1, ), path )
            
# get cache name of path to use for fanart
            
cache_name xbmc.getCacheThumbNamefields] )
            
self.WINDOW.setProperty"LatestSong.%d.Fanart" % ( count 1, ), "special://profile/Thumbnails/Music/%s/%s" % ( "Fanart"cache_name, ) )
            
self.WINDOW.setProperty"LatestSong.%d.Thumb" % ( count 1, ), fields] )

    
def _Play_AlbumselfID ):
        
playlist=xbmc.PlayList(0)
        
playlist.clear()
        
# sql statements
        
sql_song "select * from songview where idAlbum='%s' order by iTrack " % ( ID )
        
# query the databases
        
songs_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plussql_song ), )
        
# separate the records
        
songs re.findall"<record>(.+?)</record>"songs_xmlre.DOTALL )
        
# enumerate thru our records and set our properties
        
for countmovie in enumeratesongs ):
            
# separate individual fields
            
fields re.findall"<field>(.*?)</field>"moviere.DOTALL )
            
# set album name
            
path fields22 ] + fields]
            
listitem ListItemfields] )
            
xbmc.PlayList(0).add (pathlistitem )
        
xbmc.Player().play(playlist)
        
xbmc.executebuiltin('XBMC.ActivateWindow(10500)'

Thanks.
Reply
#64
I'm getting an error message that the recentlyadded script had failed to run.
This happens every time I reboot. My install is a custom Ubuntu 10.04 64 bit with sources from the SVN PPA (Version XBMC-Pre 10.5 R31718) The problem can be seen in my xbmx.log around line number 359.

http://pastebin.com/grWxHn7C

Thank you in advance.
Reply
#65
This is a problem with the 64-bits svn PPA. It looks like that fore some reason some libraries are 32-bits.
I guess the PPA maintaner(s) have to look into it because the problem isn't their if you compile it yourself.
Reply
#66
Are you using it already as an add-on script? If not, you should drop the script in the add-ons dir. Make sure you have a recent version, too.

If you're using Confluence, you need to point the skin to the location of the script too (although that might have been fixed in more recent versions).
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#67
I have a patch for script.recentlyadded, basically it adds plot informations for movies and tv shows (Like the old version which was bundled with aeon65)

http://trac.xbmc.org/ticket/9583
Reply
#68
Right I've managed to work out how to get Song Rating working but I really need some help getting CF2009's 'play album' fix working.

This is as far as I can get with the script -

http://pastebin.com/s53NDb3U

and this is the error message I'm getting -

Code:
-->Python Interpreter Initialized<--
NOTICE: DVDPlayer: Opening: XBMC.RunScript(script.recentlyadded,albumid=3108)
WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
NOTICE: Creating InputStream
ERROR: CDVDPlayer::OpenInputStream - error opening [XBMC.RunScript(script.recentlyadded,albumid=3108)]

The trouble is I don't have a clue about Python and I don't know what XBMC is expecting to get.

Thanks.
Reply
#69
Got a bit further in that I've also added CF2009's 'Random/Recent' option for Movies and TV Shows.

http://pastebin.com/Nd8pujFT

Can't work out how to code it for music though.
Reply
#70
I originally posted this in the RecentlyAdded.py thread in the Skin Development forum but figured it's not really skinning help so I'm posting it here in the hope someone can help me figure it out.

...


Right I've managed to work out how to get Song Rating working but I really need some help getting CF2009's 'play album' fix working.

This is as far as I can get with the script -

http://pastebin.com/s53NDb3U

and this is the error message I'm getting -

Code:
-->Python Interpreter Initialized<--
NOTICE: DVDPlayer: Opening: XBMC.RunScript(script.recentlyadded,albumid=3108)
WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
NOTICE: Creating InputStream
ERROR: CDVDPlayer::OpenInputStream - error opening [XBMC.RunScript(script.recentlyadded,albumid=3108)]

The trouble is I don't have a clue about Python and I don't know what XBMC is expecting to get.

Thanks.

...

Got a bit further in that I've also added CF2009's 'Random/Recent' option for Movies and TV Shows.

http://pastebin.com/Nd8pujFT

Can't work out how to code it for music though.
Reply
#71
Although Hither I have no idea how to help you, You guys do realize that the more you keep adding to it the slower its going to get at retrieving the information. Its like the whole reason that filemode doesn't just go and get the info if its available because it slows the listings right down having to fetch it. And the python way is worse still
Reply
#72
My patch shouldn't cause slowdown as the information it adds is already fetched (via a select *)
Reply
#73
Hitcher Wrote:Got a bit further in that I've also added CF2009's 'Random/Recent' option for Movies and TV Shows.

http://pastebin.com/Nd8pujFT

Can't work out how to code it for music though.

How do you call the Random movie or episode?
Image
To learn more, click here.
Reply
#74
I get the following error:
Code:
ERROR: Error Type: exceptions.IndexError
  ERROR: Error Contents: list index out of range
  ERROR: Traceback (most recent call last):
                                              File "/home/xbmc/.xbmc/addons/skin.shade/scripts/RecentlyAdded.py", line 267, in ?
                                                Main()
                                              File "/home/xbmc/.xbmc/addons/skin.shade/scripts/RecentlyAdded.py", line 71, in __init__
                                                self._fetch_totals()
                                              File "/home/xbmc/.xbmc/addons/skin.shade/scripts/RecentlyAdded.py", line 133, in _fetch_totals
                                                self.WINDOW.setProperty( "TVShows.Watched" , tvshows_totals[ 2 ] or "" )
                                            IndexError: list index out of range
This only happens when i set this:
Code:
<onfocus>XBMC.RunScript(special://skin/scripts/RecentlyAdded.py,limit=8&amp;albums=True&amp;unplayed=True&amp;totals=True)</onfocus>
Instead of this:
Code:
<onfocus>XBMC.RunScript(special://skin/scripts/RecentlyAdded.py,limit=8&amp;albums=True)</onfocus>

It seems like "totals" and "unplayed" isn't working for me.

I'm using the XBMC PRE-10.5 R31542 release with an external database.
Reply
#75
10.5 should be using:

<onfocus>XBMC.RunScript(script.recentlyadded,limit=5&amp;albums=True)</onfocus>

Try using that and see if it helps...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 14

Logout Mark Read Team Forum Stats Members Help
[RELEASE] RecentlyAdded Script (RecentlyAdded.py) Recently Added for Skins / Skinners0