Kodi Community Forum
Release script favourites - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
+---- Thread: Release script favourites (/showthread.php?tid=114671)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


RE: script favourites - new features - LiMPiNg - 2013-08-06

To anyone else having this problem on an ATV2, I think I found the solution (at least for me)...

TL;DR: Make sure there is a local favourites.xml file in your userdata folder on your ATV2, even if you are using path subs to share favourites. It will ignore the local file but needs it there to launch the script it seems.

I have multiple XBMC devices in the house and so have been sharing my library, thumbnails, and some extra settings (farvourites) using MySQL and path subs. Until recently, I've been running v11 Eden but a new Raspberry Pi has forced me to upgrade all my installs to 12 Frodo, since they use different database names. Since I have an RPi and ATV2 in the house, I want to keep sharing everything through path subs to reduce the local work they have to do and keep the heavy lifting to the server.

After updating the ATV2 to Frodo, I too was getting the scripts.favourites error when several different skins loaded. I played around with the advancedsettings file, changing from resolved name to IP address for the path subs, etc with no luck. However, while playing with the advancedsettings file I noticed that the ATV2 didn't have a favourites.xml file in its userdata folder. On a whim, I copied the favourites.xml from my server to the ATV2 and voila!! No more errors, and favorites show up on the menus of the skins that were giving errors before, and they are being shared with path subs properly. Even though there are entries in the favourites.xml file I copied, it is ignoring that and still using the shared favourites file from the server as dictated by the path subs in advancedsettings. I tested this by adding a favorite on the another device and then refreshed the ATV favorites and the newly added one appeared.

I'm sure it requires further testing to make sure this is an actual solution, and not just one for my particular setup, but perhaps the script could be designed to check for a local favourites.xml file on install, and if doesn't exist then to create one? Perhaps it already does this and something went funky on my setup by updating from 11 to 12 that caused this. Just passing along what worked for me so hopefully it will help others.


RE: script favourites - new features - Koying - 2013-12-20

Hi Ronie,

In relation with http://forum.xbmc.org/showthread.php?tid=180637 , could you apply this patch to your script, please:
Code:
--- default.py.orig.py  2013-12-20 13:41:40.579967100 +0100
+++ default.py  2013-12-20 13:38:35.690525400 +0100
@@ -56,7 +56,7 @@
         for count, favourite in enumerate(listing):
             name = favourite.attributes[ 'name' ].nodeValue
             path = favourite.childNodes [ 0 ].nodeValue
-            if 'RunScript' not in path:
+            if 'RunScript' not in path and 'StartAndroidActivity' not in path:
                 path = path.rstrip(')')
                 path = path + ',return)'
             if 'playlists/music' in path or 'playlists/video' in path:
@@ -107,7 +107,7 @@
                     listitem.setProperty( "Icon", favourite.attributes[ 'thumb' ].nodeValue )
             except:
                 pass
-            if 'RunScript' not in fav_path:
+            if 'RunScript' not in fav_path and 'StartAndroidActivity' not in fav_path:
                 fav_path = fav_path.rstrip(')')
                 fav_path = fav_path + ',return)'
             listitem.setProperty( "Path", fav_path )

Thanks


RE: script favourites - new features - ronie - 2013-12-20

lol, i remember i fixed it for the built-in favourites:
2784 (PR)
but obviously never bothered to test things with the favourites script as well.

thanx for the heads-up! will fix it for sure :-)


RE: script favourites - new features - Koying - 2013-12-20

(2013-12-20, 15:01)ronie Wrote: lol, i remember i fixed it for the built-in favourites:
Hehe, yep Wink
Took me awhile to find out where that ",return" could come from Smile


RE: script favourites - new features - fredentoft - 2014-01-10

I have a similar problem as LiMPiNg.

Running OpenELEC-RPi.arm-3.2.4

Shared MySQL-db between a number of clients. Thumbnails and some of the xml-files (including favourites.xml) previously synced using dropbox, but went for pathsubstitution when I got my pi, so there is no local favourites.xml on the pi.

Get this in xbmc.log:
#######
<from>special://profile/favourites.xml</from>
<to>nfs://192.168.18.1:/mnt/mirrorlv/XBMC/userdata/favourites.xml</to>
...
Error Contents: (2, 'No such file or directory', u'/storage/.xbmc/userdata/favourites.xml')
IOError: (2, 'No such file or directory', u'/storage/.xbmc/userdata/favourites.xml')
#######
and "script failed" message in gui.

If I create the local file messages disappears, but no favourites visible to skin.
Copy xml from nfs-server to local storage, favourites visible to skin.

So, it seems to me, that the system "obeys" the substitution, while the script doesn't.


RE: script favourites - new features - ronie - 2014-01-10

(2014-01-10, 01:32)fredentoft Wrote: So, it seems to me, that the system "obeys" the substitution, while the script doesn't.

correct. path substitutions does not work in python addons.


RE: script favourites - new features - hsus - 2014-04-13

EDIT - The stuff here was all wrong, think I figured it out though!

I think I've found a bug; When adding a favorite from the XBMC Online TV add-on (from rieter.net) the script fails when called from the skin eminence for use in background widgets (viewing favorites in its dedicated view works though)

