Ivars 5 anos atrás
pai
commit
bbf18a13a3
3 arquivos alterados com 12 adições e 14 exclusões
  1. 3
    1
      ContentSources.py
  2. 8
    13
      playstreamproxy.py
  3. 1
    0
      sources/streams.cfg

+ 3
- 1
ContentSources.py Ver arquivo

@@ -21,6 +21,8 @@ class ContentSources(object):
21 21
     def __init__(self, plugin_path, cfg_file="streams.cfg", cfg_file2=None):
22 22
         self.plugins = {}
23 23
         self.error_content = [("..atpakaļ", "back", "back.png", "Kļūda, atgriezties atpakaļ")]
24
+        if not plugin_path:
25
+            plugin_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "sources")
24 26
         sys.path.insert(0, plugin_path)
25 27
         #for f in os.listdir(plugin_path):
26 28
         #for f in next(os.walk(plugin_path))[2]:
@@ -31,7 +33,7 @@ class ContentSources(object):
31 33
             fname = os.path.split(fname)[1]
32 34
             if fname == "__init__": continue
33 35
             if ext == '.py':
34
-                print "Importing %s"%fname
36
+                #print "Importing %s"%fname
35 37
                 mod = __import__(fname)
36 38
                 reload(mod)
37 39
                 if "Source" in dir(mod):

+ 8
- 13
playstreamproxy.py Ver arquivo

@@ -57,7 +57,7 @@ slinks = {}
57 57
 sessions = {}
58 58
 
59 59
 cfg_file = "streams.cfg"
60
-sources = ContentSources("sources", cfg_file)
60
+sources = ContentSources("", cfg_file)
61 61
 
62 62
 class StreamHandler(BaseHTTPRequestHandler):
63 63
 
@@ -404,18 +404,13 @@ def hls_base2(url):
404 404
     rest = url.replace(base, "")
405 405
     return base
406 406
 
407
-print streamproxy_encode3("get_content", "ltc::home", qs={"user": "ivars777", "password": "Kaskade7"})
408
-print streamproxy_encode3("get_content", "ltc::content/live-streams/101?include=quality", qs={"user": "ivars777", "password": "Kaskade7"})
409
-urlp = streamproxy_encode3("playstream",
410
-                          "ltc::content/live-streams/101?include=quality",
411
-                          #headers=headers0,
412
-                          qs={"user": "ivars777", "password": "Kaskade7"})
413
-print urlp
414
-print streamproxy_encode3("playstream", "replay::tiesraide/ltv1")
415
-print streamproxy_encode3("playstream", "tvdom::tiesraides/ltv1/")
416
-print streamproxy_encode3("playstream", "tvplay::asset/10311641")
417
-print streamproxy_encode3("playstream", "xtv::rigatv24/video/Zw4pVPqr7OX-festivals_mainam_pasauli_sakam_ar_sevi")
418
-print streamproxy_encode3("playstream", "iplayer::episodes/b094f49s")
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")
419 414
 #cmd, data, headers, qs = streamproxy_decode3(urlp)
420 415
 
421 416
 if __name__ == "__main__":

+ 1
- 0
sources/streams.cfg Ver arquivo

@@ -22,6 +22,7 @@ cinemalive.tv|cinemalive::home|cinemalive.png|Filmas latviski
22 22
 SerialGURU.ru|serialguru::home|http://serialguru.ru/images/xlogo_new.png.pagespeed.ic.0sre2_2OJN.png|Serialguru.ru portāla satura skatīšanās
23 23
 MoviePlace.lv|movieplace::home|movieplace.png|Movieplace.lv - filmas latviesu valodā
24 24
 Engima2|enigma2::home|enigma2.png|Get streams from engima2 sat receiver
25
+test|http://mfe1-iptv.baltcom.lv/dash/CH_7_50.ism/playlist.mpd||testa strīms
25 26
 
26 27
 [my_tv]
27 28
 My Tv