Code for logging in to certain channels

plugin-dev

#1

This has (sort of) been asked before, but never really answered as far as I can tell.

There are several channels that now require a user to login. PBS is one of them, so you can watch content in HD. What would the code be that I can add to the .json config file that would actually log me into the PBS system (for example)?

I ask, because other plugin developers for other media players/servers have solved this issue, but the coding is completely different (yes, I am talking about Kodi).

Any help??

Thanks in advance.


#2

You cannot just add a user name and password to a json file of a Plex channel plugin to access user specific data through that plugin. The channel plugin must be specifically written with code that can authenticate users and send that user authentication as part of its request for data.

This is usually done by using publicly available API provided by the content provider and/or sending user authentication data as part of the URL requests for the data. And, since all Plex channels are created by individuals in the volunteer community, they only have access to API that is freely offered by the online content provider to the public.

The Plex channel for PBS, for example, does not allows you to log into PBS or access HD media. This is because PBS has two different versions of their API and the version that is currently available to the public does not allow you to access logins or HD media.

As for Kodi add-ons, see XBMC has a plugin. Why doesn’t Plex?.

If you are interested in learning more about Plex channel plugin development, I would suggest reviewing the tutorials, support documents and documentations that are pinned to the top of this forum and the Channel Development section of the Plex support site. The "Channel Plugin Development Overview" and "Channel Plugin Development FAQ" documents linked in the Channel Plugin Development Support Documents thread that is pinned to the top of this forum would be a good place to start.


#3

And just to clarify it a little more.

When creating a Plex channel, you can only request the raw data provided by the online source (the same data that online source uses to populate its web pages). You then use the Plex plugin framework/API to create the menus, listings, metadata, and media from that raw data you have requested and pulled from the online source.

Therefore to access any data specific to a user or login, you would have to determine a method for sending user authentication data as part of that request for the raw data. And the majority of online sources do not openly provide access to the user authentication methods used to access their raw data.

Other media player programs may provide methods to bypass the need to send user authentication data by replicating a browser interface, using Flash, or Webkit. But, the Plex plugins framework/API does not provide any means of replicating a browser interface. And Plex does not use or support Flash or Webkit.

The specific methods that must be used when accessing data and creating Plex channel plugins are why Plex channel plugins appear much cleaner, more easily navigatable, and usually require less resources than the online media offered by other media programs. But it also makes the methods necessary to access the data to populate these channel plugins much more difficult.


#4

Thank you for your comprehensive answer. It has truly answered a ton of questions.