![]() |
|
[RELEASE] RecentlyAdded Script (RecentlyAdded.py) Recently Added for Skins / Skinners - Printable Version +- XBMC Community Forum (http://forum.xbmc.org) +-- Forum: Development (/forumdisplay.php?fid=32) +--- Forum: Skin Development (/forumdisplay.php?fid=12) +--- Thread: [RELEASE] RecentlyAdded Script (RecentlyAdded.py) Recently Added for Skins / Skinners (/showthread.php?tid=55907) |
[RELEASE] RecentlyAdded Script (RecentlyAdded.py) Recently Added for Skins / Skinners - Nuka1195 - 2009-08-05 20:44 Here is a new version of RecentlyAdded.py http://xbmc-addons.googlecode.com/svn/packages/RecentlyAdded.py *new: "alarm" parameter. most skins run this script whenever you enter home. with the new alarm parameter, if you have a control in home.xml to execute the script, you can set <defaultcontrol always="false"> then the script does not have to run everytime you enter home. if you can have the control in startup.xml. the bad thing about startup.xml, if you have a setting to enable this. you will have to restart xbmc once enabled. you can pass the following optional parameters: PHP Code: limit=# ; # to limit returned results (default=5)* when alums=True, only one song is still played (developers any help) separate parameters with "&" minus quotes example (the setproperty and visible is for aeon, when the main menu loses focus control 8999 can gain focus with navigating. you skin may not need this): PHP Code: <defaultcontrol always="false">8999</defaultcontrol>properties available: totals: PHP Code: "Movies.Count"movies %d=1 to LIMIT: PHP Code: "LatestMovie.%d.Title"tv shows %d=1 to LIMIT: PHP Code: "LatestEpisode.%d.ShowTitle"music %d=1 to LIMIT: PHP Code: "LatestSong.%d.Title"- FourTwentySmilz - 2009-08-05 22:17 So if I replace the recently_added.py i already have, with this one it should work fine without me having to change code in my Home.xml? - Jezz_X - 2009-08-05 23:19 got to admit I'm confused too you saying we don't have to run it anymore ? or that we still have to run it but the script decides if it needs to bother updating or not ? - ronie - 2009-08-06 00:02 you're not alone. ;-) if i use alarm=30, does this counter keep running if i navigate away from the homescreen? or does it only update the recently added stuff if you stay on the homepage for half an hour? edit: i also can't seem to see the logic in this: Code: <onfocus>SetProperty(LastAddedRun,1)</onfocus>- Jezz_X - 2009-08-06 00:25 I think it means that you just run it once in startup.xml for example and then it sets a xbmc internal alarm to rerun the script every X amount of minutes if you have it set. I wonder what effect this would have if it decided to fire off the script while your using another like the full AMT script (since I heard about issues running 2 scripts at once) - Nuka1195 - 2009-08-06 00:28 no the script doesn't decide. the script starts an AlarmClock() you still need to run the script "once". if you pass alarm=30, then the script will run every 30 minutes. so then there is no need to run it everytime you enter the home menu. (which i don't like). you enter movies back out and the script runs again. as i said in the first post you can set always="false" for you're control so it only runs once. right? was the example not clear? - Jezz_X - 2009-08-06 00:28 ronie Wrote:you're not alone. ;-) This is just the way to launch it and he then sets a variable to say its been launched <onfocus>SetProperty(LastAddedRun,1)</onfocus> and hides the launcher because its allready been launched so you wont launch it again <visible>IsEmpty(Window(Home).Property(LastAddedRun))</visible> - Nuka1195 - 2009-08-06 00:28 jmasrshall, was to apply a patch for that jezz. i have it in my builds and don't have any issues. - Nuka1195 - 2009-08-06 00:31 you could launch it from autoexec.py with the params also. - Nuka1195 - 2009-08-06 00:32 yes jezz in aeon that control can gain focus again if i lose focus by bumping the mouse. then try and navigate to the menu with the keyboard. probably with proper skinning it isn't needed. |