MoojMidge / service.upnext

GNU General Public License v2.0
19 stars 5 forks source link

Plugin functionality with Jellycon (Jellyfin) #16

Closed humdedum1 closed 1 year ago

humdedum1 commented 1 year ago

Merely a suggestion and curiosity. Is it possible or something you might undertake? If so, what can I do to assist with information? Liked it with Jellyfin for Kodi, but that addon itself is a bit wobbly so had to swap.

MoojMidge commented 1 year ago

As far as I know it should already work with Jellycon, as Jellycon included functionality to integrate with the official Up Next plugin, and that should work with this fork as well. If it doesn't there could be a bug.

If you provide a log when it doesn't work then I can have a look. Make sure to enable debug logging in the UpNext addon settings (Settings > Expert > Log Level, set to Debug).

humdedum1 commented 1 year ago

Seems it works after a fresh install, something I had must've broken it when I posted. Wrote up the steps I used to test and included log for posterity though, maybe something useful in there for all I know.

Kodi 19.5, default settings, official repo tmdb, fresh install. Window shows, no next episode info, tmdb player does not detect Jellycon (sure that's Jellycon's fault).

kodi.log

Default video length popup to 20, auto action play, delay before default 1 sec (had to fiddle so I actually could press play it showed up so late in the episode), but updated tmdb from jurial repo.

kodi.log

EDIT: Widgets don't work but I did not expect or need them to.

MoojMidge commented 1 year ago

The links to the logs don't work. They may be private or need to be authorised. Easier just to upload to Github in your reply.

That being said, and without looking at the logs, note that the TMDB Helper integration is experimental and doesn't actually work properly at the moment with any released version of the plugins. Also Jellycon shouldn't need to use TMDB Helper to work with UpNext.

humdedum1 commented 1 year ago

The links to the logs don't work. They may be private or need to be authorised. Easier just to upload to Github in your reply.

That being said, and without looking at the logs, note that the TMDB Helper integration is experimental and doesn't actually work properly at the moment with any released version of the plugins. Also Jellycon shouldn't need to use TMDB Helper to work with UpNext.

Strange, checked the links right after I posted and they worked, but not anymore. Had a popup whining about tmdbhelper couldn't be found and was required.

Disabled tmdb integration and disabled tmdbhelper, dialog no longer shows.

Tried leaving tmdbhelper on but integration off. Not showing.

Tried with latest settings I set in post above and default. Default makes window show, but next episode does not play. Jellycon does not default to a playlist when ep started from Next Up and such.

MoojMidge commented 1 year ago

Your logs indicate that Jellycon is not sending any next episode details to Up Next.

A quick look at the Jellycon code indicates that the functionality to integrate with Up Next exists, but is not used anywhere.

The function call that sends the data was removed in https://github.com/jellyfin/jellycon/pull/73/files#diff-e49c789a4594d2ca03b9a90e95f99711b99651833f021725f1adc00e09b09251L499, and Jellycon instead appears to have implemented their own version of Up Next within Jellycon itself.

Not sure why that internal functionality doesn't work, but that is an issue for Jellycon. You can raise it with them or request that the Up Next integration be added back.

Alternatively, eventually the TMDB Helper integration was intended to workaround issues like this, but it is not available yet.

humdedum1 commented 1 year ago

Alright, I'll chat up the Jellycon guys, see if they have any interest in playing with compatibility between that and this. Thanks for having a look!

MoojMidge commented 1 year ago

@humdedum1 - I was going to let you know the updates for TMDB Helper and UpNext have now been released, which provides a workaround for plugins that may not have added support for UpNext, but do have a TMDB Helper player configured, but I see that the Jellycon guys are already looking to add support back in.

If you are still interested in testing it would be good to see whether the concept of using TMDB Helper players as a shim/proxy for UpNext integration actually works properly.

To try it out install the following latest versions of TMDB Helper and UpNext, and enable to TMDB Helper integration in the UpNext settings:

