giving channel development one last go

Hi,

 

I gave up on plex channel development a while back and I am now giving it a second chance (mainly now that channels are available on the androidtv).  While I have a channel fully functioning, I am at a point where I am just gold plating it.  Please help answer my questions below.

 

1.   Are the docs at https://dev.plexapp.com/docs/index.htmloutdated?  I mean, I tried to use a variable from https://dev.plexapp.com/docs/api/constkit.html#module-Protocol but is getting

54, in MediaObjectsForURL
    protocol = Protocol.HTTPMP4Streaming,
AttributeError: type object 'Protocols' has no attribute 'HTTPMP4Streaming' 

given that, is there a more up-to-date documentation?  Heck, even the NextPageObject is not documented anywhere on that site.

 

2.  Looking at the Search Service doc, it seems pretty straightforward in implementing one.  I want to do this cause it provides a global search from PLEX and not having to  be in the channel itself.  Now, what I have yet to figure out is, how do you deal season and its episodic content.  I mean, if my search result return a movie, I simply provide it a URL and the URL service would do its work, no problem here.  However, what if the search result return a tv series, for example 'Game of Thrones Season 5' where it has 10 episodes?  Ideally, if I click on 'Game of Thrones Season 5' search, I want it to list all the episodes.  Is this even possible?

 

Thanks

  1. Those documents are partly outdated. In order to help you, what are you trying to accomplish? I think of it like this:

    - The channel shall provide all available streams for the specific video by setting as many attributes as possible for the MediaObject(s)
    - The client decides if it can direct play or needs to transcode.

    I.e. those old attributes(Protocol etc) shouldn't be used anymore(deprecated)
     
  2. Have a look at: https://github.com/plexinc-plugins/Kanal5Play.bundle/blob/master/Contents/Services/Search/Kanal%205%20Play/ServiceCode.pys
     

for 2:

- I think it shall be possible to achieve what you described

ah it seems that from the search service you can provide a callback.


thanks for the info meo.

For searching that results in a show page or a seasons of a show, it is best not to make that part of a Search service, since it will have to refer back to functions within your channel __init__.py to produce results. 

Here is an example of one for MTV shows that I did that uses a search service to search for videos but also includes a show search function - https://github.com/shopgirl284/MTVShows.bundle/blob/master/Contents/Code/__init__.py#L71

Also you have to be careful about how you put in any additional or non-search input directory objects (whether it be a SearchDirectoryObject or InputDirectoryObject) in case it will be used with the Plex Web client. The Plex Web client does not produce those like other players as a separate directory/menu option or icon. Instead it looks for the first InputDirectory option in that directory/menu level of the channel and uses the search entry field at the top of the player as the means of the user providing input data for that input directory.

It is not as much of an issue with SearchDirectoryObject since it should not confuse users about its purpose, but you do have to make sure you only have one search option on any directory/menu level and having different types of searches in different directory/menu levels (like in my example) will be confusing for Plex Web player users since the different types of input directory objects will not have a title or show any explanations.