Open bigretromike opened 5 years ago
Maybe you have idea where the issue could be, and no we not disabling cache
.
Maybe I did break it in somepoint maybe it was broken from the start.
This need to be fixed.
Ok, what I understand the json is almost empty because he play file
instead of populating ListItem
and passing it to player.
Edit: according to Player
it does populate it with LiteItem
so I assume it query cache for it ?
2019-06-04 08:49:06.427 T:9240 DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin Nakamori('plugin://plugin.video.nakamori/menu/series/1952/type/Episode','53','','resume:false')
2019-06-04 08:49:06.427 T:10372 DEBUG: Thread JobWorker start, auto delete: true
2019-06-04 08:49:06.427 T:10640 DEBUG: Thread LanguageInvoker start, auto delete: false
2019-06-04 08:49:06.428 T:10640 INFO: initializing python engine.
2019-06-04 08:49:06.428 T:10640 DEBUG: CPythonInvoker(86, C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori\nakamoriplugin.py): start processing
2019-06-04 08:49:06.445 T:14092 INFO: Python interpreter stopped
2019-06-04 08:49:06.445 T:14092 DEBUG: Thread LanguageInvoker 14092 terminating
2019-06-04 08:49:06.529 T:10640 DEBUG: -->Python Interpreter Initialized<--
2019-06-04 08:49:06.529 T:10640 DEBUG: CPythonInvoker(86, C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori\nakamoriplugin.py): the source file to load is "C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori\nakamoriplugin.py"
2019-06-04 08:49:06.530 T:10640 DEBUG: CPythonInvoker(86, C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori\nakamoriplugin.py): setting the Python path to C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori;C:\Program Files\Kodi\addons\script.module.pil\lib;C:\Users\brm\AppData\Roaming\Kodi\addons\script.module.bottle\lib;C:\Users\brm\AppData\Roaming\Kodi\addons\script.module.future\libs;C:\Users\brm\AppData\Roaming\Kodi\addons\script.module.nakamori-lib\lib;C:\Users\brm\AppData\Roaming\Kodi\addons\script.module.nakamori\lib;C:\Users\brm\AppData\Roaming\Kodi\addons\script.module.nakamoriplayer\lib;C:\Users\brm\AppData\Roaming\Kodi\addons\script.module.routing\lib;C:\Users\brm\AppData\Roaming\Kodi\addons\script.module.web-pdb\libs;C:\Program Files\Kodi\system\python\DLLs;C:\Program Files\Kodi\system\python\Lib;C:\Program Files\Kodi\python27.zip;C:\Program Files\Kodi\system\python\lib\plat-win;C:\Program Files\Kodi\system\python\lib\lib-tk;C:\Program Files\Kodi;C:\Program Files\Kodi\system\python;C:\Program Files\Kodi\system\python\lib\site-packages
2019-06-04 08:49:06.530 T:10640 DEBUG: CPythonInvoker(86, C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori\nakamoriplugin.py): entering source directory C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori
2019-06-04 08:49:06.531 T:10640 DEBUG: CPythonInvoker(86, C:\Users\brm\AppData\Roaming\Kodi\addons\plugin.video.nakamori\nakamoriplugin.py): instantiating addon using automatically obtained id of "plugin.video.nakamori" dependent on version 2.25.0 of the xbmc.python api
2019-06-04 08:49:06.582 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: loading setting definitions
2019-06-04 08:49:06.582 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: trying to load setting definitions from old format...
2019-06-04 08:49:06.585 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: loading setting values
2019-06-04 08:49:06.807 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: loading setting definitions
2019-06-04 08:49:06.807 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: trying to load setting definitions from old format...
2019-06-04 08:49:06.810 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: loading setting values
2019-06-04 08:49:06.825 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: loading setting definitions
2019-06-04 08:49:06.825 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: trying to load setting definitions from old format...
2019-06-04 08:49:06.828 T:10640 DEBUG: CAddonSettings[plugin.video.nakamori]: loading setting values
2019-06-04 08:49:06.976 T:10640 DEBUG: CAddonSettings[script.module.nakamori]: loading setting definitions
2019-06-04 08:49:06.976 T:10640 DEBUG: CAddonSettings[script.module.nakamori]: trying to load setting definitions from old format...
2019-06-04 08:49:06.976 T:8860 DEBUG: [plugin.video.nakamori][routing] Dispatching to 'try_inner2', args: {'series_id': 1952, 'episode_type': 'Episode'}
2019-06-04 08:49:07.269 T:8860 DEBUG: Previous line repeats 1 times.
2019-06-04 08:49:07.269 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.269 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.287 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.287 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.289 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.289 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.290 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.290 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.303 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.303 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.305 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.305 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.306 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.306 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.307 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.307 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.308 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.308 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.309 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.309 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.310 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.310 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.311 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.311 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.312 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.312 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.313 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.313 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.314 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.314 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.315 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.315 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.316 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.316 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.317 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.317 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.319 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.319 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.320 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.320 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.321 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.321 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.322 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.322 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.322 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.323 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.323 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.323 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.324 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found.
2019-06-04 08:49:07.324 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found.
2019-06-04 08:49:07.338 T:220 DEBUG: Thread waiting 220 terminating
2019-06-04 08:49:07.340 T:872 DEBUG: Thread BackgroundLoader start, auto delete: false
2019-06-04 08:49:07.345 T:10372 DEBUG: ffmpeg[2884]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.
2019-06-04 08:49:07.347 T:9240 DEBUG: ffmpeg[2418]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.
2019-06-04 08:49:07.354 T:13648 DEBUG: ------ Window Deinit (DialogBusy.xml) ------
2019-06-04 08:49:07.354 T:13648 DEBUG: Saving fileitems [plugin://plugin.video.nakamori/menu/series/1952/type/Episode]
2019-06-04 08:49:07.358 T:13648 DEBUG: -- items: 25, sort method: 0, ascending: false
2019-06-04 08:49:07.362 T:872 DEBUG: Thread BackgroundLoader 872 terminating
2019-06-04 08:49:07.362 T:10048 DEBUG: Thread BackgroundLoader start, auto delete: false
2019-06-04 08:49:07.393 T:10048 DEBUG: Thread BackgroundLoader 10048 terminating
2019-06-04 08:49:07.499 T:10640 WARNING: Attempt to use invalid handle 53
Those look interesting: 2019-06-04 08:49:07.324 T:8860 DEBUG: CSettingsManager: requested setting (context_show_info) was not found. 2019-06-04 08:49:07.324 T:8860 DEBUG: CSettingsManager: requested setting (show_refresh) was not found. 2019-06-04 08:49:07.354 T:13648 DEBUG: Saving fileitems [plugin://plugin.video.nakamori/menu/series/1952/type/Episode]
If you dont believe me:
This is how ListItem
looks when you enter series:
And this is how it looks when you get cached results after watching episode:
Netflix can live with if elif else
: https://github.com/asciidisco/plugin.video.netflix/blob/master/resources/lib/Navigation.py#L93
But its just for reference - for now.
edit: maybe someone on forum would know what is the issue (https://forum.kodi.tv/showthread.php?tid=344449) but I doubt in that.
I don't know what you're talking about. Please explain what exactly the situation is. I can tell you that I have no issues even kind of what you are describing with cache disabled, so it's probably somewhere in the cache system.
I'm not saying to disable cache, but that helps say where the issue might be in the code
Im hoping you are checking on k18.2 because anything lower is consider legacy. Where can I disable cache ? because from code I see that only Filters have enabled cache, and the issue is inside series. If you where reffering to that one cache option then Im testing it without cache for some time.
edit: to be clear when I write cache
I don't have on mind our cache.py
but Kodi internal one.
Also just check this: STEP BY STEP :
{"jsonrpc":"2.0","id":27,"method":"Player.GetItem","params":{"playerid":1,"properties":["showtitle","title","episode","season","uniqueid","playcount","lastplayed","userrating","tvshowid","file","mediapath"]}}
You latest version of all modules - im unable to push them right now. So we are one same page;
I simplify core (without overwrite objects), without DirectoryListing() etc. Results are mixed: the issue with different list of items looks like its gone (but can't be sure), but the json-rpc databased cached response is present.
Butchered version with revert fancy core code: (for reference if I need it at home) X.zip
.... Are you using the library metadata agent or the plugin? By cache, I thought you mean the database cache in Nakamori, not the directory cache in Kodi. I still don't really know which you are referring to. I'm on 17.6 still, and it works there. I've not tried it in 18 in a while.
I don't know how json-rpc is relevant
I'm using plugin ( but the issue is in both because how the metadata agent works for plugin source). By cache it looks like its most database for kodi (or internal cache)
json-rpc is VERY relevant. Just check few post before this one I made you STEP-BY-STEP guide how to see the bug.
Wait, I think I know what you are talking about. I'll see if I can reproduce the one I'm thinking of and screenie it
Im monitoring email but have limited time, will jump into if I see your respons
On June 4, 2019 2:57:02 PM GMT+02:00, da3dsoul notifications@github.com wrote:
Wait, I think I know what you are talking about. I'll see if I can reproduce the one I'm thinking of and screenie it
-- You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/bigretromike/nakamori/issues/337#issuecomment-498660043
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
@da3dsoul how is the reproducing issue coming a long ?
It's not. I'm in bed doing not that
Bad code:
2019-06-05 09:31:28.569 T:2568 NOTICE: Nakamori|nakamori_player::player_loop#L167 -> Playback Ended - Shutting Down: 0
2019-06-05 09:31:29.668 T:12500 NOTICE: ~~~ ~~ ~ ~~ --- > path: /arbiter/10/Container.Refresh, rule: /arbiter/{arg}
2019-06-05 09:31:30.404 T:14080 NOTICE: ~~~ ~~ ~ ~~ --- > path: /menu/series/1952/type/Episode, rule: /menu/series/{series_id}/type/{episode_type}
2019-06-05 09:31:30.980 T:13040 NOTICE: Previous line repeats 1 times.
2019-06-05 09:31:30.980 T:13040 WARNING: Attempt to use invalid handle 18
Good path:
2019-06-05 09:35:23.920 T:3968 NOTICE: Nakamori|nakamori_player::player_loop#L167 -> Playback Ended - Shutting Down: 0
2019-06-05 09:35:25.037 T:8616 NOTICE: ~~~ ~~ ~ ~~ --- > path: /arbiter/10/Container.Refresh, rule: /arbiter/{arg}
2019-06-05 09:35:25.783 T:14236 NOTICE: ~~~ ~~ ~ ~~ --- > path: /menu/series/1952/type/Episode, rule: /menu/series/{series_id}/type/{episode_type}
2019-06-05 09:35:26.255 T:8220 NOTICE: Previous line repeats 1 times.
2019-06-05 09:35:26.255 T:8220 WARNING: Attempt to use invalid handle 30
Looks like its not a routing problem.
For me it looks like when you stop playing file in RIGHT moment, you get to see the second image (Videos) then Container.Refresh hit ( and because of some reason, sometimes it does refresh other time it don't ) and you reload /menu/series/{series_id}/type/{episode_type}.
You added Refresh
because we send mark flag to shoko, and want a fresh list with new watch mark flags, but we end up getting different ListItem
list and refresh it so fast that we don't see it. It just a spinning wheel and proper list.
My theory for now is:
fail_menu/finish_menu -> you use it to bypass spinning wheel ( but you delete ListItem
and Kodi recreate it with database????)
Sadly my theory is bad, you just named those things del
(what were you thinking) overloading builtin function to make something totally different from them ?! - nvm
By disabling Container.Refresh
in player after stopping episode I'm unable to access that "fake ListItem list" but it still response json-rpc with bad data.
I'm not sure if it can be related to arbiter
... because even if its refreshing and got terminated while building list and as failback it does produce a working List and because it got terminated it does not refresh it, the issue would be gone as soon as I disable that refresh with arbiter.
Now the theory of terminated building list is more possible:
Also after adding some extra log (NOTICE) points I see:
2019-06-05 10:23:42.446 T:5648 NOTICE: Nakamori|nakamori_player::player_loop#L167 -> Playback Ended - Shutting Down: 0
2019-06-05 10:23:42.479 T:5648 WARNING: Attempt to use invalid handle -1
2019-06-05 10:23:44.165 T:6380 NOTICE: +++ finish_menu +++ 45 45 45
2019-06-05 10:23:44.287 T:13052 WARNING: Attempt to use invalid handle 46
2019-06-05 10:23:44.350 T:13052 NOTICE: +++ finish_menu +++ 46 46 46
2019-06-05 10:23:44.350 T:13052 WARNING: Attempt to use invalid handle 46
2019-06-05 10:23:44.442 T:6380 WARNING: Previous line repeats 1 times.
2019-06-05 10:23:44.442 T:6380 WARNING: Attempt to use invalid handle 45
2019-06-05 10:23:44.624 T:13052 WARNING: Previous line repeats 1 times.
2019-06-05 10:23:44.624 T:13052 WARNING: Attempt to use invalid handle 46
I would assume its because you load it after playing (finish 1), and then try to reload with container.refresh (finish 2) but why there is even more of them, and why they are invalid ?
this is the log line I added:
xbmc.log('+++ finish_menu +++ %s %s %s' % (routing_plugin.handle, plugin_dir.handle, int(sys.argv[1])), xbmc.LOGNOTICE)
I didn't name them del, overriding built in. When you make a __del__
method, then it is run when the object is disposed.
If you don't understand a concept that I use, you should look it up before assuming that it was wrong.
A possible cause that I don't think is the case but is possible: Kodi 18 doesn't dispose the objects with the new python recycling system
Now I'm going back to sleep. Night night
@da3dsoul sorry for quality
I didn't name them del, overriding built in. When you make a
__del__
method, then it is run when the object is disposed.
you wrote __del__
function that you call by del object
in few places - but nvm
It act more like it dispose object far more aggressively and maybe rebuild them from database (because it will work fine on files that were never played before and it will be broken for all things you already played)
Currently I found out that the data that is saved in database is data from InfoVideoTag: https://forum.kodi.tv/showthread.php?tid=344481&pid=2859212#pid2859212
If I will be able to populate InfoVideoTag the 90% of the issue will be gone;
Considering that it works in 17.6, I would report the info in better English, with lots of screenshots. It's clearly just a quirk at the least, bug at the most. It'll need documented with the proper way to handle it, either way. I might be able to later, but no promises.
From my experience you need a "working plugin example" of the issue; Even if you provide it its not guarantee that any one will pick up; If you fix it yourself there is always something else better to be done; If you make an issue there are slime chance than anything will be done - especially if this is 'intended way' I will try to fix it also. There is to many small issues that make me tick in Kodi each day.
I'll mock up a proper extraction of my fancy ListItem stuff
Now? or in unknown future ?
Later...
Also if you think this is the Leia fault please make a issue while using proper English, and link it here. Thank you.
Will do. I know you aren't active on discord much. I just started a new job and wrecked on a scooter, so I've been "busy". Sometimes busy doing something, sometimes busy doing nothing. Both are valid considering. I'm okay, but yeah, I'm not pushing myself intentionally
I try to be active there but in the end its the same stuff; Glad you ok; I know you started job; I know you dont like it; I just want to enjoy anime like I used to do, and I dont like when something is pissing me like this is. Imo, its not gonna be easier :-) thats what life is, struggling with time.
This shit took me fuck tones of time... But it looks like its fix in master (kodi): https://github.com/xbmc/xbmc/commit/f5b5419e9bf281ceaf698c632316305930eb6130
But if there is a way to make it work in Leia... Still waiting for the extractor you said ealier - but probably you already did it - but maybe it's not what you describe before.
Im not sure, because right now the json-rpc return proper data, but I cannot play any file... probably something broke matrix.
Currently I found out that the data that is saved in database is data from InfoVideoTag: https://forum.kodi.tv/showthread.php?tid=344481&pid=2859212#pid2859212
If I will be able to populate InfoVideoTag the 90% of the issue will be gone;
Ok this is KODI BUG....
Current issue is this:
no2
andContainer.Refresh
refresh it and reload theno1
Another BIGGER issue:
{"jsonrpc":"2.0","id":27,"method":"Player.GetItem","params":{"playerid":1,"properties":["showtitle","title","episode","season","uniqueid","playcount","lastplayed","userrating","tvshowid","file","mediapath"]}}
You will get all the data from nakamoriget_listitem()
:But if you play the file again (from any listitem, you can even exit and move back) and query it again you will get different (almost empty) response from rpc-json.
Looking at
mediapath
andfile
first query return plugin://endpoint, but the second one (the saved in database) give you real url path.This is critical issue for me, for now i'm not revert back the rewrite code, but if we ain't able to fix this im willing to dissect kodi_models and if that don't help God be my witness,
routing_plugin
will be next and if that don't help... then.... looks like we are back to good oldguibuilder.py
thing.