henryjfry / repository.thenewdiamond

9 stars 4 forks source link

Diamondinfo GUI startup at Kodi boot #2

Closed minhgi closed 2 years ago

minhgi commented 3 years ago

Not really an issue. More of optional request to have option to disable the Diamond GUI from starting up when launching Kodi.

henryjfry commented 3 years ago

The GUI doesnt start up on its own when you launch Kodi. There is an option to start a plugin url when the service starts but that should be disabled by default.

minhgi commented 3 years ago

I don't think it is diamond that is triggering the GUI to come up. It could be my skin setting but I haven't found where. Kodi logs don't mention what is triggering it. GUI would pop up twice for top rated movies and top rate shows.

Funny, the original openinfo matrix version doesn't have that behavior. Sorry late reply.

henryjfry commented 3 years ago

Try disabling the setting in the settings (by default its false) "Reopen Last UI Screen After Playback Ends" thats the only thing I can think that might be triggering the ui opening on its own "Reopen Last UI Screen After Playback Ends". If you have a video loading on startup maybe? (But I would have thought that would run before anything else starts).

That or "Auto Load Plugin Route (use plugin://...)" and "Auto Load Plugin Route ENABLE" also disabled by default.

The GUI will appear if "script=False" is not provided in a relevant plugin url (ie diamondinfo or extendedinfo)? So if you had tried setting up a widget or there is maybe a skin widget pointing at extendedinfo, that might trigger the GUI to load?

Really dont know what is causing a double GUI load, something related to the window stack maybe? I would need more information. But it would be worth disabling "Use Window Stack?" which is true by default and seeing what happens? Are you sure its actually loading twice? Or is it loading, you start moving around and then it refocuses at the top of the screen? So like the screen has been displayed again but without any busy spinner or an additional "back" level? I have seen that kind of behaviour (load, i move, screen refocuses) and thats to do with the way it loads stuff and it finishes everthing off once threads finish. So if its getting information in the background that hasnt been cached or its refreshing the cache.

minhgi commented 2 years ago

Hi Henry... I took sometime off with Kodi and building a new computer. Back tracking to troubleshooting this issue with the double GUI for TopRateMovie and TopRateShows, it seem a fresh install of Kodi, BingieMod, and Diamondinfo have the exhibit the same issue. No widget was used. Someting with default skin setting causing it. Ugh. This one would be near impossible to troubleshoot unless I go to the official skin forum.

henryjfry commented 2 years ago

What skin is it. How exactly are you triggering the particular screen?

Tell me exactly what you are doing, how you are doing it, what is happening and what you expect to happen

So, I'm launching "RunPlugin(....." from a favourite/home screen sub menu/command line?

And the GUI screen loads and closes and then reopens? It loads once and then a 2nd one loads, so when I go back from the 2nd the first one is still there? Or it loads and then a few seconds later focus switches to the top of the screen?

And probably put a full debug log on pastebin or pastefile

Without that kind of detail I'll not be able to help narrow this down for you

henryjfry commented 2 years ago

I use titan bingie mod and it's working perfectly.

minhgi commented 2 years ago

I did fresh install of Kodi x64, installed BingieMod and Diamond repo, and the install the skin. Go through the default skin configuration and the install diamondinfo after that. I then exit out Kodi using the exit or quit button. Launch Kodi, TopRateMovie Info GUI would popup first, back out by usung the back button on the controller, the TopRatedShows Info would appeared afterwards. I haven'teven touch the setting in the skin or setup any widget.

minhgi commented 2 years ago

here the kodi logs booting up, letting the GUI popup, and then exiting.

https://www.dropbox.com/s/10j03ib6yowcarz/kodi.zip?dl=0

henryjfry commented 2 years ago

Describe the problem like i asked you to. Exactly how you are triggering the screen and everything else I asked for in my message above.

And post you full debug logs to a less shitty file host, pastefile is drag and drop, so drag and drop the full debug log without zipping it.

Otherwise I have to generate a dropbox download link, download it, extract it, and then look at it rather than.

Click link + read.

So im not going to look you logs until you have done what i've asked. You problem sounds like it might not be a problem at all and/or a skin issue. Im willing to help you, but not if you wont help me, help you.

henryjfry commented 2 years ago

Yep dropbox about one of the shittiest ways you could ahve picked to upload a simple log file.

You can add them in github directly? Otherwise use: https://www.pastefile.com

henryjfry commented 2 years ago

And its not a full debug log, LIKE I EXPLICITLY ASKED FOR

Trigger full debug logging before you do whatever generates the problem, do the thing, turn off full debug loging. Then export your log to https://www.pastefile.com (i dont need to see it starting up and shutting down)

But if you dont provide me the informaiton I've asked for im just going to close this issue and let you fend for yourself.

