I use plex frequently and I am a python developer, but I haven’t dug into the plex plugins much yet. I was hoping to get a yay/nay on whether this was worth my effort.
I’d like to build a more robust playlist channel that can determine frequency of titles played. I know with the medialogs and pyplex I can see detailed playback history, and reading through the plugin development walkthrough makes it seem like I can dynamically generate the content list and then reference the media logs and other sources to build a robust playlist/channel based off my own content and preferences. From there I’d just need to push each video to the player after the conclusion of the last.
Is this accurate? Am I on track for something possible or is there something missing either in the plugin api or the plex api itself that prevents this from working?
@apc0243 as for playing local content from the channel, I think it should be possible, but you should consider whether a Plex channel approach is the best way to go, as @dane22 noted above.
Some things to consider:
Plex Channels are designed to play (or rather get URLs of the) media from the remote sources over the network protocols. Plex most likely still uses network interface to play local media, but you’ll need to generate a URL that Plex would understand (I’m assuming your videos are in Plex library, otherwise you’d probably need to start up some sort of HTTP server). This should possible, but I think it would be better to develop a proof of concept first.
About pushing each video to player after conclusion of the last, I think it is a problematic point. It might depend on Plex client used, but at least for me, video playback stops automatically after each video. It is possible to create a longer playlist by combining multiple videos as “parts” of a media, so they will run one after another, but that playlist is finite and must be generated beforehand. It may be possible to pull some tricks to make the parts of the playlist dynamic, so that the actual video is determined at each part playback start, but that would be kind of stretching of the framework limitations, and I still don’t think there is a workaround for a finite playlist.
Such playlist combined from “parts” is treated as a single piece of media by Plex, so if you completely stop the playback of such playlist, you cannot just return later and resume. If such functionality is required, it must be implemented in the channel code, so the next time it generates a playlist, it would start from the video item that has been started last. And still that video part would start from the beginning.
Disclaimer: I may be wrong on any of the above points. Everybody are free to correct me!