python-plexapi
python-plexapi copied to clipboard
LiveTV support (both DVR and free Plex streaming/IPTV) - Requesting code review
First time working with XML data. Seems rather straightforward once I understood how you handled parsing. Have not written test files yet, waiting for feedback if you could give any.
Nice work. Livetv etc support has been non existent because no contributer have used it. :)
Thanks for the feedback. I will make the necessary changes.
@nwithan8 any updates? I have a tuner setup and am willing to test.
@blacktwin been meaning to get back to this, got sidetracked with other projects. If you want to have a look over, be my guest.
Has there been any progress with this feature addition? It'll be a great addition to already awesome work! Cheers
Waiting on @pkkid or @Hellowlol
The PR has merge conflicts. Those will need to be addressed first.
Is anybody working on fixing the conflicts? I have a HD HomeRun tuner on my plex and am ready to test the codes if it helps.
Many thanks in advance
The PR has merge conflicts. Those will need to be addressed first.
Addressed
Thanks @nwithan8, This is great but while waiting for these changes turn into a new release I'd like to make manual changes in my instance and give these new features a try. Can you give me a python command example on how I can retrive and then tune into a specific live TV channel?
Much appreciate it!
Thanks @nwithan8, This is great but while waiting for these changes turn into a new release I'd like to make manual changes in my instance and give these new features a try. Can you give me a python command example on how I can retrive and then tune into a specific live TV channel?
Much appreciate it!
Here's a code snippet that I was using to test:
from plexapi import myplex, server
mypx = myplex.MyPlexAccount(username="username", password="password")
pxserver = server.PlexServer(baseurl="http://localhost:32400", token="aplextoken")
print(mypx.iptv)
live = pxserver.livetv
print(live.dvrs[0].title)
Thanks again @nwithan8, I was able to get the title of my DVR but after that I'd like to list all available channels and play one of the channels on my plex device. Currently I have a script to search for shows, movies and playlists and play the selected content on my plex media player, but don't know how it should work for live tv. Can you give me a hint?
Much appreciate your help.
By the way, after making the changes manually, if I run a simple script to list all movies in my library I get the following message for each item found in the search: INFO:plexapi:Failed to parse 2015-05-06 to datetime, defaulting to None
Here is my code to do the search: for video in plex.library.section('Movies').all(): print(video.title)
Please note that if I use original files, the same simple search script runs flawlessly. Hoping it could help troubleshooting it.
Cheers
@nwithan8 Maybe it's me but is how you'd get to the guide?
plex = PlexServer(PLEX_URL, PLEX_TOKEN)
live = plex.livetv
dvr = live.dvrs[0]
print(live.guide())
I'm getting AttributeError: 'LiveTV' object has no attribute 'cloud_key'
I'm thinking that you LiveTV isn't pulling the cloud_key, In fact the LiveTV _loaddata isn't hit at all. How the cloud_key get loaded in order to interact with the guide?
@nwithan8 Maybe it's me but is how you'd get to the guide?
plex = PlexServer(PLEX_URL, PLEX_TOKEN) live = plex.livetv dvr = live.dvrs[0] print(live.guide())I'm getting
AttributeError: 'LiveTV' object has no attribute 'cloud_key'I'm thinking that you
LiveTVisn't pulling thecloud_key, In fact theLiveTV_loaddataisn't hit at all. How thecloud_keyget loaded in order to interact with the guide?
I also got the same error when I tried to load the guide.
It seems some things have changed with Plex since I started this, so I'm working on updating it. Turns out the "cloud key" is different if you're using the ZIP Code guide versus the local XMLTV path guide, so I'm having to account for that.
The code for this PR is still in progress. Should I/How do I retract/remove this PR request in the meantime?
Change the PR to a draft. The link is beneath the reviewers at the top right.
Hi @nwithan8, Any progress?
Thanks
Hi @nwithan8, Any progress?
Thanks
Seconding @rockstar2020: Any news on this draft, @nwithan8?