Skip to content

Commit

Permalink
Update to 1.09 - See Readme for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomez177 committed Mar 26, 2024
1 parent 0ad8546 commit 9628032
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Plex for Channels

Current version: **1.08b**
Current version: **1.09**

# About
This takes Plex Live TV Channels and generates an M3U playlist and EPG XMLTV file.

# Changes
- Version 1.09
- Update to Plex Headers/Parameters
- Version 1.08b
- Minor Bug fix
- Version 1.08a
Expand Down
17 changes: 15 additions & 2 deletions plex.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,31 @@ def __init__(self):
self.epgLastUpdatedAt = {}

self.headers = {
'authority': 'clients.plex.tv',
'accept': 'application/json, text/javascript, */*; q=0.01',
'accept-language': 'en',
# 'content-length': '0',
'origin': 'https://app.plex.tv',
'referer': 'https://app.plex.tv/',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Linux"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-site',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
}

self.params = {
'X-Plex-Product': 'Plex Web',
'X-Plex-Version': '4.120.1',
'X-Plex-Version': '4.126.1',
'X-Plex-Client-Identifier': self.device,
'X-Plex-Language': 'en',
'X-Plex-Platform': 'Chrome',
'X-Plex-Platform-Version': '123.0',
'X-Plex-Features': 'external-media,indirect-media,hub-style-list',
'X-Plex-Model': 'hosted',
'X-Plex-Device': 'Linux',
'X-Plex-Device-Name': 'Chrome',
'X-Plex-Device-Screen-Resolution': '1282x929,1920x1080',
'X-Plex-Language': 'en',
}

Expand Down
13 changes: 2 additions & 11 deletions pywsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from gevent import monkey
monkey.patch_all()

version = "1.08b"
updated_date = "Mar 23, 2024"
version = "1.09"
updated_date = "Mar 26, 2024"

port = os.environ.get("PLEX_PORT")
if port is None:
Expand Down Expand Up @@ -90,15 +90,6 @@ def token(country_code):
token = providers[provider].token(country_code)
return(token)

@app.route("/channels/<country_code>")
def channels(country_code):
# host = request.host
channel, token, error = providers[provider].channels(country_code)
if error is not None:
return(channel)
else:
return(error)

@app.get("/<provider>/<country_code>/playlist.m3u")
def playlist(provider, country_code):
gracenote = request.args.get('gracenote')
Expand Down

0 comments on commit 9628032

Please sign in to comment.