here's the favorite causing the crash:
Code:
<favourite name="&#x07;.: Senaste nyhetsprogram :." thumb="/storage/sdcard0/Android/data/org.xbmc.xbmc/files/.xbmc/addons/net.rieter.xot.channel.se/svt/svtimage.png">ActivateWindow(10025,&quot;plugin://net.rieter.xot/?action=listfolder&amp;channel=chn_svt&amp;channelcode=svt&amp;pickle=KGltZWRpYWl0ZW0KTWVkaWFJdGVtCnAxCihkcDIKUydyYXRpbmcnCnAzCk5zUydNZWRpYUl0ZW1QYXJ0cycKcDQKKGxwNQpzUydjaGFubmVscycKcDYKKGxwNwpzUydndWlkJwpwOApTJ0YzNzYxREE2RDcxQjVDRDlCOEVENjNDQ0I0NEEwMTg5NzUzODZDQzdEMzA3QjFGQkE2NzdERkI4QTM5MkY1OEQnCnA5CnNTJ2h0dHBIZWFkZXJzJwpwMTAKKGRwMTEKc1MnY29tcGxldGUnCnAxMgpJMDEKc1MndGh1bWJVcmwnCnAxMwpTJycKc1MndGh1bWInCnAxNApTJy9zdG9yYWdlL3NkY2FyZDAvQW5kcm9pZC9kYXRhL29yZy54Ym1jLnhibWMvZmlsZXMvLnhibWMvYWRkb25zL25ldC5yaWV0ZXIueG90LmNoYW5uZWwuc2Uvc3Z0L3N2dGltYWdlLnBuZycKcDE1CnNTJ2ZhbmFydCcKcDE2ClMnJwpzUydkb3dubG9hZGFibGUnCnAxNwpJMDAKc1MndHlwZScKcDE4ClMnZm9sZGVyJwpwMTkKc1MnZGVzY3JpcHRpb24nCnAyMApTJycKc1MncGFyZW50JwpwMjEKTnNTJ19NZWRpYUl0ZW1fX3RpbWVzdGFtcCcKcDIyCmNkYXRldGltZQpkYXRldGltZQpwMjMKKFMnXHgwODNceDAxXHgwMVx4MDBceDAwXHgwMFx4MDBceDAwXHgwMCcKdFJwMjQKc1MnZG93bmxvYWRlZCcKcDI1CkkwMApzUydpY29uJwpwMjYKVi9zdG9yYWdlL3NkY2FyZDAvQW5kcm9pZC9kYXRhL29yZy54Ym1jLnhibWMvZmlsZXMvLnhibWMvYWRkb25zL25ldC5yaWV0ZXIueG90LmNoYW5uZWwuc2Uvc3Z0L3N2dGxhcmdlLnBuZwpwMjcKc1MnX01lZGlhSXRlbV9fZGF0ZScKcDI4ClMnJwpzUyduYW1lJwpwMjkKUydceDA3LjogU2VuYXN0ZSBueWhldHNwcm9ncmFtIDouJwpwMzAKc1MndXJsJwpwMzEKUydodHRwOi8vd3d3LnN2dHBsYXkuc2UvP3RhYj1uZXdzJnNpZGE9MScKcDMyCnNTJ2l0ZW1zJwpwMzMKKGxwMzQKc1MnZXJyb3InCnAzNQpJMDAKc1MnZ3VpZFZhbHVlJwpwMzYKTDExMDEyMDcxNDgwODAyNjE4NDQ2ODQzMTkwNzU0Mjc4MDk5OTUzODcxOTcwNTcxMTk2NjUxODk3MzM5NjUzMzM4OTYyNDUyNjE3MzU4MUwKc2Iu&quot;,return)</favourite>

Might be that it's too long?


RE: script favourites - new features - butchabay - 2014-05-16

Hi dudes, sorry for my dumb question, but which dialog should open using:

<onclick>RunScript(script.favourites,property=CustomFavourite1)</onclick>

DialogSelect.xml ?


Thanx


RE: script favourites - new features - nessus - 2014-05-16

Yes. The fat one with the icons.

Cheers
Nessus


RE: script favourites - new features - butchabay - 2014-05-16

Hi nessus. The fat one with icons ? ... we have just one DialogSelect.xml
Or are you talking about a custom dialog ?

Thanx


RE: script favourites - new features - Hitcher - 2014-05-16

List id=6.


RE: script favourites - new features - senna99 - 2014-05-16

Hello

Why is not possiblet call up <c>ContextMenu</c> in Home stage?
I tried to make changes in xml files,but there is no progress.

Thanks in advance for your answers.


RE: script favourites - new features - nessus - 2014-05-16

Bbutcha... the DialogSelect.xml has two list's. One with only ListItem.Label available (id=3) and one with ListItem.Label, ListItem.Label2 and ListItem.Icon (id=6). The list that the script.favourites uses is the id=6. It's the same as the one that opens when you choose skin or weather addon.

Hitcher... id=5 is the Manual/Get More button except if that has changed in the unifying dialogs stuff for Helix.

Cheers
Nessus


RE: script favourites - new features - butchabay - 2014-05-16

Thanx guys, will try it asap ...

Cheers


RE: script favourites - new features - Hitcher - 2014-05-16

(2014-05-16, 10:31)nessus Wrote: Bbutcha... the DialogSelect.xml has two list's. One with only ListItem.Label available (id=3) and one with ListItem.Label, ListItem.Label2 and ListItem.Icon (id=6). The list that the script.favourites uses is the id=6. It's the same as the one that opens when you choose skin or weather addon.

Hitcher... id=5 is the Manual/Get More button except if that has changed in the unifying dialogs stuff for Helix.

Cheers
Nessus

It was early. Wink

(2014-05-16, 09:03)senna99 Wrote: Hello

Why is not possiblet call up <c>ContextMenu</c> in Home stage?
I tried to make changes in xml files,but there is no progress.

Thanks in advance for your answers.

Because it's not. Wink