Ivars 5 anni fa
parent
commit
8136437ac2
3 ha cambiato i file con 520 aggiunte e 395 eliminazioni
  1. 0
    8
      playstreamproxy.py
  2. 504
    385
      project.wpr
  3. 16
    2
      sources/ltc.py

+ 0
- 8
playstreamproxy.py Vedi File

@@ -405,14 +405,6 @@ def hls_base2(url):
405 405
     return base
406 406
 
407 407
 
408
-#print urlp
409
-#print streamproxy_encode3("playstream", "replay::tiesraide/ltv1")
410
-#print streamproxy_encode3("playstream", "tvdom::tiesraides/ltv1/")
411
-#print streamproxy_encode3("playstream", "tvplay::asset/10311641")
412
-#print streamproxy_encode3("playstream", "xtv::rigatv24/video/Zw4pVPqr7OX-festivals_mainam_pasauli_sakam_ar_sevi")
413
-#print streamproxy_encode3("playstream", "iplayer::episodes/b094f49s")
414
-#cmd, data, headers, qs = streamproxy_decode3(urlp)
415
-
416 408
 if __name__ == "__main__":
417 409
     daemon = ProxyDaemon("/var/run/playstreamproxy.pid")
418 410
     if len(sys.argv) == 2:

+ 504
- 385
project.wpr
File diff soppresso perché troppo grande
Vedi File


+ 16
- 2
sources/ltc.py Vedi File

@@ -572,9 +572,11 @@ X-Requested-With: XMLHttpRequest
572 572
 
573 573
     def get_streams(self, data):
574 574
         print "[ltc] get_streams:", data
575
-        if "::" in data: data = data.split("::")[1]
576 575
         if not self.is_video(data):
577 576
             return []
577
+        source, data, path, plist, clist, params, qs = self.parse_data(data)
578
+        #if "::" in data: data = data.split("::")[1]
579
+
578 580
 
579 581
         ### Video nomas strīmus pagaidām dabu no mājas lapas TODO
580 582
         if data.split("/")[0]=="videonoma" and len(data.split("/"))>1:
@@ -584,6 +586,18 @@ X-Requested-With: XMLHttpRequest
584 586
             if not self.is_logedin():
585 587
                 if not self.login():
586 588
                     return []
589
+            if plist[1] == "catchup":
590
+                start = int(qs["start"]) + 1
591
+                #url = "https://manstv.lattelecom.tv/api/v1.7/get/content/epgs/?filter[channel]=101&filter[utFrom]=1551551500&include=channel&page[size]=40page[number]=1"
592
+                data2 = "content/epgs/?filter[channel]=%s&filter[utFrom]=%s&filter[utTo]=%s&include=channel&page[size]=40page[number]=1" % (plist[2], start, start )
593
+                r2 = self.call(data2)
594
+                if "data" in r2:
595
+                    epgid = r2["data"][0]["id"]
596
+                else:
597
+                    return []
598
+                data = "ltc::content/record-streams/%s?include=quality" % epgid
599
+                source, data, path, plist, clist, params, qs = self.parse_data(data)
600
+
587 601
             r = self.call(data)
588 602
             if not r: return []
589 603
             if "errors" in r:
@@ -652,7 +666,7 @@ X-Requested-With: XMLHttpRequest
652 666
         cmd = data.split("/")
653 667
         if "get-stream" in data:
654 668
             return True
655
-        elif cmd[0] in ("content") and cmd[1] in ("live-streams","record-streams","vod-streams"):
669
+        elif cmd[0] in ("content") and cmd[1] in ("live-streams","record-streams","vod-streams", "catchup"):
656 670
             return True
657 671
         elif cmd[0]=="arhivs" and len(cmd)==4:
658 672
             return True