Tikipeter / tikipeter.github.io

76 stars 13 forks source link

Autoplay next episode window behaviour - playback failed #7

Closed matthamilton13 closed 7 months ago

matthamilton13 commented 8 months ago

I'm getting "playback failed" prompt when I use "cancel" on the autoplay next episode window. Also, similar behavior when done nothing with the autoplay window, as explained in point 2.

Below are the things I've done in sequence to reproduce the errors.

  1. Clicked cancel on notification, got playback failed prompt, click ok, current episode stops.
  2. Do nothing with the notification and let the next episode play. Click stop on the next episode. It begins to scrape and then play the previous episode. After stopping that one, playback failed prompt. Click ok. Another prompt. Click ok.

https://paste.kodi.tv/afurupuyox

matthamilton13 commented 7 months ago

The same behaviour - failed playback prompt is popping up when pressing back from the scraping results screen.

Tikipeter commented 7 months ago

Are you using TMDbHelper to initiate playback?

matthamilton13 commented 7 months ago

No, all is done by widgets pointing directly to Fen.

Tikipeter commented 7 months ago

Initiate playback from within Fen and see if the error occurs.

matthamilton13 commented 7 months ago

The same thing occurs. Log below. I played an episode from Fen addon, TV Shows > Next Episodes, at the end I got failed playback prompt, no window. I played a different episode from the same place. Got the window with close/play/cancel, clicked cancel, failed playback. Thanks.

https://paste.kodi.tv/fafosubobu

Tikipeter commented 7 months ago

I don't know why something like this is showing up in the log if you aren't using TMDbHelper at all for playback.

GetDirectory - Error getting plugin://plugin.video.themoviedb.helper/?tmdb_id=64978&tmdb_type=tv&season=13&episode=1&nextpage=false&fanarttv=false&cacheonly=true&length=1&info=videos

If you're sure you're not using TMDbHelper for playback, then I have no idea why TMDbHelper is appearing in the log like this. I don't have TMDbHelper installed and I'm unable to reproduce this issue. At all.

This snippet of the log, when failure occurs, also shows that SOMETHING has added this command to Kodi's playlist. Which of course fails.

