If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

A couple of questions about episodeobject/videoclipobject generation, services and m3u8 urls

kvoldenkvolden Posts: 7Members ✭✭

The documentation for writing channels is extremely poor, so I'm hoping some of you could help me out here. :)

First of all, if you take a look at channels like this or this, they do not have any services defined. They create episodeobjects with a specific url, and that's apparently it. The SVT one seems to pass the url of the page one would normally visit to watch the clip. When I try that with another service (NRK), either with the url of the player of the clip or with the m3u8 url, I get errors of the kind "No service found for URL …" and "No matching services found for …". What's the difference here? What are the premises for being able to pass the url directly with no service like these two channels are?

Second, when I create a videoclipobject or episodeobject, full of metadata and containing the url to the stream, what is the point of this needing either a url or a key, when all it is seemingly used for is creating metadata which already exists in the object? This seems downright stupid. I would actually expect it to be possible to give the m3u8 paths as the urls to the videoclip-/episodeobjects and fill them with the corresponding metadata, without having to do the exact same thing one more time. I see some have created a function for creating these objects, providing them with a callback to the very same function, but for this to be necessary seems too silly to be true. And the aforementioned channels don't seem to do this, but I haven't gotten it to work any other way. Any of you have any input on this?

Best Answer

Answers

  • kvoldenkvolden Posts: 7Members ✭✭

    Thanks! :)

    Very strange that the same "content object" has to be created again, instead of Plex just using the information in the first object directly. The possibility of doing another individual metadata lookup is good, but it's not always necessary. It'd be nice if, instead, the content objects had an additional streamUrl member or something, which provided the actual stream url, and a possibility of providing a callback for fetching additional metadata. But it is what it is.

  • shopgirl284shopgirl284 Posts: 2,763Members, Plex Pass, Plex Ninja, Forum Moderator Plex Ninja

    Just to add a little extra info.

    There is no longer a web based interface for the Framework, but this post provides it as a PDF document - https://forums.plex.tv/discussion/262554/plex-channel-development-support-documents#latest that you can download. And this document lists anything that may have changed or is known to be missing from the Channel Framework documentation - Missing from the Official Plugin Documentation

    And as @czukowski stated, the URL services for some Plex channels are not in the actual channel bundle and have instead been added to the Services.bundle. This is done because media pages for a website whose URL service is in the plexinc-plugins Services.bundle repository on Github will work with the PlexIt/Watch Later function.

    Also, this link in the Plex Channel Development Support Documents thread called Introduction to URL Services may help in understanding URL services and when one is needed. As this document explains, if you do not use a separate URL service, you need to create a separate function to create the media object. Since most Plex players have a pre-play screen this function loops through twice, first pulling the metadata for the pre-play screen and then pulling the actual media stream, once the user clicks play.

    Many issues and questions can be resolved by reviewing the Plex Support Documentation
    Providing details about your issue, Plex setup, and including log files are important when when asking for help on the forums.
    See Log Files
    Before posting channel plugin questions or issues, please review the pinned threads at the top of the Channel Plugin forum:
    READ FIRST: Guidelines for Posting Channel Plugin Issues/Questions and Things to Check First
    FAQ for Channel Plugin FAQ

Sign In or Register to comment.