henryjfry commented 2 years ago

Looking at the log you provided there are a tonne of errors regarding threading. Some of the diamond info screens do use threading but I don't think the videolist does.

Anyway I mention this as it might be doing something weird with not being able to exit threads causing it to reload?

It loads the GUI and then it throws a threading error but doesn't say for which add-on. Then it appears to load the GUI again

It looks more like it's been triggered from another plugin call than reloading itself. Depending on how the videolist is being called this might be the explanation.

Which is why I asked you to provide that information. Kodi can sometimes cause a plugin call to run multiple times if it doesn't have a resolvedurl=true. If the threading is involved and causing it to crash it might have the effect of not fully setting up the window prior to that part crashing.

And then Kodi resends the plugin call because the last one didn't resolve properly.

However that's only the best guess I can make until you provide debugging logs.

You appear to have 4 widgets running? I see a number of skin helper widgets stuff running anyway. If there are multiple widgets try disabling them and restarting and seeing what happens.

I think they may be related to the threading errors, seems like the only other stuff to have started.

henryjfry commented 2 years ago

Also there is a newer/alternate version of titan bingie mod?

I'm on a version 2.0 Yours appears to be 1.0

https://forum.kodi.tv/showthread.php?tid=355993

minhgi commented 2 years ago

Hi Henry, Like i have mention, this a fresh install of the Kodi without touching default BingMod 2.0.1 skin setting or Diamondinfo. No widget is setup. It is as defualt as it can be. Other than debugging log, that would be my fault since I never use it to troubleshoot Kodi issue. Here is the complete debug log. A little bit overwhelmed by all the line information. LOL.

https://www.pastefile.com/pafepm (PasteFile said the log isn't till after a week)

https://justpaste.it/9kte7 (Also past here too)

henryjfry commented 2 years ago

Ok well the pastefile was only uploaded 9 hours ago and isnt there anymore. And the justpaste is unreadable.

So please do another debug log and can you provide me a proper download link?

Observe, dragged and dropped right into this github thread: kodi.log

Or use this kodi service: https://paste.kodi.tv/

henryjfry commented 2 years ago

Also please tell me the context of your problem. All you've done is say there is a problem and post some logs, you have done very little to explain the EXACT context of the problem.

So exactly how the particular screens you are trying to load are being triggered? What you have setup, eg a home screen menu option, or is this something happening automatically in the skin with extendedinfo? Are you using RunPlugin,RunScript,ActivateWindow to trigger the particular GUI screen etc.

You expect me to parse your logs and figure out your problem without doing a lick yourself to explain the issue.

Even with your full debug logs trying to figure out the problem without any kind of context is going to be tricky.

So tell me from start to finish, exactly what YOU are doing that causes this issue. What you expect to happen. What is happening. And provide full debug logs for the event. Check them after you upload them to see if they are readable and havent cut off the actual part containing the exact point where the problem occurs.

And probably tell me the time relating to the problem in the logs so i can narrow it down to the right section in the log file.

If you dont provide me with this informaiton, explained clearly in as much detail as you feel is necessarry for me to understand the context, im not sure im going to be much inclined to help you.

If you cant help me to help you, why should I help you at all?

henryjfry commented 2 years ago

I've had a look in Titan Bingie and there doesnt appear to be any extendedinfo plugin calls which would happen automatically to trigger a particular GUI screen.

At least not as far as I can tell.

minhgi commented 2 years ago

HI Henry,

I appreciate you trying to help and troubleshooting this specific issue. This issue can be replicate on any Windows PC by installing a fresh copy of Kodi, Diamondinfo, and BingieMod with default configuartion. I have done this 5 times on two different computers. I can't provide any context since I have giving the procedure how it was done and what was my focus. I'm just trying isolate and narrow down where the problem could be and I think something in the default BingieMod setting is triggering it. Anyway, I found the two triggered points for TopRateMove and TopRateTVShows in the log. You can search this in the log by doing a find or search using "toprated". I'm out of idea at this point other than letting you know this issue can replicate just by installing a fresh copy Kodi, BingieMod, and Diamondinfo using a Windows machine.

Complete log. https://paste.kodi.tv/omanitohaw.kodi

Triggered point "TopRatedMovies" 2021-10-11 06:34:12.157 T:11396 DEBUG : ------ Window Deinit (DialogNotification.xml) ------ 2021-10-11 06:34:30.857 T:17076 DEBUG : XFILE::CPluginDirectory::StartScript - calling plugin [B][COLOR white]Extended Info-Diamond_MOD[/COLOR]/B 2021-10-11 06:34:30.858 T:10228 DEBUG : Thread LanguageInvoker start, auto delete: false 2021-10-11 06:34:30.859 T:10228 INFO : initializing python engine. 2021-10-11 06:34:30.859 T:10228 DEBUG : CPythonInvoker(17, C:\Users\minhgi\AppData\Roaming\Kodi\addons\script.extendedinfo\plugin.py): start processing 2021-10-11 06:34:30.871 T:10228 DEBUG : -->Python Interpreter Initialized<--

