Files
addon/servers/streamingcommunityws.py
fatshotty 964cc80cce Streamingcommunity (#309)
* added folder for new server

* WIP: streamingcommunity and animeunity

* streaming community for animeunity

* httpserver for streaming from streamingcommunity ws

* fix for episode and tvshows

* log and code cleanup

* fixed multi stream for streamingcommunity. Use 'serve_forever' in order to avoid infinite loop

* added log for debug and info. Little fixes
2021-06-16 17:59:53 +02:00

31 lines
795 B
Python
Executable File

# -*- coding: utf-8 -*-
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
import json
import random
from core import httptools, support, scrapertools
from platformcode import platformtools, logger
from lib.streamingcommunity import Client as SCClient
files = None
def test_video_exists(page_url):
# page_url is the {VIDEO_ID}. Es: 5957
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
video_urls = []
global c
c = SCClient("",video_id=page_url, is_playing_fnc=platformtools.is_playing)
media_url = c.get_manifest_url()
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [Streaming Community]", media_url])
return video_urls