2014-08-10, 17:19
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
removed151214
2014-08-10, 17:26
Do you still have defaults in the old .shortcuts format? Assuming it's the same error (it'll be being called slightly differently after the revert at the very least, the error is saying it can't load them. That means either the script is incorrectly calling this function when it doesn't have a .shortcuts file to upgrade, or the .shortcuts file is invalid.
2014-08-10, 17:59
Found the problem, I'd deleted the script-skinshortcuts-includes.xml but the visible conditions aren't getting added from the mainmenu.DATA.xml.
removed151214
2014-08-10, 18:07
You're not overriding the action are you...? (The only situation which should stop the visible condition being added.) I've tried it and had it working from the script defaults, the skin defaults and by manually editing the users mainmenu.DATA.xml with the following:
(You say "conditions" - the script is only set up to retrieve a single visible condition from the data files)
Edit: Except, of course, that the visible property won't be saved when editing a menu. Gah, that was a silly thing to overlook on my part. I'm about to eat, but will fix that afterwards.
Code:
<shortcut>
<label>342</label>
<label2>Common Shortcut</label2>
<icon>DefaultMovies.png</icon>
<thumb />
<action>ActivateWindow(Videos,MovieTitles,return)</action>
<visible>False</visible>
</shortcut>
(You say "conditions" - the script is only set up to retrieve a single visible condition from the data files)
Edit: Except, of course, that the visible property won't be saved when editing a menu. Gah, that was a silly thing to overlook on my part. I'm about to eat, but will fix that afterwards.
2014-08-10, 18:16
No overrides.
mainmenu.DATA.xml
script-skinshortcuts-includes.xml
mainmenu.DATA.xml
PHP Code:
<shortcuts>
<shortcut>
<label>YouTube</label>
<label2>Common Shortcut</label2>
<defaultID>plugin.video.youtube</defaultID>
<icon>special://home/addons/plugin.video.youtube/icon.png</icon>
<thumb />
<action>ActivateWindow(10025,"plugin://plugin.video.youtube",return)</action>
<visible>System.HasAddon(plugin.video.youtube)</visible>
</shortcut>
<shortcut>
<label>Trailers</label>
<label2>Common Shortcut</label2>
<defaultID>plugin.video.itunes_trailers</defaultID>
<icon>special://home/addons/plugin.video.itunes_trailers/icon.png</icon>
<thumb />
<action>ActivateWindow(10025,"plugin://plugin.video.itunes_trailers",return)</action>
<visible>System.HasAddon(plugin.video.itunes_trailers)</visible>
</shortcut>
<shortcut>
<label>TWiT</label>
<label2>Music Add-On</label2>
<defaultID>plugin.video.twit</defaultID>
<icon>special://home/addons/plugin.video.twit/icon.png</icon>
<thumb />
<action>ActivateWindow(10501,"plugin://plugin.video.twit",return)</action>
<visible>System.HasAddon(plugin.video.twit)</visible>
</shortcut>
</shortcuts>
script-skinshortcuts-includes.xml
PHP Code:
<item id="9">
<label>YouTube</label>
<label2>Common Shortcut</label2>
<icon>special://home/addons/plugin.video.youtube/icon.png</icon>
<thumb />
<property name="labelID">plugin.video.youtube</property>
<property name="defaultID">plugin.video.youtube</property>
<onclick>ActivateWindow(10025,"plugin://plugin.video.youtube",return)</onclick>
<visible>StringCompare(System.ProfileName,Master user)</visible>
<property name="submenuVisibility">plugin-video-youtube</property>
<property name="group">mainmenu</property>
<property name="hasSubmenu">True</property>
</item>
<item id="10">
<label>Trailers</label>
<label2>Common Shortcut</label2>
<icon>special://home/addons/plugin.video.itunes_trailers/icon.png</icon>
<thumb />
<property name="labelID">plugin.video.itunes_trailers</property>
<property name="defaultID">plugin.video.itunes_trailers</property>
<onclick>ActivateWindow(10025,"plugin://plugin.video.itunes_trailers",return)</onclick>
<visible>StringCompare(System.ProfileName,Master user)</visible>
<property name="submenuVisibility">plugin-video-itunes-trailers</property>
<property name="group">mainmenu</property>
</item>
<item id="11">
<label>TWiT</label>
<label2>Music Add-On</label2>
<icon>special://home/addons/plugin.video.twit/icon.png</icon>
<thumb />
<property name="labelID">plugin.video.twit</property>
<property name="defaultID">plugin.video.twit</property>
<onclick>ActivateWindow(10501,"plugin://plugin.video.twit",return)</onclick>
<visible>StringCompare(System.ProfileName,Master user)</visible>
<property name="submenuVisibility">plugin-video-twit</property>
<property name="group">mainmenu</property>
</item>
removed151214
2014-08-10, 18:32
Chicken was still pink, so I've fixed it so the visibility property actually gets saved when editing the menus. Hopefully, after you reset your menus, this should all work as intended. (Fingers crossed!)
2014-08-10, 19:14
OK, everything is working with the visible condition getting added for one but I'm getting this error trying to reset another that's still got the old shortcut files.
Code:
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.SyntaxError'>
Error Contents: ('unexpected EOF while parsing', ('<string>', 0, 0, ''))
Traceback (most recent call last):
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\gui.py", line 1392, in onAction
self._save_shortcuts()
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\gui.py", line 493, in _save_shortcuts
datafunctions.UpgradeFunctions().upgrade_file( target )
File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\datafunctions.py", line 807, in upgrade_file
shortcuts = eval( list )
SyntaxError: ('unexpected EOF while parsing', ('<string>', 0, 0, ''))
-->End of Python script error report<--
removed151214
2014-08-10, 19:31
I was passing the wrong file name to the upgrade function Hopefully it's now fixed on git.
And thanks so much for taking the time to help track down these bugs. You never know, thanks to yourself and others, this might actually be the first time the script gets updated on the repo without a showstopper!
And thanks so much for taking the time to help track down these bugs. You never know, thanks to yourself and others, this might actually be the first time the script gets updated on the repo without a showstopper!
2014-08-10, 19:52
Success!
No need to thank me you're doing all the work.
No need to thank me you're doing all the work.
2014-08-11, 21:02
I use the script only for the submenus and i am using .shortcuts files.
Is it possible to add visible conditions by default there ?. For example in TV Shows submenu the TV Guide entry (RunAddon(script.tv.show.next.aired,return) is still visible even if the library is empty.
Also i noticed that if the Music Library is empty the default submenu's library entry's (Albums, Artists etc) are hidden (which is correct) but, when the Video Library is empty the Movies/TV Shows default submenu's library entry's (Genres, Actors etc) are still visible which is not useful because they lead to empty screens.
By the way thanks for all the work that you put on this script and i can see now that is... huge !
Cheers
Nessus
Is it possible to add visible conditions by default there ?. For example in TV Shows submenu the TV Guide entry (RunAddon(script.tv.show.next.aired,return) is still visible even if the library is empty.
Also i noticed that if the Music Library is empty the default submenu's library entry's (Albums, Artists etc) are hidden (which is correct) but, when the Video Library is empty the Movies/TV Shows default submenu's library entry's (Genres, Actors etc) are still visible which is not useful because they lead to empty screens.
By the way thanks for all the work that you put on this script and i can see now that is... huge !
Cheers
Nessus
removed151214
2014-08-11, 21:37
(2014-08-11, 21:02)nessus Wrote: [ -> ]I use the script only for the submenus and i am using .shortcuts files.
Is it possible to add visible conditions by default there ?. For example in TV Shows submenu the TV Guide entry (RunAddon(script.tv.show.next.aired,return) is still visible even if the library is empty.
Sorry, not possible with the .shortcuts files. The file format is simply too rigid to be able to add, well, anything to it (hence the change to xml). If it helps, I'm about given up waiting for translations to be updated from Transifex, so I'm going to run some stress tests and get the new version (with the xml file format) submitted to the repo sooner rather than later.
(2014-08-11, 21:02)nessus Wrote: [ -> ]Also i noticed that if the Music Library is empty the default submenu's library entry's (Albums, Artists etc) are hidden (which is correct) but, when the Video Library is empty the Movies/TV Shows default submenu's library entry's (Genres, Actors etc) are still visible which is not useful because they lead to empty screens.
Nice spot. Should now be fixed on git.
(2014-08-11, 21:02)nessus Wrote: [ -> ]By the way thanks for all the work that you put on this script and i can see now that is... huge !
You're welcome
2014-08-11, 21:42
Well, i guess will have to switch to xml files then. Is there an easy way to convert my existing .shortcuts files to xml DATA ?
If i switch to DATA xml file do i need an override.xml file for the script to work or that still optional ?
Cheers
Nessus
If i switch to DATA xml file do i need an override.xml file for the script to work or that still optional ?
Cheers
Nessus
removed151214
2014-08-11, 21:48
Stick 'em into the scripts folder under addon_data. If you've already run a git version with the xml data store, delete settings.xml from same directory or (easiest under Helix, where the script appears in system > add-ons) deselect everthing from the "Upgrading" tab of the scripts settings.
Next time the script runs, it will updrage any .shortcuts in its addon_data folder to the xml format. They may need some minor editing - for example, skin-provided labels will be in specific format used to persist them across skins when they only need to be the id, and a defaultID should have been added to items, which has no function when the files are copied back to the skins shortcuts directory.
The overrides.xml is still optional.
Next time the script runs, it will updrage any .shortcuts in its addon_data folder to the xml format. They may need some minor editing - for example, skin-provided labels will be in specific format used to persist them across skins when they only need to be the id, and a defaultID should have been added to items, which has no function when the files are copied back to the skins shortcuts directory.
The overrides.xml is still optional.
2014-08-11, 21:52
Great. Will download the latest git version and try it out.
Thanks a lot.
Cheers
Nessus
Thanks a lot.
Cheers
Nessus
2014-08-11, 23:47
(2014-08-11, 21:37)Unfledged Wrote: [ -> ]If it helps, I'm about given up waiting for translations to be updated from Transifex, so I'm going to run some stress tests and get the new version (with the xml file format) submitted to the repo sooner rather than later.
Thank goodness for that, I've just realised I submitted Conq to the official repo with version 0.4.0 as a requirement!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140