henryjfry / repository.thenewdiamond

9 stars 4 forks source link

replace kodi info with thenewdiamond info #26

Closed hcgiub001 closed 2 months ago

hcgiub001 commented 3 months ago

not sure if it's possible but I'm using FENtastic and would love to replace kodi info with thenewdiamond. is their a command I can attach to a key? thanks love the addon by the way, and I'm glad you allow us to choose which recommend to use. I was the guy who asked you like a few years back to get IMDB recommended, thanks!

also if I choose IMDB , it still says reccommended by TMDB, it's no big issue but thought I'll mention it

henryjfry commented 2 months ago

Im pretty sure it is technically possible but its not easy and Im not much of a skinner and dont actually use that skin.

There are skins that do use extendedinfo, which is why there are two versions of the addon so you can use extendedinfo/diamondinfo side by side if you like the other extendedinfo versions floating around.

But im fairly certain fentastic would need extensive modification to use a different info screen.

I just use the auto load on startup setting in extendedinfo and just use the script screens as my skin for everything, no messing around with widgets or view settings and it only reloads screens when they actually reload.

Re: the tmdb/imdb recommendations. Again thats a skin/xml thing and i could change it but like you say its totally cosmetic. The actual recommendations are working fine. Imdb occasionally breaks them but for now they work.

henryjfry commented 2 months ago

Although i did just add a function to access the info screen for the currently playing item? So you could load that from the keymap:

RunScript(script.extendedinfo,info=context_info)

hcgiub001 commented 2 months ago

Although i did just add a function to access the info screen for the currently playing item? So you could load that from the keymap:

RunScript(script.extendedinfo,info=context_info)

awesome! so this loads the diamondinfor instead of pressing context menu and finding the Diamond_info ? I'll wait for update and report

henryjfry commented 2 months ago

Although i did just add a function to access the info screen for the currently playing item? So you could load that from the keymap: RunScript(script.extendedinfo,info=context_info)

awesome! so this loads the diamondinfor instead of pressing context menu and finding the Diamond_info ? I'll wait for update and report

Yeah itll load the info screen for the currently playing item. I could potentially get it to work for the currently selected item, is that what you need too?

hcgiub001 commented 2 months ago

Although i did just add a function to access the info screen for the currently playing item? So you could load that from the keymap: RunScript(script.extendedinfo,info=context_info)

awesome! so this loads the diamondinfor instead of pressing context menu and finding the Diamond_info ? I'll wait for update and report

Yeah itll load the info screen for the currently playing item. I could potentially get it to work for the currently selected item, is that what you need too?

yes sorry I'd like currently selected item, then we don't need to rely on a skin to load your addon. we just change keymap

hcgiub001 commented 2 months ago

I can't find the code you said I'm on this path C:\Users\ouokh\AppData\Roaming\Kodi\addons\script.extendedinfo\resources\lib

henryjfry commented 2 months ago

I may not have actually pushed any of this to my repo.

Should be available on v8.35 which ive just pushed now

henryjfry commented 2 months ago

Ok so v8.35 currently selected item or playing video info screen:

RunScript(script.extendedinfo,info=context_info)

hcgiub001 commented 2 months ago

I just updated to version 8.35 I mapped this to my i key RunScript(script.extendedinfo,info=context_info)

then when I'm in Fenlight and this movie is highlighted and I press i nothing happens image

henryjfry commented 2 months ago

I need to see the log

hcgiub001 commented 2 months ago

https://paste.kodi.tv/omokahexab

I tried loading two movies, this time I had spinning dialog animation but nothing happened so I pressed back after 10 seconds

henryjfry commented 2 months ago

Ok i cant actually see in the logs where its doing anythiong because you ahve turned the full debug log on.

V8.35 has a print statement which should indicate if fen is providing enough information for this to work

henryjfry commented 2 months ago

Kodi helpfully makes accessing informaiton from list items more difficult that it needs to be. And this relies upon "ListItem.IMDBNumber" being populated

henryjfry commented 2 months ago

But ive tested it in fenlight and it does work

hcgiub001 commented 2 months ago

https://paste.kodi.tv/gisenoxazu

I'm not sure how to do the log, this is what my settings for log is Screenshot (188)

I tried in fenlight and in umbrella and it didn't work

hcgiub001 commented 2 months ago

I just tried in TheMovieDb Helper and it's the same

henryjfry commented 2 months ago

Well i cant see whats actually going on. Disable debug logging. Reboot.

Do the thing. Manually copy and paste your logs/drag and drop onto a github message.

Dont use the log uploader.

henryjfry commented 2 months ago

I think the logs are too long as I can only see a "starting" message for extended info and cant actually see where you are doing the click

henryjfry commented 2 months ago

In fenlight you should see:

kodi-send --action="RunScript(script.extendedinfo,info=context_info)"

2024-08-03 16:55:31.220 T:3769     info <general>: {'id': 1, 'jsonrpc': '2.0', 'result': {'Container.ListItem.UniqueID(imdb)': '', 'ListItem.DBID': '', 'ListItem.DBTYPE': 'movie', 'ListItem.Episode': '', 'ListItem.FileNameAndPath': 'plugin://plugin.video.fenlight/?mode=playback.media&media_type=movie&tmdb_id=748783', 'ListItem.IMDBNumber': 'tt5779228', 'ListItem.Label': 'The Garfield Movie', 'ListItem.MovieTitle': '', 'ListItem.Season': '', 'ListItem.TVShowTitle': '', 'ListItem.Title': 'The Garfield Movie', 'ListItem.UniqueID(imdb)': 'tt5779228', 'ListItem.UniqueID(tmdb)': '748783', 'ListItem.Year': '2024'}}===>PHIL2
2024-08-03 16:55:31.220 T:3769     info <general>: {'dbid': '', 'id': '748783', 'imdb_id': 'tt5779228', 'name': 'The Garfield Movie'}===>PHIL
henryjfry commented 2 months ago

