Help with my 1st Python Script
#31
(2012-06-09, 21:28)Bstrdsmkr Wrote: The notification location is skin dependent so you can't move it without editing the skin

ActivateWindow isn't working because it's cached so it's showing the last known state (so technically it's working). If you're just trying to update the last window you were in before you started playback, use the builtin "Container.Refresh"

Also, instead of waiting 5 seconds for the delete to finish, use something like:
Code:
while xbmcvfs.exists(file):
    xbmc.sleep(1000)

That way you can account for things like deleting items from a busy NAS drive that might take more that 5sec.

Finally, you can also check the Season and Episode infolabels to be more certain it's a TV Show vs a movie

Thanks! Actually I think I figured out that trying to activate a different window and give it focus while the script is still running from the current window just ain't goin to happen. So, I deleted those lines and just put an <onclick>PreviousMenu</onclick> after the script in the button control and it works. I will take you up on your 2nd suggestion "while xbcvfs.exist(file)...".
Another good suggestion! I am learning something new every day.
Reply
#32
Code:
while (xbmcvfs.exists(file) and not xbmc.abortRequested):
    xbmc.sleep(1000)
Reply
#33
(2012-06-09, 23:11)amet Wrote:
Code:
while (xbmcvfs.exists(file) and not xbmc.abortRequested):
    xbmc.sleep(1000)

Thanks for catching that. It does seem more correct now.
Reply
#34
Oops. Sorry about that. Did the wrong c/p
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#35
At the moment, the delete function in my script works without any confirmation dialog before deleting. While the whole point was to save steps, what do you think if I added a settings option to include a Confirmation dialog before actually deleting? It adds a step for those whose fingers are faster than their brains.
Reply
#36
Hello,

Was this script ever fully developed? I'd be interested in trying it for my purposes.

Gary
Reply
#37
(2020-01-01, 20:53)music_lover Wrote: Hello,

Was this script ever fully developed? I'd be interested in trying it for my purposes.

Gary
Given the thread is over seven and a half years old and the last time the original poster posted anything anywhere on the forum was over seven years ago, probably not.
Reply

Logout Mark Read Team Forum Stats Members Help
Help with my 1st Python Script0