MoojMidge / service.upnext

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

[Request] Option to ignore playlists in certain addons #26

Closed booyakafoo closed 7 months ago

booyakafoo commented 7 months ago

I want the UpNext addon to work when I am playing shows with TMDb helper addon/widgets, but I would like playlists to be ignored from any other addons. Is it possible to ignore addons based on ID or some other option so UpNext wont try to manage playlists from them? Thanks

MoojMidge commented 7 months ago

Maybe. Can you describe in greater detail what you are trying to achieve, or what the problem is? Ideally a log showing the playback that you want with TMDb Helper playlists, and a log showing the playback that you don't want with another plugin playlists, would help to determine whether it is feasible or not.

That being said, playlist handling (or ignoring) is relatively straightforward and there is already a setting for this, but a playlist can contain pretty much anything, including plugin items.

While it can be done, I don't currently have the time (or the motivation) to add functionality to scan a playlist to check what the items in the playlist are, as the logic to do so properly is not straightforward.

As an example take the following example playlist - what should happen if you want to ignore Plugin1 items, or instead Plugin2 items? Should it skip the plugin items that you want to ignore and go to the next allowed item? Should it just stop if it sees a plugin item that you want to ignore? Should it start again when a plugin item that you don't want to ignore is played from the playlist? What if a plugin item that don't want to ignore, creates or redirects to a plugin item that you do want to ignore (like TMDb Helper can and will do)?

1. Plugin1 item
2. Plugin2 item
3. Plugin1 item
4. Plugin1 item
5. Plugin3 item redirects to a Plugin2 item
6. Plugin3 item redirects to a Plugin1 item
7. Library item
8. Non-library item

In terms of a single plugin item, UpNext requires explicit plugin integration and assumes that if a plugin provides this integration then it should be used. The exception is when TMDb Helper integration is enabled, which then offloads the integration to whatever players are configured with TMDb Helper.

It is possible to add a filter for this in UpNext, so that it will ignore individual plugin items that do integrate with UpNext, and I will add this to my TODO list, but I don't think this is the functionality you actually want.

booyakafoo commented 7 months ago

Thank you for the detailed response. After your explanation on how playlists are working I was able to disable them in Kodi and the addon in question and I am no longer being prompted to play the next episode when TMDb Helper plays an episode via an addon player.