1
0
mirror of https://github.com/fHDHR/fHDHR_NextPVR.git synced 2025-12-06 11:56:57 -05:00

Merge pull request #34 from deathbybandaid/dev

Cleanup Requirements for all repos
This commit is contained in:
Deathbybandaid 2020-10-14 08:23:22 -04:00 committed by GitHub
commit e5383b8e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 22 deletions

View File

@ -3,7 +3,6 @@ import sys
import ast import ast
import requests import requests
import xml.etree.ElementTree import xml.etree.ElementTree
import m3u8
UNARY_OPS = (ast.UAdd, ast.USub) UNARY_OPS = (ast.UAdd, ast.USub)
BINARY_OPS = (ast.Add, ast.Sub, ast.Mult, ast.Div, ast.Mod) BINARY_OPS = (ast.Add, ast.Sub, ast.Mult, ast.Div, ast.Mod)
@ -15,26 +14,6 @@ def clean_exit():
os._exit(0) os._exit(0)
def m3u8_beststream(m3u8_url):
bestStream = None
videoUrlM3u = m3u8.load(m3u8_url)
if len(videoUrlM3u.playlists) > 0:
for videoStream in videoUrlM3u.playlists:
if bestStream is None:
bestStream = videoStream
elif ((videoStream.stream_info.resolution[0] > bestStream.stream_info.resolution[0]) and
(videoStream.stream_info.resolution[1] > bestStream.stream_info.resolution[1])):
bestStream = videoStream
elif ((videoStream.stream_info.resolution[0] == bestStream.stream_info.resolution[0]) and
(videoStream.stream_info.resolution[1] == bestStream.stream_info.resolution[1]) and
(videoStream.stream_info.bandwidth > bestStream.stream_info.bandwidth)):
bestStream = videoStream
if bestStream is not None:
return bestStream.absolute_uri
else:
return m3u8_url
def sub_el(parent, name, text=None, **kwargs): def sub_el(parent, name, text=None, **kwargs):
el = xml.etree.ElementTree.SubElement(parent, name, **kwargs) el = xml.etree.ElementTree.SubElement(parent, name, **kwargs)
if text: if text:

View File

@ -3,4 +3,3 @@ gevent
flask flask
image image
xmltodict xmltodict
m3u8