2011-05-11, 16:52
Big_Noid Wrote:this works:
Code:<onclick>RunAddon($INFO[Window.Property(RandomAddon.%d.Path)])</onclick>
Indeed, I feel stupid now.
![Wink Wink](https://forum.kodi.tv/images/smilies/wink.png)
Big_Noid Wrote:this works:
Code:<onclick>RunAddon($INFO[Window.Property(RandomAddon.%d.Path)])</onclick>
igotdvds Wrote:Indeed, I feel stupid now.
grajen3 Wrote:you can query sql directly from python (using f.e. pysqlite)
ronie Wrote:i have added Random Addons to the script
the script will now also scan your addons folder for installed plugins and scripts
and make these info labels available to the skin:
Code:RandomAddon.%d.Name
RandomAddon.%d.Author
RandomAddon.%d.Summary
RandomAddon.%d.Version
RandomAddon.%d.Path
RandomAddon.%d.Fanart
RandomAddon.%d.Thumb
Addons.Count
the Path can be used to run the addon:
Code:<onclick>RunAddon($INFO[Window.Property(RandomAddon.%d.Path)])</onclick>
as mentioned, it's currently plugins and scripts only.
i'm not sure if it would make sense to include other addons as well,
like skins, visualizations, scrapers, etc..
since we can't run them from our home screen anyway.
let me now what you think and if there's any issues.
note: this is for nightly builds only. it is not Dharma compatible!
Quote:16:31:21 T:4832 M:2545885184 ERROR: Error Type: <type 'exceptions.Exception'>
16:31:21 T:4832 M:2545885184 ERROR: Error Contents: Could not get AddonPtr given a script id of plugin.image.facebook. If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 2.0 plugin.
16:31:21 T:4832 M:2545909760 ERROR: Traceback (most recent call last):
File "C:\Users\Wiz\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 311, in <module>
Main()
File "C:\Users\Wiz\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 105, in __init__
self._fetch_addon_info()
File "C:\Users\Wiz\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 258, in _fetch_addon_info
addontype = xbmcaddon.Addon(id=addonid).getAddonInfo('type')
Exception: Could not get AddonPtr given a script id of plugin.image.facebook. If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 2.0 plugin.
16:31:22 T:7056 M:2547798016 ERROR: Texture manager unable to load file: special://profile/Thumbnails/Video/e/auto-e1d3e1cd.tbn
16:31:23 T:7792 M:2545487872 ERROR: dll_fgets emulated function failed
igotdvds Wrote:Getting this error on latest nightly:
DanLongman Wrote:The link to download the pre-eden script from google code is broken
ronie Wrote:available in the eden-pre addon repo as of today.
igotdvds Wrote:Getting this error on latest nightly:
13:46:37 T:1080 M:2203914240 INFO: -->Python script returned the following error<--
13:46:37 T:1080 M:2203914240 ERROR: Error Type: <type 'exceptions.Exception'>
13:46:37 T:1080 M:2203914240 ERROR: Error Contents: Could not get AddonPtr given a script id of metadata.amazon.com. If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 2.0 plugin.
13:46:37 T:1080 M:2203901952 ERROR: Traceback (most recent call last):
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 311, in <module>
Main()
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 105, in __init__
self._fetch_addon_info()
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 258, in _fetch_addon_info
addontype = xbmcaddon.Addon(id=addonid).getAddonInfo('type')
Exception: Could not get AddonPtr given a script id of metadata.amazon.com. If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 2.0 plugin.
13:46:37 T:1080 M:2203901952 INFO: -->End of Python script error report<--
Quote:"RandomMovie.%d.Title"
"RandomMovie.%d.Rating"
"RandomMovie.%d.Year"
"RandomMovie.%d.RunningTime"
"RandomMovie.%d.Path"
"RandomMovie.%d.Trailer"
"RandomMovie.%d.Fanart"
"RandomMovie.%d.Thumb"
"RandomMovie.Count"
"RandomEpisode.%d.ShowTitle"
"RandomEpisode.%d.EpisodeTitle"
"RandomEpisode.%d.EpisodeNo"
"RandomEpisode.%d.EpisodeSeason"
"RandomEpisode.%d.EpisodeNumber"
"RandomEpisode.%d.Rating"
"RandomEpisode.%d.Path"
"RandomEpisode.%d.Fanart"
"RandomEpisode.%d.Thumb"
"RandomEpisode.Count"
"RandomAlbum.%d.Title"
"RandomAlbum.%d.Year"
"RandomAlbum.%d.Artist"
"RandomAlbum.%d.Path"
"RandomAlbum.%d.Fanart"
"RandomAlbum.%d.Thumb"
"RandomAlbum.%d.Rating"
"RandomAlbum.Count"
"RandomSong.%d.Title"
"RandomSong.%d.Year"
"RandomSong.%d.Artist"
"RandomSong.%d.Album"
"RandomSong.%d.Path"
"RandomSong.%d.Fanart"
"RandomSong.%d.Thumb"
"RandomSong.%d.Rating"
"RandomSong.Count"
"RandomAddon.%d.Name"
"RandomAddon.%d.Author"
"RandomAddon.%d.Summary"
"RandomAddon.%d.Version"
"RandomAddon.%d.Path"
"RandomAddon.%d.Fanart"
"RandomAddon.%d.Thumb"
"RandomAddon.Count"
Quote:limit=# ; # to limit returned results (default=5)
unplayed=True ; True to return only items that have not been played (default=False)
trailer=True ; True to play the trailer (if available) (default=False)
alarm=# ; # number of minutes before running again (default=Off)
ronie Wrote:this script is for xbmc pre-eden only!
pecinko Wrote:I expect this is because of technical limitations otherwise it would be Dharma compatible too?
17:13:19 T:2752 M:2446483456 INFO: -->Python script returned the following error<--
17:13:19 T:2752 M:2446483456 ERROR: Error Type: <type 'exceptions.Exception'>
17:13:19 T:2752 M:2446483456 ERROR: Error Contents: Could not get AddonPtr given a script id of metadata.amazon.com. If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 2.0 plugin.
17:13:19 T:2752 M:2446446592 ERROR: Traceback (most recent call last):
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 479, in <module>
Main()
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 71, in __init__
self._fetch_addon_info()
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.randomitems\RandomItems.py", line 415, in _fetch_addon_info
addontype = xbmcaddon.Addon(id=addonid).getAddonInfo('type')
Exception: Could not get AddonPtr given a script id of metadata.amazon.com. If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 2.0 plugin.
17:13:19 T:2752 M:2446442496 INFO: -->End of Python script error report<--