Triggered point "TopRatedTVShows" 2021-10-11 06:34:32.313 T:11396 DEBUG : ------ Window Deinit (DialogBusy.xml) ------ 2021-10-11 06:34:36.812 T:11396 DEBUG : Keyboard: scancode: 0x0e, sym: 0x8, unicode: 0x0008, modifier: 0x0 2021-10-11 06:34:36.812 T:11396 DEBUG : CInputManager::HandleKey: backspace (0xf008) pressed, action is Back 2021-10-11 06:34:36.845 T:11396 DEBUG : ------ Window Deinit (C:\Users\minhgi\AppData\Roaming\Kodi\addons\script.extendedinfo\resources\skins\Default\1080i\script.extendedinfo-VideoList.xml) ------ 2021-10-11 06:34:36.879 T:11396 DEBUG : Keyboard: scancode: 0x0e, sym: 0x8, unicode: 0x0000, modifier: 0x0 2021-10-11 06:34:36.915 T:10228 DEBUG <CAddonSettings[script.extendedinfo]>: trying to load setting definitions from old format... 2021-10-11 06:34:36.929 T:17076 DEBUG : Skipped 3 duplicate messages.. 2021-10-11 06:34:36.929 T:17076 DEBUG : XFILE::CPluginDirectory::StartScript - calling plugin [B][COLOR white]Extended Info-Diamond_MOD[/COLOR]/B 2021-10-11 06:34:36.929 T:12584 DEBUG : Thread LanguageInvoker start, auto delete: false 2021-10-11 06:34:36.930 T:12584 INFO : initializing python engine. 2021-10-11 06:34:36.930 T:12584 DEBUG : CPythonInvoker(18, C:\Users\minhgi\AppData\Roaming\Kodi\addons\script.extendedinfo\plugin.py): start processing 2021-10-11 06:34:36.936 T:2996 ERROR : Exception ignored in: 2021-10-11 06:34:36.936 T:2996 ERROR : <Finalize object, dead> 2021-10-11 06:34:36.936 T:2996 ERROR :

henryjfry commented 2 years ago

Ok with that additional context i now know what is happening, it something specific to titan bingie and extendedinfo.

It calls topratedmovies or topratedtvshows on the Movies and Tv Hubs, and the original urls dont specify any "script=True" or "script=False", which by default I had setup to return as true when absent. Changing this in process.py to false when it gets the exception for that missing parameter will result in it returning the listitems only, which is what the skin wants.

So making that change you now get the busy dialog spinner, for a couple of seconds. So if you modify process.py:

        elif info == 'topratedmovies':
            from resources.lib import TheMovieDB
            tmdb_var = 'top_rated'
            filter_label = 'Top Rated Movies'
            media_type = 'movie'
            try:
                script = str(params['script'])
            except:
                Utils.hide_busy()
                script = 'False'
            if script == 'False':
                return TheMovieDB.get_tmdb_movies(tmdb_var)
            return wm.open_video_list(media_type=media_type, mode='list_items', filter_label=filter_label, search_str=TheMovieDB.get_tmdb_movies(tmdb_var), listitems=[])
        elif info == 'topratedtvshows':
            from resources.lib import TheMovieDB
            tmdb_var = 'top_rated'
            filter_label = 'Top Rated TV Shows'
            media_type = 'tv'
            try:
                script = str(params['script'])
            except:
                Utils.hide_busy()
                script = 'False'
            if script == 'False':
                return TheMovieDB.get_tmdb_shows(tmdb_var)
            return wm.open_video_list(media_type=media_type, mode='list_items', filter_label=filter_label, search_str=TheMovieDB.get_tmdb_shows(tmdb_var), listitems=[])
minhgi commented 2 years ago

ah..that did the tricked. The busy dialog spinned for about 5 seconds and the GUI didn't popup on fresh copy of Kodi. Do I need to make this change everytime there new Diamondinfo update? I can always this disable the update for the addon.

Appreciate the help with troubleshooting this issue. I can finally use the diamondinfo addon in my final build.

henryjfry commented 2 years ago

No im going to add that change into the next version, it was just to check it actually resolved the problem.

Im adding a youtube browser back into extendedinfo (it used to have this functionality before it broke some time ago), so im currently testing it to make sure its working before I push the next update.

minhgi commented 2 years ago

sound good. Looking forward to the update. and thanks again =).

henryjfry commented 2 years ago

Thats it updated now, v3.35