So im not convinved you are actually triggering this plugin call and I think your logs are erroring here:

2024-08-03 08:51:32.924 T:16916   debug <general>: CPythonInvoker(39, C:\Users\ouokh\AppData\Roaming\Kodi\addons\script.fentastic.helper\resources\lib\default.py): script successfully run
2024-08-03 08:51:32.924 T:16916   debug <general>: CPythonInvoker::onExecutionDone(39, C:\Users\ouokh\AppData\Roaming\Kodi\addons\script.fentastic.helper\resources\lib\default.py)
2024-08-03 08:51:33.132 T:19084   debug <general>: Keyboard: scancode: 0x4d, sym: 0x113, unicode: 0x00, modifier: 0x0
2024-08-03 08:51:33.132 T:19084   debug <general>: CInputManager::HandleKey: right (0xf083) pressed, window 10000, action is Right
2024-08-03 08:51:33.157 T:16916   debug <general>: Python interpreter stopped
2024-08-03 08:51:33.157 T:16916   debug <general>: Thread LanguageInvoker 16916 terminating
2024-08-03 08:51:33.178 T:15408   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ValueError'>
                                                   Error Contents: list.remove(x): x not in list
                                                   Traceback (most recent call last):
                                                     File "C:\Users\ouokh\AppData\Roaming\Kodi\addons\script.fentastic.helper\resources\lib\default.py", line 3, in <module>
                                                       routing()
                                                     File "C:\Users\ouokh\AppData\Roaming\Kodi\addons\script.fentastic.helper\resources\lib\modules\router.py", line 90, in routing
                                                       return modify_keymap()
                                                     File "C:\Users\ouokh\AppData\Roaming\Kodi\addons\script.fentastic.helper\resources\lib\modules\custom_actions.py", line 96, in modify_keymap
                                                       keyboard_tag.remove(tag)
                                                   ValueError: list.remove(x): x not in list
                                                   -->End of Python script error report<--

2024-08-03 08:51:33.178 T:15408   debug <general>: CPythonInvoker::onExecutionDone(38, C:\Users\ouokh\AppData\Roaming\Kodi\addons\script.fentastic.helper\resources\lib\default.py)
henryjfry commented 2 months ago

No add the log file as an attachment. Find the log file in windows, drag and drop.

C:\Users\ouokh\AppData\Roaming\Kodi\temp\kodi.log

or

C:\Users\ouokh\AppData\Roaming\Kodi\kodi.log

hcgiub001 commented 2 months ago

kodi.log

hcgiub001 commented 2 months ago

sorry is that better?

henryjfry commented 2 months ago

Better but its not actually doing anything. Can you check that the keymap is actually setup correctly?

Like set it to load the favourites and make sure the key is actually enabled? Because your logs give no indication its trying to do anything

The other logs had weird "script.fentastic.helper\resources\lib\modules\custom_actions.py" errors.

hcgiub001 commented 2 months ago
RunScript(script.extendedinfo,info=context_info) RunPlugin(plugin://plugin.video.fenlight/?mode=custom_key.more_like_this) Delete RunScript(script.extendedinfo,info=context_info) Playlist ToggleWatched ActivateWindow(Home)

I just mapped another key (right) to trigger it. when I click on right it just does spinning dialogue

hcgiub001 commented 2 months ago

now I set the i key to this

RunScript(script.extendedinfo,info=context_info) RunPlugin(plugin://plugin.video.fenlight/?mode=custom_key.more_like_this) Delete Info Playlist ToggleWatched ActivateWindow(Home)

and information loaded up as expected

henryjfry commented 2 months ago

For "right" what do your logs show

You might need to do a RunPlugin rather than RunScript. eg:

RunPlugin(plugin://script.extendedinfo/?info=context_info)

henryjfry commented 2 months ago

Check your logs:

2024-08-03 09:12:52.878 T:21068 info : CAddonMgr::ADDON::CAddonMgr::FindAddons: script.extendedinfo v8.33 installed

henryjfry commented 2 months ago

Did you actually update the addon, because you will struggle to load code which I ahvent written yet

And it makes sense why the busy spinner was coming up and nothing happening becasuse you never updated

hcgiub001 commented 2 months ago

can't apologise enough, I waited for the update, then I downloaded your repo and opened it in zip file. It updated dimond repo but for extra diamon repo it showed 8.35 but I had to click it to update it and I didn't thinking it was updated. so sorry for wasting your time. but it works awesomely. I don't get why no one has ever asked this before? now I can just use i to load your information.

you could have a setting in your addon that says do you want to use this when you press information and then create a xml to place inside keymaps folder, thats what fentastic does to have the trailers activate when we press t and has gen.xml in keymaps with this

`

RunScript(script.fentastic.helper, mode=play_trailer) RunScript(script.fentastic.helper, mode=play_trailer)

`

again sorry for this bother, it's awesome now