mirror of https://github.com/devine-dl/devine.git
refactor(Video): Return None if no m3u RANGE, not SDR
This commit is contained in:
parent
15d73be532
commit
23485bc820
|
@ -141,9 +141,11 @@ class Video(Track):
|
||||||
return Video.Range.SDR
|
return Video.Range.SDR
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_m3u_range_tag(tag: str) -> Video.Range:
|
def from_m3u_range_tag(tag: str) -> Optional[Video.Range]:
|
||||||
tag = (tag or "").upper().replace('"', '').strip()
|
tag = (tag or "").upper().replace('"', '').strip()
|
||||||
if not tag or tag == "SDR":
|
if not tag:
|
||||||
|
return None
|
||||||
|
if tag == "SDR":
|
||||||
return Video.Range.SDR
|
return Video.Range.SDR
|
||||||
elif tag == "PQ":
|
elif tag == "PQ":
|
||||||
return Video.Range.HDR10 # technically could be any PQ-transfer range
|
return Video.Range.HDR10 # technically could be any PQ-transfer range
|
||||||
|
|
Loading…
Reference in New Issue