Release script.embuary.info - the little ExtendedInfo brother
#61
(2019-08-17, 13:22)sualfred Wrote: I've added a small and optional context menu addon to use the script in any skin. It's already availalbe in my repo and has been submitted to the Kodi repo. Should be available soon to everyone.

Works very well! Maybe you can add something to override the onback function like in extendedinfo? Smile

snippet:
        onback = self.getProperty("%i_onback" % control_id)
        onback = self.getProperty("%i_onback" % control_id)
        if onback:
            xbmc.executebuiltin(onback)

so if onback, i can set focus to a controllist f.e. 

<onload>SetProperty(10052_onback,SetFocus(9000))</onload>
then it would be perfect for me Smile
 Image
Reply
#62
Nope. Onback is used to call the dialog history/previous dialog.

Edit:
Err.. wait. What exactly should happen if you trigger onback? Changing the focus without closing or what exactly?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#63
Ah, sorry, it's already late.

Please try the latest GitHub commit.

Examples:
  • <onload>SetProperty(onclose,SetFocus(100))</onload> = To set a general action if a window is going to be closed. Like reseting the focus to a default control
  • <onload>SetProperty(onback_10052,SetFocus(900))</onload> = Don't close the window, but set focus to ID 900 if onback was called while container 10052 was in focus.
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#64
(2019-08-17, 22:29)sualfred Wrote: Nope. Onback is used to call the dialog history/previous dialog.

Edit:
Err.. wait. What exactly should happen if you trigger onback? Changing the focus without closing or what exactly?

Phil added a function for me in extended info where you could set an onback property for a specific container. If the property was set and that container focused, then the script would do the action in the property rather than close the dialog.

It is mostly used so that you can send focus back to the top list or row of buttons on back rather than close the window.

EDIT: I see you've just added it Wink
Reply
#65
Yeah, thanks. My brain is just not working as it should on midnight so it took a few minutes until I understood the request Wink
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#66
Nice, so my onback actions from the lists will now be honoured and focus will go back my main buttons instead of closing the dialog?
Reply
#67
Yes, but the onback commands from your lists will still be ignored but you can add them in the header of the dialogs via onload as setproperty for all containers where you want to have your own onback command.
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#68
Understood, thanks.
Reply
#69
works like a charm, thanks a lot Smile
 Image
Reply
#70
Hi @sualfred Getting a repeatable error on a specific movie in my library all the others I have checked work fine. Not sure what is so special about this one Huh

I am using:

RunScript(script.embuary.info,call=movie,external_id=$INFO[ListItem.IMDBNumber])

Here is full LOG.

Error report:

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeEncodeError'>
Error Contents: 'ascii' codec can't encode character u'\xe9' in position 16: ordinal not in range(128)
Traceback (most recent call last):
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\default.py", line 51, in <module>
Main()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\default.py", line 19, in __init__
TheMovieDB(self.call,self.params)
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_main.py", line 37, in __init__
self.entry_point()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_main.py", line 108, in entry_point
dialog = self.fetch_person() if self.call == 'person' else self.fetch_video()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_main.py", line 131, in fetch_video
data = TMDBVideos(self.call_params)
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_video.py", line 47, in __init__
self.result['similar'] = self.get_similar()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_video.py", line 138, in get_similar
list_item = tmdb_handle_movie(item,self.local_movies)
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_utils.py", line 401, in tmdb_handle_movie
list_item.setProperty('file', str(local_info['file']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 16: ordinal not in range(128)
-->End of Python script error report<--

Thanks Smile

EDIT: Found another movie
Same traceback but different position.
Code:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xbd' in position 30: ordinal not in range(128)
Do you want another log?

Quick search on Google led me HERE.

Don't know if that helps but I do see str on line 401 in tmdb_utils.

I also have no idea what I am talking about... Confused
Reply
#71
Thanks, should be fixed on my repo.

@mikeSiLVO 
Could you please confirm?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#72
Sorry, but I am still getting the same error.

2019-08-19 03:17:38.097 T:18446744073709551614 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeEncodeError'>
Error Contents: 'ascii' codec can't encode character u'\xe9' in position 16: ordinal not in range(128)
Traceback (most recent call last):
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\default.py", line 51, in <module>
Main()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\default.py", line 19, in __init__
TheMovieDB(self.call,self.params)
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_main.py", line 37, in __init__
self.entry_point()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_main.py", line 108, in entry_point
dialog = self.fetch_person() if self.call == 'person' else self.fetch_video()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_main.py", line 131, in fetch_video
data = TMDBVideos(self.call_params)
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_video.py", line 47, in __init__
self.result['similar'] = self.get_similar()
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_video.py", line 138, in get_similar
list_item = tmdb_handle_movie(item,self.local_movies)
File "C:\Program Files\Kodi (Matrix)\portable_data\addons\script.embuary.info\resources\lib\tmdb_utils.py", line 377, in tmdb_handle_movie
filenameandpath = str(local_info.get('file')).encode('utf-8')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 16: ordinal not in range(128)
-->End of Python script error report<--
Reply
#73
Found the issue. Gimme a few.

@mikeSiLVO 

solved
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#74
(Yesterday, 09:39)sualfred Wrote: Found the issue. Gimme a few.

@mikeSiLVO 

solved

Yep!

Thanks Smile
Reply
 
Thread Rating:
  • 2 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
script.embuary.info - the little ExtendedInfo brother52