Add ts_stop parameter to Program class
This commit is contained in:
parent
e8532ee41c
commit
70458c4136
@ -65,7 +65,7 @@ class MatteBOX:
|
|||||||
"subscriptionCode": self.subscription_code,
|
"subscriptionCode": self.subscription_code,
|
||||||
"deviceType": "STB",
|
"deviceType": "STB",
|
||||||
"fromTimestamp": program.ts_start,
|
"fromTimestamp": program.ts_start,
|
||||||
"toTimestamp": now_timestamp()
|
"toTimestamp": program.ts_stop,
|
||||||
}
|
}
|
||||||
|
|
||||||
res = self.__get("/sws/server/streaming/uris.json", params=params)
|
res = self.__get("/sws/server/streaming/uris.json", params=params)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
from .helpers import now_timestamp
|
||||||
|
|
||||||
|
|
||||||
class Program:
|
class Program:
|
||||||
@ -7,6 +8,7 @@ class Program:
|
|||||||
content_id: str
|
content_id: str
|
||||||
description: str
|
description: str
|
||||||
ts_start: int
|
ts_start: int
|
||||||
|
ts_stop: int
|
||||||
type: str
|
type: str
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -18,6 +20,7 @@ class Program:
|
|||||||
"content_id": data["epgId"],
|
"content_id": data["epgId"],
|
||||||
"description": data["shortDescription"],
|
"description": data["shortDescription"],
|
||||||
"ts_start": data["startTimestamp"],
|
"ts_start": data["startTimestamp"],
|
||||||
|
"ts_stop": now_timestamp() - 60000 * 3, # 3 minutes ago
|
||||||
"type": "program",
|
"type": "program",
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
@ -31,6 +34,7 @@ class Program:
|
|||||||
"content_id": data["pvrProgramId"],
|
"content_id": data["pvrProgramId"],
|
||||||
"description": data["longDescription"],
|
"description": data["longDescription"],
|
||||||
"ts_start": data["startTime"],
|
"ts_start": data["startTime"],
|
||||||
|
"ts_stop": now_timestamp(),
|
||||||
"type": "recording",
|
"type": "recording",
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
|
Loading…
x
Reference in New Issue
Block a user