humdedum1 commented 1 year ago

Yeah, had a chat with mcarlton about it on the jellyfin discord.

Here's a few plays, fresh install, default settings was the main testing part. Changed a few settings around in Jellycon to see if its event interfered, doesn't seem like it. No dialog popup. Not even TMDB players.

Got my PC set up as a test bed to make things a bit easier for me. Editing all sorts of stuff gets tiring on a phone. Guess we'll stick with trying to make TMDB players work, then I'll check mcarlton's PR for the integration of UpNext.

A bit of tweaking made the TMDB player show up. Plays the next episode fine. Still the clunkiness of it searching for X episodes and me having to choose the right one is jarring. Kinda screws me over if I don't pay attention, if it doesn't default properly to the next episode. Think that's a TMDB Helper thing though, not yours.

MoojMidge commented 1 year ago

Thanks for testing!

Looks like there are a couple of issues:

Ultimately the PR to get UpNext integration working in Jellycon is the way to go, but your testing is really helpful for scenarios where that is not possible for other plugins.

humdedum1 commented 1 year ago

Glad to be of help. Got my PC set as a tested so can do more testing at fairly short notice if needed. I'm about to check on the PR from mcarlton, but like you said - it's nice to account for outliers.

Removed old logs for now. Curious how much "sensitive" info they contain.

MoojMidge commented 1 year ago

All good.

The issue with the Jellycon player is that TMDB Helper looks up the episode in TMDB (obviously) by using the tvshow title, season number and episode number. However the Jellycon player searches by using the episode title. This creates a problem because the episode title is different in TMDB compared to what is in your Jellyfin library i.e. titled "Virus Zone" on TMDB but titled "3rd Zone" in Jellyfin.

When the episode title is not found, then the Jellycon player is configured to create a dialog where you can select the right episode.

So everything is working as expected, but the UpNext and TMDB Helper integration is a little too simple, just at the moment, to cover these discrepancies.

humdedum1 commented 1 year ago

Happy to report though that at it functions with JellyCon itself now with the commit from mcarlton. All that's missing now is to see if it works "out of the box" with Kodi 20. Probably not, but I'll still give it a try.

EDIT: To the surprise of absolutely noone, it doesn't. Nexus is also so fresh I can't be bothered to really try either.

MoojMidge commented 1 year ago

EDIT: To the surprise of absolutely noone, it doesn't. Nexus is also so fresh I can't be bothered to really try either.

Jellycon as a whole or just the UpNext integration doesn't work in Nexus?

humdedum1 commented 1 year ago

EDIT: To the surprise of absolutely noone, it doesn't. Nexus is also so fresh I can't be bothered to really try either.

Jellycon as a whole or just the UpNext integration doesn't work in Nexus?

I'll have a look after I wake up, tested it on my Shield which wasn't identically set up to the pc, see if it's there as well. I did not get a dialog at all on the shield with Nexus.

humdedum1 commented 1 year ago

So yeah, it actually works flawlessly on my PC, I'll see if I can do some extra digging on my Shield to get it working there. Currently trying to see if I can get Jellyfin for Kodi to behave on the shield, but it's not cooperating. If I drop back to Jellycon on it, I'll give it a whirl on the shield straight away.

humdedum1 commented 1 year ago

Never mind. User error.

Yeah, identical settings as far as the add ons involved go on the shield, no dialogue, not the auto-detect credits one or the X time left on video. Tested same videos on PC and worked fine. I'll do another run a bit later and scrub then send a log for you.

MoojMidge commented 1 year ago

Good to hear it is working with the Jellycon PR.

Unfortunately the TMDB Helper integration is not going to help, as there doesn't appear to be a Jellycon plugin endpoint to search Jellyfin for episodes by tvshow title, season, and episode. But, at the least, I will update the THDB Helper integration so that it will be optional to show the selection dialogs when the episode is not found.

Thanks again for the testing. Let me know if there are any issues with the Jellycon integration.