Playlist Player: skipping unplayable item: -1, path [plugin://plugin.video.fen/?mode=playback.media&media_type=episode&tmdb_id=64978&season=13&episode=1]

Fen/Fen Light do not use Kodi's playlist function at all. Ever. There is not one line of code in Fen/Fen Light to access or manipulate Kodi's playlist.

Therefore my belief is TMDbHelper is somehow inserting itself into the playback process. But I have no idea how or why.

matthamilton13 commented 7 months ago

Like I said, either widgets pointing directly to Fen lists, or playback from the addon itself. I'm using Arctic Fuse skin.

Tikipeter commented 7 months ago
GetDirectory - Error getting plugin://plugin.video.themoviedb.helper/?tmdb_id=64978&tmdb_type=tv&season=13&episode=1&nextpage=false&fanarttv=false&cacheonly=true&length=1&info=videos
Playlist Player: skipping unplayable item: -1, path [plugin://plugin.video.fen/?mode=playback.media&media_type=episode&tmdb_id=64978&season=13&episode=1]

Then for some reason it appears TMDbHelper, on behalf of the skin, is making a Kodi playlist item anyway.

I might have to install that wretched skin and see what's going on, because it is not an issue when using Fen with the 3 skins I test with.

Might be end of the road for Fen/Fen Light being used with Jurial skins, because I'm definitely not re-coding the entire playback mechanics Fen//Fen Light uses.

Let me see what's going on....

Tikipeter commented 7 months ago

Still not getting the issue to happen.

Apart from testing it with default Estuary skin, and TMDbHelper disabled, I don't see what can be done.

matthamilton13 commented 7 months ago

What can I do to help you narrow it down?

Tikipeter commented 7 months ago

Test it with default Estuary skin, and TMDbHelper disabled.

matthamilton13 commented 7 months ago

Disabled TMDbHelper, switched skin to default. Reboot, played an episode directly from Fen. Clicked cancel as before, same failed playback prompt. Log: https://paste.kodi.tv/qigivaxego

After that, I went back to addons to enable TMDbHelper back. After enabling, I got failed playback prompt out of nowhere. Log: https://paste.kodi.tv/noraciwowe

Thank you for your commitment to this case!

matthamilton13 commented 7 months ago

Sorry, just after the above I've switched the skin back to Arctic Fuse. It started to switch and load as it should. On the skin splash screen I got failed playback prompt.

https://paste.kodi.tv/oreludujax

jurialmunkey commented 7 months ago

Wow you have a real disdain for me for some reason tikipeter. I'm sorry for whatever I've done to hurt you... 😆

Anyway, TMDbHelper will never override playback or make a playlist item on behalf of another plugin.

That info=videos path is the TMDb API videos endpoint and is used to display a widget container with a list of related video extras and trailers inside DialogVideoInfo. A "GetDirectory" error message is Kodi reporting a plugin directory returned None so it did not display any items in that container. Nothing to do with playback.

TMDbHelper requires direct user involvement to initiate playback via its player functionality. It never plays automatically and always verbosely logs when its player function is used. I can't see anything these logs to suggest TMDbHelper being involved.

Same as Estuary, Fuse uses the standard Kodi builtin id=8 to initiate playback in DialogVideoInfo, which is the method used in these logs to start playback.

Spitballing but I'd suggest first testing that playback started from both inside and outside info dialog functions the same for your plugin, because I know in core for info dialog Kodi uses the PlaylistPlayer method you're shaking your fist at here... https://github.com/xbmc/xbmc/blob/5fcbc4008b4168e5383af4e1aa478ca80e7d09e9/xbmc/video/dialogs/GUIDialogVideoInfo.cpp#L753-L762

cg00001 commented 7 months ago

In my case (Arch Linux) this STARTED after a Kodi Omega update -no Fen or TMDbH update at that time. All links play fine -no TMDbH, they start from Fen-, when playback stops I always get the popup. In Kodi Nexus everything works fine with no popups.

Tikipeter commented 7 months ago

Wow you have a real disdain for me for some reason tikipeter. I'm sorry for whatever I've done to hurt you... 😆

I certainly don't have any real or perceived disdain for you. I have admiration for your efforts and skill.

I do have a deep disdain for TMDbHelper, but that traces back to it's previous iterations providing players for video addons, so it's certainly nothing personal.

jurialmunkey commented 7 months ago

Right, you have admiration but just hate all the skins and addons I make... Gotcha 😆

that wretched skin Might be end of the road for Fen/Fen Light being used with Jurial skins

Pretty common to see these types of comments from you about my skins/addons where you immediately jump to a threat to block users from using them. Hard not to read that as anything but personal when it is only ever directed at my skins/addons.

Totally cool if you don't want to support people using my skins/addons. All you need to say is "Hey sorry, I only support the default skin. Please test there and reproduce with a log before we go further" and then leave it at that. The rest is unnecessary.

You said yourself that your plugin doesn't work in a playlist. Kodi is media centre software. It's pretty reasonable to expect that there will be scenarios where some combination of default commands/settings/keymaps will result in the user starting playback in a playlist regardless of the skin used.

It's wild that from there your immediate conclusion is that it must "somehow" be my skins and addons tampering with your plugin despite the only "evidence" being an unrelated GetDirectory error coincidentally occurring nearby. There are so many other reasonable explanations that you overlooked in your eagerness to blame me. For example, the log showing the user opening info dialog - a much more reasonable starting point given that Kodi's play button and select action perform different functions.

matthamilton13 commented 7 months ago

I did a complete reinstall. Only addon I installed was Fen. All the above bugs, reported by me, are present. No TMDbHelper, no third party skins were ever present on this install.

Tikipeter commented 7 months ago

that wretched skin

A small part of me wants to point out saying something like this about a skin is not personal to you, but I know from experience that that is not the case. I take comments like this about my addon personally, and it was very poor of me to not assume you would do the same. I apologize. It was poor behavior for me to speak this way.

Pretty common to see these types of comments from you about my skins/addons where you immediately jump to a threat to block users from using them.

The only addon I've ever threatened that with is TMDbHelper. I don't like my addon being used as a "player" with that addon. But, like I said, that was an issue long before you took over development. If you had quoted what I actually said in full, it ended with "because I'm definitely not re-coding the entire playback mechanics Fen//Fen Light uses.". That's not a threat, that's a resignation that I'm not changing to a setResolvedURL method for playback.

You said yourself that your plugin doesn't work in a playlist. Kodi is media centre software. It's pretty reasonable to expect that there will be scenarios where some combination of default commands/settings/keymaps will result in the user starting playback in a playlist regardless of the skin used.

Yes, and you've made many posts also disparaging addons that don't initiate playback the "correct" way. Which of course is mainly mine, as the others invariably use setResolvedURL. But in my mind you're welcome to your opinion.

There are so many other reasonable explanations that you overlooked in your eagerness to blame me.

From what I saw, there wasn't. I'm not familiar with the core code of Kodi. I of course knew a GetDirectory error was not directly related to playback, but my assumption was that was the directory from where playback was initiated.

For example, the log showing the user opening info dialog - a much more reasonable starting point given that Kodi's play button and select action perform different functions.

Very true. I didn't see it. I wasn't looking for it.

I've never, in all my years doing this, had any problem with any addon dev or any skin dev. I've worked with plenty of both. In this situation I used phrasing such as "Therefore my belief is" and "it appears". I wrote what I thought was true on what I could figure out.

Happy belated Australia Day.

umbrellaplug commented 7 months ago

@Tikipeter @jurialmunkey have been getting reports of issues with Omega and errors when playing from the info dialog. Users reported to me when setting their default play action to "info" it causes these dialogs and playlist to be added with only one blank item. It's like the most recent updates of the beta are somehow losing context on the directory items when using the info dialog.

@jurialmunkey Do you have any suggestions for a way we can duplicate this cleanly outside of our addons since we operate in a grey area and are unable to use logs from either of our addons to report bugs to Kodi?

I truly just went to help. They've obviously jacked something up here and I'd rather work together to try to get it resolved before they push this broken version to release.

matthamilton13 commented 7 months ago

Users reported to me when setting their default play action to "info" it causes these dialogs and playlist to be added with only one blank item.

I have set it to "info" with my Fen setup as well, if that helps you guys.

edit: I'm on Kodi 20.2

Tikipeter commented 7 months ago

I have set it to "info" with my Fen setup as well, if that helps you guys.

Unfortunately that's the end of it if that's the case.

As you may have read, Fen will not work correctly once a playlist gets involved. Playing from Kodi's Info Dialog means that will happen.

There is no fix except to have your media open Fen's Extras Window instead. Then things will work.

matthamilton13 commented 7 months ago

This bug appeared out of nowhere really. It's hard for me to pinpoint the exact time or Fen update, unfortunately, but all worked properly before. I've opened the ticket 2 weeks ago, so probably few days before that? On both Arctic Fuse, Arctic Horizon 2 and default skin, all was good.

jurialmunkey commented 7 months ago

I take comments like this about my addon personally, and it was very poor of me to not assume you would do the same. I apologize.

Thanks, I appreciate it. I can brush off user comments mostly. It's more that as addon devs we model the tone of conversation.

And I get it. I'm not perfect. At times I'll lash out with my frustrations. The issue is then other users start to pile onto that and it snowballs. And while it's nice they have my back, it's really not the type of open and supportive space I want to foster.

Kodi is a hobby at the end of the day, and a space encouraging positive user collaboration is always going to be far far more enjoyable than a combative one skewing towards hostility and entitlement.

Yes, and you've made many posts also disparaging addons that don't initiate playback the "correct" way

I don't think I've ever disparaged addons not using setResolvedURL?

Yes, I have reiterated many times that using xbmc.Player is a hack, but that's simply the truth. A hack is not necessarily a negative. It simply implies using an unconventional or unexpected approach as workaround for some deficiency in the intended interface.

The fact is that Kodi expects plugin ListItems to have a path which is either directly playable (e.g. local file) or will resolved to a playable URL via setResolvedURL. Other methods for resolving a URL will result in Kodi features like watched status, resume points, and playlist playback breaking. This break occurs, in part, because Kodi stores playback information according to item path and setResolvedURL is how it links the resolved player url with the unresolved listitem path.

Saying it is a hack is not intended as a slight and definitely not directed specifically at you. Many many addons use this same hack. In fact TMDbHelper itself has an option to enable this exact hack for library paths in .strms to workaround an issue with Trakt scrobbling.

The only addon I've ever threatened that with is TMDbHelper. ... But, like I said, that was an issue long before you took over development.

TMDbHelper is not a fork of anything. It is 100% written from scratch using my own code (and some great PR contributions).

Perhaps you're confusing it with OpenMeta/OpenInfo which, whilst having some superficially similar functions, are two addons with an overall approach that I strongly disagree with on a fundamental level.

TMDbHelper was always intended primarily as a skinning tool for richer metadata and recommendation style info widgets. The player/library integration is secondary and only added because it makes sense for a recommendations addon. From there the player function evolved to act as a bridge on setups that mix library content with lots of smaller streaming services.

It has never included a player for your addon or other similar addons because it's simply not the intended usage. Any such player is 3rd party. Other than in places where it is necessary such as recommendations dialogs, I don't even understand what the purpose would be to use it in a setup where there is one single addon being used for most playback. Just seems like an unnecessary extra step.

I don't like my addon being used as a "player" with that addon. ... That's not a threat, that's a resignation that I'm not changing to a setResolvedURL method for playback.

Which is all cool. I don't have any problem with that. I don't expect you to use setResolvedURL or support TMDbHelper integration.

Where I take issue is the threat of deliberately inserting code to disrupt my skins and addons. Of course, it is ultimately up to you, but I strongly urge you not to take that path.

My stance here is primarily philosophical about the importance of freedom of user choice in open source software.

I'm not sure if you were around for caretaker addon bullshit in 2017 but that was essential the same thing from the other side. A skin dependency of Embruary and Estuary Mod V2 that checked for grey area addons then took steps to disrupt their use.

I was very vocal about how fucking cooked that was then and I will continue to do so for any addon on any side that decides to take this path. It is entirely against the spirit of freedom that open source is meant to embody.

jurialmunkey commented 7 months ago

Sorry for the essay! Lots to cover but I'll try not to derail your thread too much more!

jurialmunkey commented 7 months ago

Do you have any suggestions for a way we can duplicate this cleanly outside of our addons since we operate in a grey area and are unable to use logs from either of our addons to report bugs to Kodi?

@umbrellaplug

First thing I'd do is triple check that it isn't already fix in a recent nightly.

There was an issue a few versions back which I reported which sounds similar that was related to strm playback being broken -- and fairly sure the fix only went in after Beta 2. There's also been some speedbumps with a the new movie versions feature causing issues here and there, and these are generally being fixed pretty rapidly.

In terms of reporting it if it is still happening on nightlies, if you're unable to create the same issue with an official addon (maybe try Youtube?) or library then the only real option is to make a dummy addon to reproduce the issue. Basically just barebones what you need to cause the issue and nothing else.

There's some good open source type of stream URLs here which are good for use in a test plugin. https://gist.github.com/jsturgis/3b19447b304616f18657

I've got a basic test plugin I used to demonstrate the reuselanguageinvoker crash here so possibly you could adapt it as the bones of something like that: https://github.com/jurialmunkey/plugin.video.testcase

I truly just went to help. They've obviously jacked something up here and I'd rather work together to try to get it resolved before they push this broken version to release.

FYI there will be at least one more Beta (Beta 3) before it even hits release candidate stage, so there should still be at least another month before there's any main release.

Tikipeter commented 7 months ago

Where I take issue is the threat of deliberately inserting code to disrupt my skins and addons.

We can certainly agree on this point. That is not something that would have ever crossed my mind. I have supported my addon for many years, and that to me would be a gross abuse of any users I have. That is definitely not what I am talking about when threatening non-compatibility with TMDbHelper. I know for certain I have never talked about, or thought about, anything like that. I don't really know where you could have gotten the idea from that I would insert code into another addon/skin. According to my beliefs on this type of matter, that would be malicious.

My stance here is primarily philosophical about the importance of freedom of user choice in open source software. I'm not sure if you were around for caretaker addon bullshit in 2017 but that was essential the same thing from the other side. A skin dependency of Embruary and Estuary Mod V2 that checked for grey area addons then took steps to disrupt their use.

I was around, and I also had very strong feelings about that issue. What I have threatened to do is in no way comparable.

I have threatened to stop MY ADDON working with TMDbHelper, not affect TMDbHelper, or a users' install, in any way.

There'd be no uninstalling of an addon/disabling of an addon. There'd be no monitoring of a users' system for addons. There'd be no "this addon won't install if this other addon is installed" garbage. Ther'd be no installing an addon to monitor a users' system without the users' consent.

It would simply stop my addon working if used as a "player".

If I needed to change the mode call in my uri to something else due to changes elsewhere in the addon, that would break the Fen player for TMDbHelper until a new player was made. That would be an example of me breaking compatibility, and I don't feel that's in any way comparable to that whole situation sualfred found himself in. Not even close.

If you feel I have a moral obligation to ensure my addon works with TMDbHelper, or since it currently works with TMDBHelper I should be compelled morally to keep it that way, then we would respectfully have very differing views on that matter. But I don't think that's where you're coming from.

But hopefully your mind is put to rest on "inserting code into your addon or skins" business. That would have never entered my mind.

cg00001 commented 7 months ago

Ladies -@Tikipeter @jurialmunkey- if you spent so much time on the issue, it would be solved by now. Still think it's Kodi to blame, changing playlist mechanics on Omega or sth similar.

jurialmunkey commented 7 months ago

@cg00001 - There's nothing to fix here. Kodi info dialog plays in a playlist. Supporting that would require Tikipeter to do a massive rewrite which likely would take several weeks to complete with proper testing. He's made it clear that's not something he wants to do, which is entirely reasonable as large scale code refactors are a complete pain.

There's literally nowhere else to go from here. No one is to blame. It's simply a feature his plugin does not support.

Still think it's Kodi to blame, changing playlist mechanics on Omega or sth similar.

The logs above are from Nexus so this behaviour has existed for at least a couple of years.

matthamilton13 commented 7 months ago

Sorry to reopen this after such heated discussion. But what about the fact, that it all worked good just a few weeks before? I haven't updated Kodi itself since the beginning of December last year. So nothing changed under the hood, if I understand correctly. So this thing appeared out of nowhere after more than a year of using Tikipeter's and Jurial's work. Does that fact matter at all, that the bug started out of nowhere?

Tikipeter commented 7 months ago

@matthamilton13

If I'd have known 20 posts ago that you were enacting playback through Kodi's info dialog, this would have been a much easier time. The fact is any time this ever worked was purely luck. As Jurial said, I'm not willing to re-write that portion of Fen to accommodate playlist playback. There are downsides to doing Kodi playback the right way. And I don't like the downsides.

Luckily @cg00001 seems to know where the issue is arising from. So since he doesn't like the way I've spent my time the last 24 hours, perhaps he'll grace us with a fix...

This issue is closed.

matthamilton13 commented 7 months ago

I understand. It was great being "lucky" for more than a year... Countless reinstalls, dozens of setups, on Windows, Linux, OSMC, Libreelec, so many variables. Never a problem. Now the "luck" has run out I suppose, and every install has the same issue. And like I said, according to my observations, it has nothing to do with skin, other addons and Kodi version, since my last update was long before the bug started. But it has much to do with "luck" I suppose.

Sincere thanks to everyone who took their time looking into the issue. Who knows, maybe I'll get "lucky" again and it will work again, as it did for such a long time.

Tikipeter commented 7 months ago

I understand. It was great being "lucky" for more than a year... Countless reinstalls, dozens of setups, on Windows, Linux, OSMC, Libreelec, so many variables. Never a problem.

I've NEVER been able to enact playback from Kodi's Info dialog without the "one or more items failed to play" message apearing at some time during playback whilst using Fen in over 6 years of use. So I'm glad you realize how lucky you were.

Now the "luck" has run out I suppose...

Look at it as glass half full. You had tremendous luck for so long apparently.

it has nothing to do with skin, other addons and Kodi version

True. Yours observations match the facts here.

....long before the bug started.

It's not a bug. It's just how Kodi is.

Who knows, maybe I'll get "lucky" again and it will work again, as it did for such a long time.

You had a tremendous run of luck. Perhaps it will happen again. I doubt it, but here's hoping.

matthamilton13 commented 7 months ago

If you don't mind me checking and maybe getting my "luck" back, is there any way I could install previous versions of Fen? It all was still good and "lucky" when the updates were done via Kodi addons, not Fen's internal update system. Not that it's connected, it's just the last place I remember for sure that all was good. I've always been on Nexus, no betas etc.

I'm just a beginner when it comes to coding and I wouldn't dare to challenge anything that you guys are saying. I have huge respect for everyone who code and share their work for free. That being said, I had "luck" on so many different systems and setups for such a long time, and now that "luck" ran out pretty much simultaneously on all of these. Things just stopped working, it being a bug or not. Now, like I said I don't know much about these things, yet. But, from the lack of a better wording, isn't it all weird? It went from all was good on every setup to it being wrong on every setup.

Tikipeter commented 7 months ago

I wouldn't dare to challenge anything that you guys are saying.

You're saying that but every time you use "luck" instead of just writing luck you're making that point, as I'm sure you're fully aware.

I have no zips of Fen older than from when the internal update system was implemented. You could possibly find older in your packages folder, but that depends on how old the install of Kodi is.

matthamilton13 commented 7 months ago

You're saying that but every time you use "luck" instead of just writing luck you're making that point, as I'm sure you're fully aware.

I'm not aware, not to mention fully, and I think you figured out that English is not my native language, as per many mistakes I make, I see a few myself in fact. I was just quoting.

Please, I'm aware what point I'm trying to make, anything more is a thing of interpretation, both skewed by the writer's shortcomings in a particular language, and by the lens of a particular reader.

If anything, I was a bit surprised by the use of word luck in this case, or in any case of coding. But that doesn't mean I challenge your conclusions. It's not my place. And that's not why I was using the "". Apologies that it caused the misinterpretation.

Sorry to hear that you don't keep the older versions. I had a feeling that would give me that luck back. Since there is no solution and I like to have that movie info screen, just to know for example what that particular title is about, I'll live with that wretched failed playback screen. Fen is still the fastest and best for me, even if I don't use the addon as you would like the users to use it.

Thanks again Tikipeter, I didn't mean any disrespect.