Subversion Repositories sd-xbmc

Compare Revisions

Ignore whitespace Rev 368 → Rev 400

/trunk/xbmc-addons/src/addons.xml
1,23 → 1,23
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addons>
<addon id="repository.sd-xbmc.org"
name="sd-xbmc.org Add-ons"
version="1.0.1"
provider-name="SD Team">
<addon id="repository.systems-design.eu"
name="systems-design.eu Add-ons"
version="1.0.0"
provider-name="SYSTEMS DESIGN">
<extension point="xbmc.addon.repository"
name="Official SD-XBMC Add-on Repository">
<info compressed="false">http://sd-xbmc.org/repository/addons.xml</info>
<checksum>http://sd-xbmc.org/repository/addons.xml.md5</checksum>
<datadir zip="false">http://sd-xbmc.org/repository</datadir>
name="Official SYSTEMS DESIGN Add-on Repository">
<info compressed="false">http://sd-xbmc.googlecode.com/svn/trunk/xbmc-addons/src/addons.xml</info>
<checksum>http://sd-xbmc.googlecode.com/svn/trunk/xbmc-addons/src/addons.xml.md5</checksum>
<datadir zip="false">http://sd-xbmc.googlecode.com/svn/trunk/xbmc-addons/src</datadir>
<!--<hashes>true</hashes>-->
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">Install Add-ons from sd-xbmc.org</summary>
<summary lang="de">Installiere Add-ons von sd-xbmc.org</summary>
<summary lang="es">Instalar Addons desde sd-xbmc.org</summary>
<summary lang="fr">Installe les Add-ons depuis sd-xbmc.org</summary>
<summary lang="nl">Add-ons van sd-xbmc.org installeren</summary>
<summary lang="pl">Instaluj wtyczki z sd-xbmc.org</summary>
<summary lang="en">Install Add-ons from XBMC.org</summary>
<summary lang="de">Installiere Add-ons von systems-design.eu</summary>
<summary lang="es">Instalar Addons desde systems-design.eu</summary>
<summary lang="fr">Installe les Add-ons depuis systems-design.eu</summary>
<summary lang="nl">Add-ons van systems-design.eu installeren</summary>
<summary lang="pl">Instaluj wtyczki z systems-design.eu</summary>
</extension>
</addon>
 
40,21 → 40,6
</extension>
</addon>
 
<addon id="plugin.bino3D.openelec" name="Bino 3D player"
version="0.0.1" provider-name="SYSTEMS DESIGN - Plesken">
<requires>
<import addon="xbmc.python" version="1.0" />
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>Bino 3D player</summary>
<description>Bino 3D player integrated with openelec</description>
<platform>OpenELEC - Linux</platform>
</extension>
</addon>
 
<addon id="plugin.multimedia.players" name="External Multimedia Players"
version="1.0.6" provider-name="SYSTEMS DESIGN - Plesken">
<requires>
70,9 → 55,30
</extension>
</addon>
 
<addon id="repository.sd-xbmc.org"
name="sd-xbmc.org Add-ons"
version="1.0.1"
provider-name="SD Team">
<extension point="xbmc.addon.repository"
name="Official SD-XBMC Add-on Repository">
<info compressed="false">http://sd-xbmc.org/repository/addons.xml</info>
<checksum>http://sd-xbmc.org/repository/addons.xml.md5</checksum>
<datadir zip="false">http://sd-xbmc.org/repository</datadir>
<!--<hashes>true</hashes>-->
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">Install Add-ons from sd-xbmc.org</summary>
<summary lang="de">Installiere Add-ons von sd-xbmc.org</summary>
<summary lang="es">Instalar Addons desde sd-xbmc.org</summary>
<summary lang="fr">Installe les Add-ons depuis sd-xbmc.org</summary>
<summary lang="nl">Add-ons van sd-xbmc.org installeren</summary>
<summary lang="pl">Instaluj wtyczki z sd-xbmc.org</summary>
</extension>
</addon>
 
<addon id="plugin.video.polishtv.live"
name="Telewizja Polska (kanały, VOD, filmy, seriale)"
version="0.2.0"
version="0.3.0"
provider-name="SD Team">
<requires>
<import addon="xbmc.python" version="1.0"/>
/trunk/xbmc-addons/src/plugin.video.polishtv.live/cookies.lwp
File deleted
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/wlacztv.py
17,15 → 17,15
import pLog, settings, Parser, pCommon, Navigation, Errors
 
log = pLog.pLog()
cj = cookielib.LWPCookieJar()
 
SERVICE = 'wlacztv'
 
HOST = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110621 Mandriva Linux/1.9.2.18-0.1mdv2010.2 (2010.2) Firefox/3.6.18'
#mainUrl = "http://www.wlacz.tv"
#mainChannels = mainUrl + "/kanaly"
mainUrl = 'http://www.wlacz.tv'
mainUrl = "http://www.wlacz.tv"
playerUrl = mainUrl + '/api/setPlayer'
altUrl = 'http://www.polandlive.tv'
altPlayerUrl = altUrl + '/api/setPlayer'
 
channelsUrl = mainUrl + '/api/online_channels'
loginUrl = mainUrl + '/api/login'
isLoggedUrl = mainUrl + '/api/is_logged'
54,14 → 54,16
self.navigation = Navigation.RecordNav()
self.exception = Errors.Exception()
 
 
def dec(self, string):
json_ustr = json.dumps(string, ensure_ascii=False)
return json_ustr.encode('utf-8')
 
def checkDirCookie(self):
if not os.path.isdir(ptv.getAddonInfo('path') + os.path.sep + "cookies"):
os.mkdir(ptv.getAddonInfo('path') + os.path.sep + "cookies")
def isLogged(self):
query_data = { 'url': isLoggedUrl, 'use_host': True, 'host': HOST, 'use_cookie': True, 'load_cookie': True, 'save_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
71,7 → 73,6
traceback.print_exc()
self.exception.getError(str(exception))
exit()
#content_json = self.common.getURLFromFileCookieData(isLoggedUrl, COOKIEFILE)
result_json = json.loads(content_json)
if dbg == 'true':
log.info('WLACZ.TV - isLogged() -> json: ' + str(result_json))
80,7 → 81,8
return True
else:
return False
def requestLoginData(self):
if login == "" or password == "":
d = xbmcgui.Dialog()
91,18 → 93,17
query_data = { 'url': loginUrl, 'use_host': True, 'host': HOST, 'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': True, 'return_data': True }
self.checkDirCookie()
try:
#self.common.saveURLToFileCookieData(loginUrl, COOKIEFILE, post)
self.common.getURLRequestData(query_data, post)
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
def channelsList(self, url):
query_data = { 'url': url, 'use_host': True, 'host': HOST, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
try:
raw_json = self.common.getURLRequestData(query_data)
#raw_json = self.common.getURLFromFileCookieData(url, COOKIEFILE)
result_json = json.loads(raw_json)
except Exception, exception:
traceback.print_exc()
122,24 → 123,34
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_TITLE)
xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
def getChannelRTMPLink(self, key, title, icon):
post = { 'key': key }
query_data = { 'url': playerUrl, 'use_host': True, 'host': HOST, 'use_cookie': True, 'load_cookie': True, 'save_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': True, 'return_data': True }
#log.info('rtmp: ' + str(self.common.postURLFromFileCookieData(playerUrl, COOKIEFILE, post)))
try:
#rtmp_json = json.loads(self.common.postURLFromFileCookieData(playerUrl, COOKIEFILE, post))
rtmp_json = json.loads(self.common.getURLRequestData(query_data, post))
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
exit()
#try alternative url
if 'error' in rtmp_json:
query_data = { 'url': altPlayerUrl, 'use_host': True, 'host': HOST, 'use_cookie': True, 'load_cookie': True, 'save_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': True, 'return_data': True }
try:
rtmp_json = json.loads(self.common.getURLRequestData(query_data, post))
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
if dbg == 'true':
log.info('WLACZ.TV - getChannelRTMPLink() -> rtmp json: ' + str(rtmp_json))
 
#tcurl = rtmp_json['rtmp_server'] + '/wlacztv/' + rtmp_json['playPath']
rtmp = rtmp_json['rtmp_server'] + "/" + rtmp_json['app'] + '?wlacztv_session_token=' + rtmp_json['token']
return { 'title': title, 'icon': icon, 'key': key, 'rtmp': rtmp, 'playpath': rtmp_json['playPath'] }
def addChannel(self, service, title, key, icon):
u = "%s?service=%s&title=%s&key=%s&icon=%s" % (sys.argv[0], service, title, key, urllib.quote_plus(icon))
liz = xbmcgui.ListItem(title, iconImage="DefaultFolder.png", thumbnailImage = icon)
153,12 → 164,12
FILE = open(os.path.join(strmdir, "%s.strm" % ''.join(c for c in title if c in '-_.() abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')),"w+")
FILE.write("plugin://plugin.video.polishtv.live/?service=%s&key=%s&icon=%s&title=%s" % (service, key, urllib.quote_plus(icon), urllib.quote_plus(title)))
 
 
class Player:
def __init__(self):
pass
 
 
def InputTime(self):
nowTime = datetime.datetime.now() + datetime.timedelta(hours = int(timedelta_h), minutes = int(timedelta_m))
text = None
167,7 → 178,8
if (k.isConfirmed()):
text = k.getText()
return self.GetTime(text)
 
def GetTime(self, end):
rectime = 0
if ":" in end:
186,7 → 198,8
if rectime < 0:
rectime = 0
return rectime
 
 
def LOAD_AND_PLAY_VIDEO(self, jsonUrl = {}):
if jsonUrl['rtmp'] == '':
d = xbmcgui.Dialog()
237,6 → 250,7
res = True
return res
 
 
def download(self, app, params = {}):
td = datetime.datetime.now() + datetime.timedelta(hours = int(timedelta_h), minutes = int(timedelta_m))
nt = time.mktime(td.timetuple())
250,13 → 264,15
self.recdir = os.path.join(ptv.getAddonInfo('path'), "recs")
self.cmddir = os.path.join(ptv.getAddonInfo('path'), "cmd")
 
 
def input(self, text, header):
k = xbmc.Keyboard(text, header)
k.doModal()
if (k.isConfirmed()):
text = k.getText()
return text
def Init(self, url, key, title, login_url):
nowTime = datetime.datetime.now() + datetime.timedelta(hours = int(timedelta_h), minutes = int(timedelta_m))
nowDate = str(nowTime.strftime("%Y-%m-%d"))
270,6 → 286,7
opts = { 'service': SERVICE, 'key': key, 'login_url': login_url, 'date': s_Date, 'start': s_Start, 'rectime': str(setTime[1]), 'name': nameRec, 'url': url, 'login': login, 'password': password, 'dst_path': dstpath, 'rtmp_path': rtmppath, 'hours_delta': timedelta_h, 'minutes_delta': timedelta_m }
self.saveFile(opts)
xbmc.executebuiltin('AlarmClock(' + str(nameRec) + ', "RunScript(' + str(self.cmddir) + str(os.sep) + 'record.py, ' + str(self.recdir) + str(os.sep) + str(nameRec) + '.json)", ' + str(setTime[0]) + '))')
def saveFile(self, opts = {}):
out = json.dumps(opts)
278,6 → 295,7
wfile.write(out)
wfile.close()
 
 
def SetTime(self, startDate, startTime, endDate, endTime):
nowTime = datetime.datetime.now() + datetime.timedelta(hours = int(timedelta_h), minutes = int(timedelta_m))
start = startDate + " " + startTime + ":00.0"
292,6 → 310,7
rectime = int(et - st)
return [ alarmtime, rectime ]
 
 
def GetAlarmTime(self, startDate, startTime):
nowTime = datetime.datetime.now() + datetime.timedelta(hours = int(timedelta_h), minutes = int(timedelta_m))
start = startDate + " " + startTime + ":00.0"
323,7 → 342,8
self.parser = Parser.Parser()
self.channel = Channels()
self.player = Player()
 
 
def handleService(self):
params = self.parser.getParams()
title = str(self.parser.getParam(params, "title"))
342,6 → 362,7
elif title != '' and key != '':
self.player.LOAD_AND_PLAY_VIDEO(self.channel.getChannelRTMPLink(key, title, icon))
 
 
def handleRecords(self):
d = xbmcgui.Dialog()
rec = Record()
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/hbogo.py
New file
0,0 → 1,232
# -*- coding: utf-8 -*-
import urllib, urllib2, sys, re, os
import xbmcgui, xbmc, xbmcplugin, xbmcaddon
import simplejson as json
import elementtree.ElementTree as ET
 
import traceback
 
import pLog, settings, Parser, Navigation, pCommon, Errors
 
log = pLog.pLog()
HANDLE = int(sys.argv[1])
 
scriptID = 'plugin.video.polishtv.live'
scriptname = "Polish Live TV"
ptv = xbmcaddon.Addon(scriptID)
 
BASE_RESOURCE_PATH = os.path.join( ptv.getAddonInfo('path'), "../resources" )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
 
SERVICE = 'hbogo'
userAgent = 'Apache-HttpClient/UNAVAILABLE (java 1.4)'
 
webUrl = 'http://www.hbogo.pl'
plapiUrl = 'http://plapi.hbogo.eu'
ploriginUrl = 'http://plorigin.hbogo.eu'
drmUrl = 'http://sl.licensekeyserver.com'
configUrl = plapiUrl + '/Player26.svc/Configuration/JSON/POL/TABL'
categoryPlayer = '/Player26.svc/Category/JSON/POL/'
mediaPlayer = '/Player26.svc/Media/JSON/POL/'
emptyMediaIdPlayer = '/00000000-0000-0000-0000-000000000000/TABL'
 
dstpath = ptv.getSetting('default_dstpath')
dbg = ptv.getSetting('default_debug')
 
 
class Movies:
def __init__(self):
self.common = pCommon.common()
self.chars = pCommon.Chars()
 
def enc(self, string):
json_ustr = json.dumps(string, ensure_ascii=False)
return json_ustr.encode('utf-8')
def dec(self, json):
string = self.enc('u\'' + json + '\'').replace("\"", "").replace("u'", "").replace("'", "")
return string
def getStatus(self, url):
status = True
query_data = { 'url': url, 'use_host': True, 'host': userAgent, 'use_cookie': False, 'use_post': False, 'return_data': True }
try:
response = self.common.getURLRequestData(query_data)
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
if response.strip() != 'OK':
status = False
if dbg == 'true':
log.info("HBOGO - getStatus() -> response: " + str(response.strip()))
log.info("HBOGO - getStatus() -> status: " + str(status))
return status
def hbogoAPI(self, url, method = 'get', cookie = False, return_data = True):
use_post = False
if method == 'post':
use_post = True
query_data = { 'url': url, 'use_host': True, 'host': userAgent, 'use_cookie': cookie, 'use_post': use_post, 'return_data': return_data }
try:
response = self.common.getURLRequestData(query_data)
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
json_data = json.loads(response)
return json_data
 
def listCategories(self, url):
api = self.hbogoAPI(url)
categories = api['Categories']
for i in range(len(categories)):
img = self.dec(categories[i]['NormalIconUrl'])
title = self.dec(categories[i]['Name'])
id = self.dec(categories[i]['Id'])
n_url = plapiUrl + categoryPlayer + id + emptyMediaIdPlayer
if dbg == 'true':
log.info("HBOGO - listCategories() -> title: " + str(title))
log.info("HBOGO - listCategories() -> img link: " + img)
log.info("HBOGO - listCategories() -> url: " + n_url)
self.addDir(SERVICE, 'categories', title, img, '', n_url)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
def listContent(self, url):
api = self.hbogoAPI(url)
items = api['Collections'][0]['MediaItems']
for i in range(len(items)):
desc = self.dec(items[i]['Abstract'])
img = self.dec(items[i]['ThumbnailUrl'])
title = self.dec(items[i]['Name'])
id = self.dec(items[i]['Id'])
materialId = self.dec(items[i]['MaterialId'])
materialItemId = self.dec(items[i]['MaterialItemId'])
origTitle = self.dec(items[i]['OriginalName'])
content = items[i]['ContentType']
n_url = plapiUrl + mediaPlayer + id + '/' + materialId + '/' + materialItemId + '/TABL'
if dbg == 'true':
log.info("HBOGO - listSeasons() -> title: " + str(title))
log.info("HBOGO - listSeasons() -> img link: " + img)
log.info("HBOGO - listSeasons() -> url: " + n_url)
log.info("HBOGO - listSeasons() -> content: " + str(content))
if content == 1:
self.addDir(SERVICE, 'movie', title, img, desc, n_url)
elif content == 2:
self.addDir(SERVICE, 'episode', title, img, desc, n_url)
elif content == 5:
self.addDir(SERVICE, 'season', title, img, desc, n_url)
#self.addDir(SERVICE, 'series', '', '', '', '')
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
def listEpisodes(self, url):
api = self.hbogoAPI(url)
items = api['Episodes']
for i in range(len(items)):
allowfreepreview = items[i]['AllowFreePreview'] #true
allowplay = items[i]['AllowPlay'] #true
episode = items[i]['EpisodeNumber']
ispublic = items[i]['IsPublic']
duration = items[i]['MovieDuration']
desc = self.dec(items[i]['Abstract'])
img = self.dec(items[i]['ThumbnailUrl'])
title = self.dec(items[i]['Name'])
id = self.dec(items[i]['Id'])
materialId = self.dec(items[i]['MaterialId'])
materialItemId = self.dec(items[i]['MaterialItemId'])
origTitle = self.dec(items[i]['OriginalName'])
content = items[i]['ContentType']
n_url = plapiUrl + mediaPlayer + id + '/' + materialId + '/' + materialItemId + '/TABL'
if dbg == 'true':
log.info("HBOGO - listEpisodes() -> title: " + str(title))
log.info("HBOGO - listEpisodes() -> img link: " + img)
log.info("HBOGO - listEpisodes() -> url: " + n_url)
log.info("HBOGO - listEpisodes() -> content: " + str(content))
if content == 3:
self.addDir(SERVICE, 'info-movie', title, img, desc, n_url)
#self.addDir(SERVICE, 'series', '', '', '', '')
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
def infoMovie(self, url):
api = self.hbogoAPI(url)
audio = api['AudioTracks']
desc = self.dec(api['Description'])
ispublic = api['IsPublic']
duration = api['Duration']
id = api['Id']
materialId = api['MaterialId']
materialItemId = api['MaterialItemId']
name = self.dec(api['Name'])
img = api['ThumbnailUrl']
background = api['BackgroundUrl']
n_url = ploriginUrl + '//' + id + '/' + self.getIdFromURL(background) + '/MOBI/Movie/mux.ism/Manifest'
if dbg == 'true':
log.info("HBOGO - infoMovie() -> audio: " + str(audio))
log.info("HBOGO - infoMovie() -> desc: " + desc)
log.info("HBOGO - infoMovie() -> name: " + str(name))
log.info("HBOGO - infoMovie() -> n_url: " + str(n_url))
self.addDir(SERVICE, 'playedSelectedMovie', 'PLAY: ' + name, img, desc, n_url)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
def getMovieInformation(self, url):
api = self.hbogoAPI(url, 'get', False, False)
 
def getIdFromURL(self, url):
return url.split("/")[5]
def addDir(self, service, type, title, img, desc, link):
liz = xbmcgui.ListItem(title, iconImage = "DefaultFolder.png", thumbnailImage = img)
liz.setProperty("IsPlayable", "false")
liz.setInfo(type = "Video", infoLabels={ "Title": title,
"Plot": desc })
#"Studio": "WEEB.TV",
#"Tagline": tags,
#"Aired": user } )
u = '%s?service=%s&type=%s&title=%s&icon=%s&url=%s' % (sys.argv[0], SERVICE, type, str(title), urllib.quote_plus(img), urllib.quote_plus(link))
xbmcplugin.addDirectoryItem(HANDLE, url = u, listitem = liz, isFolder = True)
 
 
class DRM:
def __init__(self):
pass
 
 
class HBOGO:
def __init__(self):
self.common = pCommon.common()
self.chars = pCommon.Chars()
self.movie = Movies()
self.parser = Parser.Parser()
def handleService(self):
params = self.parser.getParams()
title = str(self.parser.getParam(params, "title"))
type = self.parser.getParam(params, "type")
service = self.parser.getParam(params, "service")
image = self.parser.getParam(params, "image")
#url = urllib.unquote_plus(self.parser.getParam(params, "url"))
url = self.parser.getParam(params, "url")
#content = self.parser.getParam(params, "content")
if dbg == 'true':
log.info('HBOGO - handleService()[0] -> title: ' + str(title))
log.info('HBOGO - handleService()[0] -> type: ' + str(type))
log.info('HBOGO - handleService()[0] -> service: ' + str(service))
log.info('HBOGO - handleService()[0] -> image: ' + str(image))
log.info('HBOGO - handleService()[0] -> url: ' + str(url))
#log.info('HBOGO - handleService()[0] -> content: ' + str(content))
if self.movie.getStatus(webUrl + '/servicestatus.aspx'):
if dbg == 'true':
log.info("HBOGO - handleService()[0] -> getStatus is TRUE")
if title == 'None':
self.movie.listCategories(configUrl)
elif title != 'None' and url.startswith("http://") and type == 'categories':
self.movie.listContent(url)
elif title != 'None' and url.startswith("http://") and type == 'season':
self.movie.listEpisodes(url)
elif title != 'None' and url.startswith("http://") and type == 'info-movie':
self.movie.infoMovie(url)
if type == 'playSelectedMovie' and url.startswith("http://"):
pass
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/kabarety.py
11,10 → 11,12
BASE_RESOURCE_PATH = os.path.join( ptv.getAddonInfo('path'), "../resources" )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
 
import pLog, settings, Parser, urlparser, pCommon
import pLog, settings, Parser, urlparser, pCommon, Errors, traceback
 
log = pLog.pLog()
 
dbg = ptv.getSetting('default_debug')
 
HOST = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110621 Mandriva Linux/1.9.2.18-0.1mdv2010.2 (2010.2) Firefox/3.6.18'
SERVICE = 'kabarety'
MAINURL = 'http://www.kabarety.odpoczywam.net/'
31,6 → 33,29
5: "Historia Wyszukiwania"
}
 
CHARS = [
[ '&#261;', 'ą' ],
[ '&#263;', 'ć' ],
[ '&#281;', 'ę' ],
[ '&#322;', 'ł' ],
[ '&#324;', 'ń' ],
[ '&#243;', 'ó' ],
[ '&#347;', 'ś' ],
[ '&#378;', 'ź' ],
[ '&#380;', 'ż' ],
[ '&#260;', 'Ą' ],
[ '&#262;', 'Ć' ],
[ '&#280;', 'Ę' ],
[ '&#321;', 'Ł' ],
[ '&#323;', 'Ń' ],
[ '&#211;', 'Ó' ],
[ '&#346;', 'Ś' ],
[ '&#377;', 'Ż' ],
[ '&#379;', 'Ż' ],
[ '&amp;', '&' ],
[ '&quot;', '"' ],
]
 
class Kabarety:
def __init__(self):
log.info('Loading ' + SERVICE)
39,8 → 64,10
self.up = urlparser.urlparser()
self.cm = pCommon.common()
self.history = pCommon.history()
self.chars = pCommon.Chars()
self.exception = Errors.Exception()
self.dir = pCommon.common()
 
 
def setTable(self):
return SERVICE_MENU_TABLE
 
54,16 → 81,24
def getCategoryTab(self,url):
strTab = []
valTab = []
data = self.cm.requestData(url)
match = re.compile('<a href="(.+?)">(.+?)</a><br>').findall(data)
query_data = { 'url': url, 'use_host': True, 'host': HOST, 'use_cookie': False, 'use_post': False, 'return_data': True }
try:
data = self.cm.getURLRequestData(query_data)
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
match = re.compile('<b>Kategorie</a><br><br>(.+?)<br><br>', re.DOTALL).findall(data)
if len(match) > 0:
for i in range(len(match)):
value = match[i]
strTab.append(value[0])
strTab.append(value[1])
valTab.append(strTab)
strTab = []
valTab.sort(key = lambda x: x[1])
match2 = re.compile('href="(.+?)">(.+?)</a>').findall(match[0])
if len(match2) > 0:
for i in range(len(match2)):
value = match2[i]
strTab.append(value[0])
strTab.append(value[1])
valTab.append(strTab)
strTab = []
valTab.sort(key = lambda x: x[1])
return valTab
 
 
71,16 → 106,32
table = self.getCategoryTab(url)
for i in range(len(table)):
value = table[i]
title = value[1]
title = self.replaceChars(value[1])
if title > 0:
self.addDir(SERVICE, value[0], category, title, '', '', '', True, False)
self.addDir(SERVICE, value[0], category, title, 'cat', '', '', True, False)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
def replaceChars(self, string):
out = string
for i in range(len(CHARS)):
out = string.replace(CHARS[i][0], CHARS[i][1])
string = out
return out
def setCHARS(self):
return CHARS
 
 
def getFilmTab(self, url):
strTab = []
valTab = []
data = self.cm.requestData(url)
query_data = { 'url': url, 'use_host': True, 'host': HOST, 'use_cookie': False, 'use_post': False, 'return_data': True }
try:
data = self.cm.getURLRequestData(query_data)
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
link = data.replace('\n', '')
match = re.compile('<a class="video-mini" title="(.+?)" href=".+?">.+?<span class="duration".+?<img class="video-mini-img".+?src="http://i.ytimg.com/vi/(.+?)/0.jpg" />').findall(link)
if len(match) > 0:
102,7 → 153,7
table = self.getFilmTab(url)
for i in range(len(table)):
value = table[i]
title = value[0]
title = self.replaceChars(value[0])
img = IMGURL + value[1] + '/0.jpg'
if value[0] != 'Następna strona':
self.addDir(SERVICE, 'playSelectedMovie', '', title, '', value[1], img, True, False)
121,7 → 172,7
def getSearchTable(self, table):
for i in range(len(table)):
value = table[i]
title = value[0]
title = self.replaceChars(value[0])
img = IMGURL + value[1] + '/0.jpg'
self.addDir(SERVICE, 'playSelectedMovie', '', title, '', value[1], img, True, False)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
140,7 → 191,13
def searchTab(self, text):
strTab = []
valTab = []
data = self.cm.requestData(MAINURL + '/search?q=' + text)
query_data = { 'url': MAINURL + '/search?q=' + text, 'use_host': True, 'host': HOST, 'use_cookie': False, 'use_post': False, 'return_data': True }
try:
data = self.cm.getURLRequestData(query_data)
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
link = data.replace('\n', '')
match = re.compile('<a class="video-mini" title="(.+?)" href=".+?">.+?<span class="duration".+?<img class="video-mini-img".+?src="http://i.ytimg.com/vi/(.+?)/0.jpg" />').findall(link)
if len(match) > 0:
167,19 → 224,20
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=folder)
def LOAD_AND_PLAY_VIDEO(self, videoId):
def LOAD_AND_PLAY_VIDEO(self, page):
ok=True
if videoId == '':
videoUrl = 'plugin://plugin.video.youtube?path=/root/video&action=play_video&videoid=' + page
if videoUrl == '':
d = xbmcgui.Dialog()
d.ok('Nie znaleziono streamingu.', 'Może to chwilowa awaria.', 'Spróbuj ponownie za jakiś czas')
return False
try:
url = 'plugin://plugin.video.youtube?path=/root/video&action=play_video&videoid=' + videoId
xbmc.executebuiltin("xbmc.PlayMedia("+url+")")
xbmcPlayer = xbmc.Player()
xbmcPlayer.play(videoUrl)
except:
d = xbmcgui.Dialog()
d.ok('Błąd przy przetwarzaniu, lub wyczerpany limit czasowy oglądania.', 'Zarejestruj się i opłać abonament.', 'Aby oglądać za darmo spróbuj ponownie za jakiś czas')
return ok
d.ok('Nie znaleziono streamingu.', 'Może to chwilowa awaria.', 'Spróbuj ponownie za jakiś czas')
return videoUrl
 
 
def handleService(self):
190,27 → 248,25
page = self.parser.getParam(params, "page")
icon = self.parser.getParam(params, "icon")
 
log.info ('name: ' + str(name))
log.info ('title: ' + str(title))
log.info ('category: ' + str(category))
log.info ('page: ' + str(page))
if dbg == 'true':
log.info ('name: ' + str(name))
log.info ('title: ' + str(title))
log.info ('category: ' + str(category))
log.info ('page: ' + str(page))
 
if page=='': page = 1
if str(page)=='None' or page=='': page = 1
if name == None:
self.listsMainMenu(SERVICE_MENU_TABLE)
elif category == self.setTable()[1]:
name = 'nic'
self.getFilmTable(NOW_LINK + str(page), page, category, name)
self.getFilmTable(NOW_LINK + str(page), page, category, 'name')
 
elif category == self.setTable()[2]:
name = 'nic'
self.getFilmTable(NAJ_LINK + str(page), page, category, name)
self.getFilmTable(NAJ_LINK + str(page), page, category, 'name')
 
elif category == self.setTable()[3]:
categoryfix = category + 'fix'
self.listsCategoriesMenu(MAINURL, categoryfix)
elif category == self.setTable()[3] and name == 'main-menu':
self.listsCategoriesMenu(MAINURL, category)
 
elif category == self.setTable()[4]:
text = self.searchInputText()
221,10 → 277,9
if category == 'history' and name != 'playSelectedMovie':
self.getSearchTable(self.searchTab(name))
if category == 'Kategoriefix':
if category == self.setTable()[3] and name != 'main-menu':
url = name + '/page:' + str(page)
self.getFilmTable(url, page, category, name)
if name == 'playSelectedMovie':
self.LOAD_AND_PLAY_VIDEO(page)
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/stations.py
34,19 → 34,21
[ "TVN", 0, "rtmp://75.126.203.130/stream/JardelloTV3333?id=59199" ],
[ "Polsat LQ1", 0, "rtmp://50.23.115.84/stream/telewizyjka?id=61660" ],
[ "TVN24", 1, "rtmp://94.23.39.164/satlive/tvn24 playpath=tvn24 swfUrl=http://satlive.pl/player/player.swf pageUrl=http://satlive.pl/stream,id-129.htm live=true swfVfy=true" ],
# [ "POLSAT", 0, "rtsp://publish.001.wlacz.tv:1935/live/polsat.stream" ],
[ "SkyWindows", 0, "rtmp://ls1.webcamera.pl/nartytv/tv_medium" ],
[ "Polsat", 0, "rtmp://198.105.209.124/stream/JardelloTV4343?id=59200" ],
[ "Polsat LQ", 0, "rtmp://75.126.203.130/stream/darmowatelewizjacompolsat?id=59168" ],
# [ "TV4", 0, "rtsp://publish.005.wlacz.tv:1935/live/tv4.stream" ],
# [ "TVN7", 0, "rtsp://publish.001.wlacz.tv:1935/live/polsatsportnews.stream" ],
# [ "HBO", 0, "rtsp://publish.001.wlacz.tv:1935/live/hbo1.stream" ],
# [ "TTV", 0, "rtsp://publish.001.wlacz.tv:1935/live/utv.stream" ],
# [ "ATM Rozrywka", 0, "rtsp://publish.001.wlacz.tv:1935/live/atm.stream" ],
[ "TV4", 0, "rtmp://gdansk.popler.tv:80/rtplive?play=123452/titru" ],
[ "National Geographic", 0, "rtmp://creyden.popler.tv:80/rtplive?play=123452/istreampl5" ],
[ "TV Puls", 0, "rtmp://creyden.popler.tv:80/rtplive?play=123452/istreampl3" ],
[ "TV Puls 2", 0, "rtmp://poviss.popler.tv:1935/rtplive?play=123452/istreampl4" ],
[ "Discovery Science", 0, "rtmp://creyden.popler.tv:80/rtplive?play=123452/istreampl2" ],
[ "TTV", 0, "rtmp://gdansk.popler.tv:80/rtplive?play=123452/admin245" ],
 
[ "TVP1", 0, "rtmp://94.23.39.164/satlive/tvp1 playpath=tvp1 swfUrl=http://satlive.pl/player/player.swf pageUrl=http://satlive.pl/stream,id-126.htm live=true swfVfy=true" ],
[ "HBO", 0, "rtmp://94.23.39.164/satlive/hbo playpath=hbo swfUrl=http://satlive.pl/player/player.swf pageUrl=http://satlive.pl/stream,id-137.htm live=true swfVfy=true" ],
[ "Canal Plus Film", 0, "rtmp://94.23.39.164/satlive/canalplusfilm playpath=canalplusfilm swfUrl=http://satlive.pl/player/player.swf pageUrl=http://satlive.pl/stream,id-132.htm live=true swfVfy=true" ],
 
[ "TVP INFO ", 1, "rtmp://freeview.fms.visionip.tv/live/tvnetwork-polskaplus-tvpinfo-hsslive-25f-4x3-SDh?extsessionid=50444e8f09104-69afb3db1bb7434f243177b5996b8af1" ],
[ "TVP INFO ", 1, "rtmp://freeview.fms.visionip.tv/live/tvnetwork-polskaplus-tvpinfo-hsslive-25f-4x3-SDh?extsessionid=50e3fa0e292fb-52489ced473722861898a32c76fd7f93" ],
[ "TVP MIX 1", 0, "http://195.245.213.199/Ch0003" ],
[ "TVP MIX 2", 0, "http://195.245.213.204/Ch0018" ],
[ "TVP MIX 3", 0, "http://195.245.213.204/Ch0019" ],
122,8 → 124,7
[ "TV Rijnmond", 6, "rtsp://wm1.ams.cdn.surf.net/surfnetvdox=RTVRijnmond=TVRijnmond3" ],
[ "Rai2", 6, "http://212.162.68.162:80/prodtvr2" ],
[ "BFM TV", 6, "http://vipmms9.yacast.net:80/bfm_bfmtv" ],
[ "Discovery Channel", 6,"rtmp://78.129.146.62/edge3/BETUK/BETUK" ],
[ "Discovery Channel", 0,"rtmp://62.212.72.193/stream/DISCOVERYTELEWIZYJKAPL?id=69118" ],
[ "LTV 1", 6,"http://82.135.235.37:80/LTV" ],
[ "LTV World", 6,"http://82.135.235.37:80/LTVworld" ],
[ "MTV Россия", 3,"http://77.91.77.19:7015/?sid=" ],
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/tvn.py
28,6 → 28,8
ptv = xbmcaddon.Addon(scriptID)
 
SERVICE = 'tvn'
proxy_url = 'aHR0cDovL3NkLXhibWMub3JnL3N1cHBvcnQvdHZucHJveHkucGhwP3U9'
proxy_cache = 'aHR0cDovL3NkLXhibWMub3JnL3N1cHBvcnQvdHZucHJveHkucGhwP2MmdT0='
 
qualities = [
'HD',
96,6 → 98,9
 
def addVideoLink(self,prop,url,iconimage,listsize=0):
ok=True
folder = False
if proxy == 'true':
folder = True
if not 'description' in prop:
prop['description'] = ''
if not 'time' in prop:
124,9 → 129,47
if dstpath != "None" or not dstpath:
cm = self.navigation.addVideoContextMenuItems({ 'service': SERVICE, 'title': urllib.quote_plus(prop['title']), 'url': urllib.quote_plus(url), 'path': os.path.join(dstpath, SERVICE) })
liz.addContextMenuItems(cm, replaceItems=False)
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz,isFolder=False,totalItems=listsize)
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz,isFolder=folder,totalItems=listsize)
return ok
 
def addVideoProxyLink(self,prop,url,iconimage,listsize=0):
ok=True
u = '%s?service=%s&url=%s&type=playSelectedMovie&name=%s' % (sys.argv[0], SERVICE, urllib.quote_plus(url), prop['title'])
folder = False
if proxy == 'true':
folder = True
if not 'description' in prop:
prop['description'] = ''
if not 'time' in prop:
prop['time'] = 0
if not 'aired' in prop:
prop['aired'] = ''
if not 'overlay' in prop:
prop['overlay'] = 0
if not 'TVShowTitle' in prop:
prop['TVShowTitle'] = ''
if not 'episode' in prop:
prop['episode'] = 0
if dbg == 'true':
log.info('TVN - addVideoProxyLink() -> prop[]: ' + str(prop))
liz=xbmcgui.ListItem(prop['title'], iconImage="DefaultFolder.png", thumbnailImage=iconimage)
liz.setProperty("IsPlayable", "true")
liz.setInfo( type="Video", infoLabels={
"Title": prop['title'],
"Plot": prop['description'],
"Duration": str(prop['time']),
"Premiered": prop['aired'],
"Overlay": prop['overlay'],
"TVShowTitle" : prop['TVShowTitle'],
"Episode" : prop['episode']
} )
if dstpath != "None" or not dstpath:
cm = self.navigation.addVideoContextMenuItems({ 'service': SERVICE, 'title': urllib.quote_plus(prop['title']), 'url': urllib.quote_plus(url), 'path': os.path.join(dstpath, SERVICE) })
liz.addContextMenuItems(cm, replaceItems=False)
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=folder,totalItems=listsize)
return ok
 
def listsCategories(self):
if quality_manual == 'true':
ptv.setSetting('tvn_quality_temp', '')
145,12 → 188,8
groupName = 'categories'
urlQuery = '&m=' + method
 
 
if dbg == 'true':
log.info('TVN - listCategories() -> link: ' + self.contentHost + self.startUrl + urlQuery)
#req = urllib2.Request(self.contentHost+self.startUrl + urlQuery)
#req.add_header('User-Agent', self.contentUserAgent)
#response = ''
try:
#response = urllib2.urlopen(req)
response = self.common.getURLRequestData({ 'url': self.contentHost + self.startUrl + urlQuery, 'use_host': True, 'host': self.contentUserAgent, 'use_cookie': False, 'use_post': False, 'return_data': False })
169,7 → 208,6
listsize = len(categories)
 
 
seasons = xmlDoc.find(method + "/seasons")
showSeasons = False
if ET.iselement(seasons) and self.season == 0:
238,11 → 276,19
}
if self.watched(videoUrl):
prop['overlay'] = 7
if dbg == 'true':
log.info('TVN Player - listCategories() -> videoUrl: ' + videoUrl)
if proxy == 'true':
hasVideo = False
if dbg == 'true':
log.info('TVN - listCategories()[proxy] -> prop[]: ' + str(prop))
self.addVideoProxyLink(prop,videoUrl,iconUrl,listsize)
else:
hasVideo = True
self.addVideoLink(prop,videoUrl,iconUrl,listsize)
 
self.addVideoLink(prop,videoUrl,iconUrl,listsize)
hasVideo = True
 
 
if showSeasons:
for season in seasons:
iconUrl = self.getIconUrl(season)
272,6 → 318,7
self.service = self.parser.getParam(params, "service")
self.path = self.parser.getParam(params, "path")
self.vtitle = self.parser.getParam(params, "vtitle")
self.type = self.parser.getParam(params, "type")
if not self.page:
self.page = 0
288,9 → 335,20
 
if self.name == 'None':
self.listsCategories()
elif self.name != 'None' and self.category != '':
self.listsCategories()
elif self.name != 'None' and self.category != '' and self.type != 'playSelectedMovie':
self.listsCategories()
elif self.name != 'None' and self.type == 'playSelectedMovie':
proxyVideoUrl = base64.b64decode(proxy_url) + urllib.quote_plus(self.url)
try:
linkVideoUrl = self.common.getURLRequestData({ 'url': proxyVideoUrl, 'use_host': True, 'host': self.contentUserAgent, 'use_cookie': False, 'use_post': False, 'return_data': True })
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
if dbg == 'true':
log.info('TVN - handleService -> linkVideoUrl: ' + linkVideoUrl)
self.LOAD_AND_PLAY_VIDEO(linkVideoUrl, self.name)
if self.service == SERVICE and self.action == 'download' and self.url != '':
self.common.checkDir(os.path.join(dstpath, SERVICE))
if dbg == 'true':
306,12 → 364,10
method = 'getItem'
groupName = 'item'
urlQuery = '&type=%s&id=%s&limit=%s&page=1&sort=newest&m=%s' % (category, id, str(PAGE_LIMIT), method)
#urlQuery = urlQuery + '&deviceScreenHeight=1080&deviceScreenWidth=1920'
proxy_url = 'aHR0cDovL3NkLXhibWMub3JnL3N1cHBvcnQvdHZucHJveHkucGhwP3U9'
url = self.contentHost + self.startUrl + urlQuery
if proxy == 'true':
url = base64.b64decode(proxy_url) + urllib.quote_plus(url)
url = base64.b64decode(proxy_cache) + urllib.quote_plus(url)
if dbg == 'true':
log.info('TVN - getVideoUrl() -> link: ' + url)
321,7 → 377,6
traceback.print_exc()
self.exception.getError(str(exception))
exit()
#response = urllib2.urlopen(self.contentHost + self.startUrl + urlQuery)
xmlDoc = ET.parse(response).getroot()
runtime = xmlDoc.find(method + "/" + groupName + "/run_time")
videoTime = 0
358,15 → 413,15
videoUrl = self.generateToken(self.getUrlFromTab(rankSorted, quality_temp))
elif platform == 'Samsung TV':
tempVideoUrl = self.getUrlFromTab(rankSorted, quality_temp)
print "KUPS: "
if proxy == 'true':
tempVideoUrl = base64.b64decode(proxy_url) + urllib.quote_plus(tempVideoUrl)
try:
videoUrl = self.common.getURLRequestData({ 'url': tempVideoUrl, 'use_host': True, 'host': self.contentUserAgent, 'use_cookie': False, 'use_post': False, 'return_data': True })
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
videoUrl = tempVideoUrl
else:
try:
videoUrl = self.common.getURLRequestData({ 'url': tempVideoUrl, 'use_host': True, 'host': self.contentUserAgent, 'use_cookie': False, 'use_post': False, 'return_data': True })
except Exception, exception:
traceback.print_exc()
self.exception.getError(str(exception))
exit()
if dbg == 'true':
log.info('TVN - getVideoUrl() -> temporary videoUrl: ' + tempVideoUrl)
log.info('TVN - getVideoUrl() -> videoUrl: ' + videoUrl)
467,4 → 522,19
break
return out
 
def LOAD_AND_PLAY_VIDEO(self, videoUrl, title):
ok=True
if videoUrl == '':
d = xbmcgui.Dialog()
d.ok('Nie znaleziono streamingu.', 'Może to chwilowa awaria.', 'Spróbuj ponownie za jakiś czas')
return False
thumbnail = xbmc.getInfoImage("ListItem.Thumb")
liz=xbmcgui.ListItem(title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail)
liz.setInfo( type="Video", infoLabels={ "Title": title } )
try:
xbmcPlayer = xbmc.Player()
xbmcPlayer.play(videoUrl, liz)
except:
d = xbmcgui.Dialog()
d.ok('Błąd przy przetwarzaniu, lub wyczerpany limit czasowy oglądania.', 'Zarejestruj się i opłać abonament.', 'Aby oglądać za darmo spróbuj ponownie za jakiś czas')
return ok
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/kinopecetowiec.py
3,6 → 3,7
import os, time, base64, logging, calendar
import urllib, urllib2, re, sys, math
import xbmcgui, xbmc, xbmcaddon, xbmcplugin
import traceback
 
scriptID = 'plugin.video.polishtv.live'
scriptname = "Polish Live TV"
218,7 → 219,7
 
def getHostTable(self,url):
valTab = []
#link = self.cm.requestData(url)
videoID = ''
query_data = { 'url': url, 'use_host': True, 'host': HOST, 'use_cookie': False, 'use_post': False, 'return_data': True }
try:
link = self.cm.getURLRequestData(query_data)
238,10 → 239,11
d = xbmcgui.Dialog()
item = d.select("Wybór filmu", self.getItemTitles(valTab))
if item != '':
print str(item)
if item != -1:
videoID = str(valTab[item][1])
log.info('mID: ' + videoID)
return videoID
return videoID
 
 
def addDir(self, service, name, category, title, plot, page, iconimage, folder = True, isPlayable = True):
338,7 → 340,6
#Historia Wyszukiwania
elif category == self.setTable()[11]:
t = self.history.loadHistoryFile(SERVICE)
# print str(t)
self.listsHistory(t)
if category == 'history' and name != 'playSelectedMovie':
self.getSearchTable(self.searchTab(SURL, name))
352,12 → 353,15
if name == 'playSelectedMovie':
url = self.getHostTable(page)
linkVideo = self.up.getVideoLink(url)
if linkVideo != False:
self.LOAD_AND_PLAY_VIDEO(linkVideo, title)
else:
d = xbmcgui.Dialog()
d.ok('Brak linku', SERVICE + ' - przepraszamy, chwilowa awaria.', 'Zapraszamy w innym terminie.')
if url !='':
linkVideo = self.up.getVideoLink(url)
if linkVideo != False:
self.LOAD_AND_PLAY_VIDEO(linkVideo, title)
else:
d = xbmcgui.Dialog()
d.ok('Brak linku', SERVICE + ' - przepraszamy, chwilowa awaria.', 'Zapraszamy w innym terminie.')
else:
exit()
if service == SERVICE and action == 'download' and link != '':
self.dir.checkDir(os.path.join(dstpath, SERVICE))
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/tvp.py
13,8 → 13,8
TVP_MAIN_MENU_TABLE = [
"Przegapiłes|xml|http://www.tvp.pl/pub/stat/missed?src_id=1885&object_id=-1&offset=-1&dayoffset=-1&rec_count=" + str(PAGE_MOVIES),
"Najcześciej oglądane|xml|http://www.tvp.pl/pub/stat/videolisting?src_id=1885&object_id=929547&object_type=video&child_mode=SIMPLE&rec_count=" + str(PAGE_MOVIES),
"Teleexpress|xml|http://www.tvp.pl/pub/stat/videolisting?object_id=1488&with_subdirs=true&sort_desc=true&sort_by=RELEASE_DATE&child_mode=SIMPLE&rec_count=" + str(PAGE_MOVIES),
"Wiadomości|xml|http://www.tvp.pl/pub/stat/videolisting?object_id=1494&with_subdirs=true&sort_desc=true&sort_by=RELEASE_DATE&child_mode=SIMPLE&rec_count=" + str(PAGE_MOVIES),
"Teleexpress|xml|http://www.tvp.pl/pub/stat/videolisting?object_id=8811603&with_subdirs=true&sort_desc=true&sort_by=RELEASE_DATE&child_mode=SIMPLE&rec_count=" + str(PAGE_MOVIES),
"Wiadomości|xml|http://www.tvp.pl/pub/stat/videolisting?object_id=7405772&with_subdirs=true&sort_desc=true&sort_by=RELEASE_DATE&child_mode=SIMPLE&rec_count=" + str(PAGE_MOVIES),
"Panorama|xml|http://www.tvp.pl/pub/stat/videolisting?object_id=5513139&with_subdirs=true&sort_desc=true&sort_by=RELEASE_DATE&child_mode=SIMPLE&rec_count=" + str(PAGE_MOVIES),
"Makłowicz w podróży|xml|http://www.tvp.pl/pub/stat/videolisting?object_id=1364&with_subdirs=true&sort_desc=true&sort_by=RELEASE_DATE&child_mode=SIMPLE&rec_count=" + str(PAGE_MOVIES),
"Kraków - najczęściej oglądane|xml|http://www.tvp.pl/pub/stat/videolisting?src_id=1885&object_id=929711&object_type=video&child_mode=SIMPLE&sort_by=RELEASE_DATE&sort_desc=true&rec_count=" + str(PAGE_MOVIES),
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/anyfiles.py
3,6 → 3,7
import time, base64, logging, calendar
import urllib, urllib2, re, sys, math
import xbmcgui, xbmc, xbmcaddon, xbmcplugin
import simplejson
 
scriptID = 'plugin.video.polishtv.live'
scriptname = "Polish Live TV"
253,8 → 254,9
#odtwarzaj video
if name == 'playSelectedMovie':
videoUrl = self.anyfiles.getVideoUrl(url)
log.info("videoUrl: "+ videoUrl)
self.LOAD_AND_PLAY_VIDEO(videoUrl)
if videoUrl != False:
log.info("videoUrl: "+ videoUrl)
self.LOAD_AND_PLAY_VIDEO(videoUrl)
class serviceParser:
264,7 → 266,6
def getVideoUrl(self,url):
query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
data = self.cm.getURLRequestData(query_data)
 
#var flashvars = {"uid":"player-vid-8552","m":"video","st":"c:1LdwWeVs3kVhWex2PysGP45Ld4abN7s0v4wV"};
match = re.search("""var flashvars = {.+?"st":"(.+?)"}""",data)
if match:
274,20 → 275,17
query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
data = self.cm.getURLRequestData(query_data)
data = xppod.Decode(data).encode('utf-8').strip()
#{"file":"http://50.7.221.26/folder/776713c560821c666da18d8550594050_8552.mp4 or http://50.7.220.66/folder/776713c560821c666da18d8550594050_8552.mp4","ytube":"0",
match = re.search("""file":"(.+?)","ytube":"(.+?)",""",data)
if match:
if 'or' in match.group(1):
links = match.group(1).split(" or ")
return links[1]
else:
if match.group(2)=='1':
p = match.group(1).split("/")
if 'watch' in p[3]: videoid = p[3][8:19]
else: videoid = p[3]
plugin = 'plugin://plugin.video.youtube/?action=play_video&videoid=' + videoid
return plugin
else: return match.group(1)
else: return False
else: return False
#json cleanup
while data[-2:] != '"}': data = data[:-1]
result = simplejson.loads(data)
if (result['ytube']=='0'):
vUrl = result['file'].split("or")
return vUrl[0]
else:
p = result['file'].split("/")
if 'watch' in p[3]: videoid = p[3][8:19]
else: videoid = p[3]
plugin = 'plugin://plugin.video.youtube/?action=play_video&videoid=' + videoid
return plugin
return False
 
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/bestplayer.py
3,6 → 3,7
import os, time, base64, logging, calendar
import urllib, urllib2, re, sys, math
import xbmcgui, xbmc, xbmcaddon, xbmcplugin
import traceback
 
scriptID = 'plugin.video.polishtv.live'
scriptname = "Polish Live TV"
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/tvpvod.py
9,13 → 9,14
#urlCategoryList = 'https://itvp.one-2-one.pl/api/mp4.php'
urlCategoryList = 'http://www.api.v3.tvp.pl/shared/listing.php?dump=json&direct=true&count=100&parent_id=1785454'
 
urlRecommended = 'http://www.api.v3.tvp.pl/shared/listing.php?parent_id=%d&direct=false&count=%d&page=%d&filter=android_enabled=true&dump=json'
urlRecommended = 'http://www.api.v3.tvp.pl/shared/listing.php?parent_id=%d&direct=false&count=%d&page=%d&filter=android_enabled=true&dump=json&order=release_date_long,-1'
urlEpisodesList = 'http://www.api.v3.tvp.pl/shared/listing.php?parent_id=%d&direct=false&count=%d&page=%d&filter=android_enabled=true&dump=json&type=video&order=release_date_long,-1'
urlVideo = 'http://www.tvp.pl/pub/stat/videofileinfo?video_id=%d&mime_type=video/mp4'
urlImage = 'http://s.v3.tvp.pl/images/%s/%s/%s/uid_%s_width_%d_gs_0.jpg'
 
USER_AGENT = 'Apache-HttpClient/UNAVAILABLE (java 1.4)'
VOD_ID = 6442748
VOD_LIST_ID = 2919829
 
PAGE_MOVIES = 15
 
97,6 → 98,8
for i in range(len(result.get('items'))):
if result.get('items')[i].get('types')[1] == 'directory_series':
ID = result.get('items')[i].get('_id')
if ID == 1649941:
ID = VOD_LIST_ID
title = result.get('items')[i].get('title').title().encode('utf-8')
self.addDir(title,"list_category",ID,"")
 
/trunk/xbmc-addons/src/plugin.video.polishtv.live/hosts/serialnet.py
24,10 → 24,9
class SerialNet:
def __init__(self):
log.info('Loading ' + SERVICE)
#self.settings = settings.TVSettings()
self.exception = Errors.Exception()
self.parser = Parser.Parser()
self.cm = pCommon.common()
self.common = pCommon.common()
self.navigation = Navigation.VideoNav()
40,8 → 39,9
def getSerialsTable(self, letter):
strTab = []
outTab = []
link = self.cm.requestData(mainUrl)
match = re.compile('<li><a href="http://serialnet.pl/serial/(.+?)">(.+?)<').findall(link)
query_data = {'url': mainUrl, 'use_host': True, 'host': self.common.getRandomHost(), 'use_cookie': False, 'use_post': False, 'return_data': True}
data = self.common.getURLRequestData(query_data)
match = re.compile('<li><a href="http://serialnet.pl/serial/(.+?)">(.+?)<').findall(data)
if len(match) > 0:
addItem = False
for i in range(len(match)):
57,7 → 57,7
return outTab
 
def getInfo(self,data):
def getInfo(self, data):
outTab = []
match = re.compile('<meta property="og:image" content="(.+?)"/>').findall(data)
if len(match) > 0: imageLink = match[0]
79,10 → 79,11
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
def showSeason(self, url):
link = self.cm.requestData(url)
info = self.getInfo(link)
match = re.compile('<div style=".+?"><h3>(.+?)</h3></div>').findall(link)
def showSeason(self, url):
query_data = {'url': url, 'use_host': True, 'host': self.common.getRandomHost(), 'use_cookie': False, 'use_post': False, 'return_data': True}
data = self.common.getURLRequestData(query_data)
info = self.getInfo(data)
match = re.compile('<div style=".+?"><h3>(.+?)</h3></div>').findall(data)
if len(match) > 0:
for i in range(len(match)):
if 'Sezon' in match[i]:
94,12 → 95,13
 
 
def showSerialParts(self, url, title):
link = self.cm.requestData(url)
info = self.getInfo(link)
query_data = {'url': url, 'use_host': True, 'host': self.common.getRandomHost(), 'use_cookie': False, 'use_post': False, 'return_data': True}
data = self.common.getURLRequestData(query_data)
info = self.getInfo(data)
tTab = title.split(' ')
num = tTab[1]
s = "sezon-" + str(num)
match = re.compile('href="(.+?)' + s + '(.+?)"><b>Odcinek:(.+?)</b>').findall(link)
match = re.compile('href="(.+?)' + s + '(.+?)"><b>Odcinek:(.+?)</b>').findall(data)
if len(match) > 0:
for i in range(len(match)):
oTab = match[i][2].split(':')
115,16 → 117,16
 
def getVideoUrl(self, url):
print str(servset)
#print str(servset)
videoUrl = ''
try:
link = self.cm.requestData(url)
query_data = {'url': url, 'use_host': True, 'host': self.common.getRandomHost(), 'use_cookie': False, 'use_post': False, 'return_data': True}
data = self.common.getURLRequestData(query_data)
except Exception, exception:
self.exception.getError(str(exception))
exit()
#<iframe id="framep" class="radi" src="http://serialnet.pl/play.php?t=1-18"
match = re.compile('<iframe id="framep" class="radi" src="(.+?)"').findall(link)
match = re.compile('<iframe id="framep" class="radi" src="(.+?)"').findall(data)
if len(match) > 0:
nUrl = match[0]
if servset[SERVICE + '_wersja'] == 'false':
133,14 → 135,21
if item == -1: return videoUrl
elif item == 0: nUrl = match[0] + '&wersja=napisy'
log.info("wersja: " + nUrl)
link = self.cm.requestData(nUrl)
print "link: " + link
query_data = {'url': nUrl, 'use_host': True, 'host': self.common.getRandomHost(), 'use_cookie': False, 'use_post': False, 'return_data': True}
data = self.common.getURLRequestData(query_data)
#link = self.cm.requestData(nUrl)
#print "link: " + link
match = re.compile('eval\((.+?),0,{}\)\)',re.DOTALL).findall(link)
match = re.compile('url: escape\((.+?)\)',re.DOTALL).findall(data)
if len(match) > 0:
js = 'eval(' + match[0] + ',0,{}))'
videoUrl = self.decodeJS(js)
log.info("decoded link: " + videoUrl)
if 'http' in match[0]:
videoUrl = match[0][1:-1]
else:
match2 = re.compile('eval\((.+?),0,{}\)\)',re.DOTALL).findall(data)
if len(match2) > 0:
js = 'eval(' + match2[0] + ',0,{}))'
videoUrl = self.decodeJS(js)
log.info("decoded link: " + videoUrl)
return videoUrl
 
187,7 → 196,7
#main menu
if name == None:
self.listsABCMenu(self.cm.makeABCList())
self.listsABCMenu(self.common.makeABCList())
#A-Z
if name == 'abc-menu':
self.showSerialTitles(category)
/trunk/xbmc-addons/src/plugin.video.polishtv.live/addon.xml
1,7 → 1,7
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.polishtv.live"
name="Telewizja Polska (kanały, VOD, filmy, seriale)"
version="0.2.0"
version="0.3.0"
provider-name="SD Team">
<requires>
<import addon="xbmc.python" version="1.0"/>
/trunk/xbmc-addons/src/plugin.video.polishtv.live/changelog.txt
1,11 → 1,19
Version 0.2.0
version 0.3.0
- dodanie serwisu bestplayer.tv,
- dodanie serwisu maxvideo.pl,
- dodanie serwisu kabarety.odpoczywam.net,
- dodanie mozliwosci sciagania video z wybranych serwisow,
- wylacznie EkinoTV z obslugi,
- nowe logo i ikony do serwisow
 
version 0.2.0
- dodany serwis kino.pecetowiec.pl
- naprawiona obsluga Wlacz TV,
- naprawiona oblsuga SerialNet.
- naprawiona obsluga SerialNet.
 
Version 0.1.0
version 0.1.0
 
Version 0.0.4
version 0.0.4
- added iplex (need patch ffmpeg)
- added tvp info
- added tvn player (need install PyCrypto)
14,7 → 22,7
- fixed iitv
- disabled ipla
 
Version 0.0.1
version 0.0.1
Initial release
 
 
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/weebtv.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/stations.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/tvn.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/kinopecetowiec.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/tvp.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/anyfiles.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/bestplayer.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/ekinotv.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/iplex.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/tvpvod.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/ipla.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/serialnet.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/iitvinfo.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/images/wlacztv.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/trunk/xbmc-addons/src/plugin.video.polishtv.live/resources/language/English/strings.xml
52,7 → 52,7
<string id="55502">Order by</string>
<string id="55503">Username:</string>
<string id="55504">Password:</string>
<string id="55505">Global settigs</string>
<string id="55505">Login settings</string>
<string id="55506">Download settings</string>
<string id="55507">Path to download</string>
105,7 → 105,7
<!-- Maxvideo settings -->
<string id="56000">Maxvideo</string>
<string id="56001">Global settigs</string>
<string id="56001">Login settings</string>
<string id="56002">Username:</string>
<string id="56003">Password:</string>
<string id="56004">Show Notifications</string>
/trunk/xbmc-addons/src/plugin.video.polishtv.live/resources/lib/pCommon.py
42,7 → 42,7
import re, os, sys, cookielib, random
import urllib, urllib2, re, sys, math
import elementtree.ElementTree as ET
import xbmcaddon
import xbmcaddon, xbmc
import simplejson as json
 
import pLog
72,7 → 72,7
}
 
HOST = 'Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0'
HISTORYFILE = ptv.getAddonInfo('path') + os.path.sep + "searchhistory.xml"
HISTORYFILE = xbmc.translatePath(ptv.getAddonInfo('profile') + "history.xml")
 
cj = cookielib.LWPCookieJar()
 
/trunk/xbmc-addons/src/plugin.video.polishtv.live/resources/lib/Errors.py
22,6 → 22,7
[ 'Expecting property name:', t(55900).encode('utf-8'), t(55906).encode('utf-8') ],
[ 'urlopen error timed out', t(55900).encode('utf-8'), t(55907).encode('utf-8') ],
[ '[Errno 2]', t(55900).encode('utf-8'), t(55906).encode('utf-8') ],
[ '[Errno 10035]', t(55900).encode('utf-8'), t(55906).encode('utf-8') ],
]
 
class Exception:
/trunk/xbmc-addons/src/plugin.video.polishtv.live/resources/lib/urlparser.py
209,8 → 209,11
query_data = { 'url': url, 'use_host': True, 'host': HOST, 'use_cookie': False, 'use_post': False, 'return_data': True }
link = self.cm.getURLRequestData(query_data)
if DEBUG: log.info(link)
(v_ext, v_file, v_dir, v_port, v_host) = re.search("\|\|.*SWFObject",link).group().split('|')[40:45]
url = "http://%s.odsiebie.pl:%s/d/%s/%s.%s" % (v_host, v_port, v_dir, v_file, v_ext);
try:
(v_ext, v_file, v_dir, v_port, v_host) = re.search("\|\|.*SWFObject",link).group().split('|')[40:45]
url = "http://%s.odsiebie.pl:%s/d/%s/%s.%s" % (v_host, v_port, v_dir, v_file, v_ext);
except:
url = False
return url
 
 
244,18 → 247,6
return False
 
 
def parserNOVAMOV(self,url):
query_data = { 'url': url, 'use_host': True, 'host': HOST, 'use_cookie': False, 'use_post': False, 'return_data': True }
link = self.cm.getURLRequestData(query_data)
if DEBUG: log.info(link)
match = re.search("""file: ['"](.+?)['"],""",link)
if match:
if DEBUG: log.info("final link: " + match.group(1))
return match.group(1)
else:
return False
 
 
def parserDWN(self,url):
query_data = { 'url': url, 'use_host': True, 'host': HOST, 'use_cookie': False, 'use_post': False, 'return_data': True }
link = self.cm.getURLRequestData(query_data)
/trunk/xbmc-addons/src/plugin.video.polishtv.live/default.py
18,109 → 18,125
import pLog, settings, Parser
import weebtv, stations, tvp, tvn, iplex, tvpvod, wlacztv
import maxvideo, serialnet, anyfiles
import ekinotv, iitvinfo, bestplayer, kinopecetowiec
import ekinotv, iitvinfo, bestplayer, kinopecetowiec, kabarety
#import ipla
 
log = pLog.pLog()
 
 
TV_ONLINE_TABLE = { 100: "Weeb TV [wyświetl kanały]",
101: "Włącz TV [wyświetl kanały]",
102: "Stacje TV [strumienie]",
TV_ONLINE_TABLE = {
100 : ["Weeb TV [wyświetl kanały]", 'weebtv'],
101 : ["Włącz TV [wyświetl kanały]", 'wlacztv'],
102 : ["Stacje TV [strumienie]", 'stations'],
}
 
 
VOD_ONLINE_TABLE = {
200: "AnyFiles [różne filmy]",
#201: "Ekino TV [filmy, seriale]",
202: "iiTV info [seriale]",
203: "IPLA",
204: "IPLEX",
205: "TVN Player",
206: "TVP [info]",
207: "TVP VOD",
208: "SerialNet [seriale]",
209: "BestPlayer [filmy]",
210: "Kino Pecetowiec [filmy]",
211: "Maxvideo [różne filmy]",
200: ["AnyFiles [różne filmy]", 'anyfiles'],
#201: ["Ekino TV [filmy, seriale]", 'ekinotv'],
202: ["iiTV info [seriale]", 'iitvinfo'],
#203: ["IPLA", 'ipla'],
204: ["IPLEX", 'iplex'],
205: ["TVN Player", 'tvn'],
206: ["TVP [info]", 'tvp'],
207: ["TVP VOD", 'tvpvod'],
208: ["SerialNet [seriale]", 'serialnet'],
209: ["BestPlayer [filmy]", 'bestplayer'],
210: ["Kino Pecetowiec [filmy]", 'kinopecetowiec'],
211: ["Maxvideo [różne filmy]", 'maxvideo'],
}
 
REC_DOWN_TABLE = { 300: "Weeb TV",
301: "Włącz TV",
ROZRYWKA_TABLE = {
400: ["Kabarety", ''],
}
 
REC_DOWN_TABLE = {
300: ["Weeb TV", 'weebtv'],
301: ["Włącz TV", 'wlacztv'],
}
 
 
class PolishLiveTV:
def __init__(self):
log.info('Starting Polish Live TV')
self.settings = settings.TVSettings()
self.parser = Parser.Parser()
 
 
def showListOptions(self):
params = self.parser.getParams()
mode = self.parser.getIntParam(params, "mode")
name = self.parser.getParam(params, "name")
service = self.parser.getParam(params, 'service')
if mode == None and name == None and service == None:
log.info('Wyświetlam kategorie')
self.CATEGORIES()
elif mode == 1:
self.LIST(TV_ONLINE_TABLE)
elif mode == 100 or service == 'weebtv':
elif mode == 100 or service == TV_ONLINE_TABLE[100][1]:
tv = weebtv.WeebTV()
tv.handleService()
elif mode == 101 or service == 'wlacztv':
elif mode == 101 or service == TV_ONLINE_TABLE[101][1]:
tv = wlacztv.WlaczTV()
tv.handleService()
elif mode == 102 or service == 'stations':
elif mode == 102 or service == TV_ONLINE_TABLE[102][1]:
tv = stations.StreamStations()
tv.handleService()
elif mode == 2:
#log.info('Wejście do TV internetowej')
elif mode == 2:
self.LIST(VOD_ONLINE_TABLE)
elif mode == 200 or service == 'anyfiles':
elif mode == 200 or service == VOD_ONLINE_TABLE[200][1]:
vod = anyfiles.AnyFiles()
vod.handleService()
elif mode == 201 or service == 'ekinotv':
vod = ekinotv.EkinoTV()
vod.handleService()
elif mode == 202 or service == 'iitvinfo':
# elif mode == 201 or service == VOD_ONLINE_TABLE[201][1]:
# vod = ekinotv.EkinoTV()
# vod.handleService()
elif mode == 202 or service == VOD_ONLINE_TABLE[202][1]:
vod = iitvinfo.iiTVInfo()
vod.handleService()
elif mode == 203 or service == 'ipla':
vod = ipla.IPLA()
vod.handleService()
elif mode == 204 or service == 'iplex':
# elif mode == 203 or service == VOD_ONLINE_TABLE[203][1]:
# vod = ipla.IPLA()
# vod.handleService()
elif mode == 204 or service == VOD_ONLINE_TABLE[204][1]:
vod = iplex.IPLEX()
vod.handleService()
elif mode == 205 or service == 'tvn':
elif mode == 205 or service == VOD_ONLINE_TABLE[205][1]:
vod = tvn.tvn()
vod.handleService()
elif mode == 206 or service == 'tvp':
elif mode == 206 or service == VOD_ONLINE_TABLE[206][1]:
vod = tvp.tvp()
vod.handleService()
elif mode == 207 or service == 'tvpvod':
elif mode == 207 or service == VOD_ONLINE_TABLE[207][1]:
vod = tvpvod.tvpvod()
vod.handleService()
elif mode == 208 or service == 'serialnet':
elif mode == 208 or service == VOD_ONLINE_TABLE[208][1]:
vod = serialnet.SerialNet()
vod.handleService()
elif mode == 209 or service == 'bestplayer':
elif mode == 209 or service == VOD_ONLINE_TABLE[209][1]:
vod = bestplayer.BestPlayer()
vod.handleService()
elif mode == 210 or service == 'kinopecetowiec':
elif mode == 210 or service == VOD_ONLINE_TABLE[210][1]:
vod = kinopecetowiec.KinoPecetowiec()
vod.handleService()
elif mode == 211 or service == 'maxvideo':
vod = maxvideo.Maxvideo()
vod.handleService()
vod.handleService()
elif mode == 4:
self.LIST(ROZRYWKA_TABLE)
elif mode == 400 or service == 'kabarety':
vod = kabarety.Kabarety()
vod.handleService()
elif mode == 300:
vod = weebtv.WeebTV()
vod.handleRecords()
elif mode == 301:
vod = wlacztv.WlaczTV()
vod.handleRecords()
elif mode == 19:
elif mode == 19:
log.info('Zarządzanie nagrywaniem/ściąganiem')
self.LIST(REC_DOWN_TABLE)
elif mode == 20:
134,7 → 150,6
d = xbmcgui.Dialog()
choice = d.select(title, table)
for i in range(len(table)):
#log.info(table[i])
if choice == i:
value = table[i]
return value
147,33 → 162,38
 
 
def CATEGORIES(self):
self.addDir("Telewizja", 1, False, False)
self.addDir("Filmy, Seriale", 2, False, False)
self.addDir('Zarządzanie nagrywaniem/ściąganiem', 19, False, False)
self.addDir('Ustawienia', 20, True, False)
 
self.addDir("Telewizja", 1, False, False, False)
self.addDir("Filmy, Seriale", 2, False, False, False)
self.addDir("Rozrywka", 4, False, False, False)
self.addDir('Zarządzanie nagrywaniem/ściąganiem', 19, False, False, False)
self.addDir('Ustawienia', 20, True, False, False)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
 
def LIST(self, table = {}):
valTab = []
strTab = []
for num, val in table.items():
#self.addDir(val, num, False, False)
for num, tab in table.items():
strTab.append(num)
strTab.append(val)
strTab.append(tab[0])
strTab.append(tab[1])
valTab.append(strTab)
strTab = []
valTab.sort(key = lambda x: x[1])
valTab.sort(key = lambda x: x[1])
for i in range(len(valTab)):
self.addDir(valTab[i][1], valTab[i][0], False, False)
if valTab[i][2] == '': icon = False
else: icon = valTab[i][2]
self.addDir(valTab[i][1], valTab[i][0], False, icon, False)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
 
def addDir(self, name, mode, autoplay, isPlayable = True):
def addDir(self, name, mode, autoplay, icon, isPlayable = True):
u=sys.argv[0] + "?mode=" + str(mode)
icon = "DefaultVideoPlaylists.png"
if autoplay:
icon= "DefaultVideo.png"
if icon != False:
icon = os.path.join(ptv.getAddonInfo('path'), "images/") + icon + '.png'
else:
icon = "DefaultVideoPlaylists.png"
liz=xbmcgui.ListItem(name, iconImage=icon, thumbnailImage='')
if autoplay and isPlayable:
liz.setProperty("IsPlayable", "true")
/trunk/xbmc-addons/src/plugin.video.polishtv.live/icon.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/xbmc-addons/src/addons.xml.md5
1,0 → 0,0
1c750c22502457cf6a2a024dc5fa9db3
c0ca9c41187f58e95ab04faf9ebbf789
/wiki/CustomUpdate.wiki
5,15 → 5,15
 
*Auto Update* to feature w XBMC, ktory automatycznie uaktualnie pluginy na podstawie ich wersji. Sprawdzana jest wersja zainstalowanego pluginu i porownywana z ta w repozytorium. Jezeli wersje sie roznia, to nowa wtyczka jest sciagana, a obecna zostaje *NADPISANA*.
 
*IPLA* to jeden z serwisow, ktory bylo obslugiwany przez wtyczke *plugin.video.polishtv.live* od prawie samego poczatku. To wlasnie dzieki tej wtyczce jako piersi moglismy sie cieszyc IPLA pod XBMC. Ze wzgledow "pseudo-prawnych", bylismy zmuszeni usunac wtyczke z projektu (usnac plik ipla.py i wykomentowac kilka linijek w default.py). Jak kazdy dobrze wie, w internecie nic nie ginie, tak i plik ipla.py :) Plik ten zostal przeniesiony na kilka roznych serwerow, a wielu z nas wciaz ma jego lokalne kopie. Wystarczylo tylko odkomentowac kilka linijek w default.py i wciaz sie cieszyc IPLA.
*IPLA* to jeden z serwisow, ktory bylo obslugiwany przez wtyczke *plugin.video.polishtv.live* od prawie samego poczatku. To wlasnie dzieki tej wtyczce jako pierwsi moglismy sie cieszyc IPLA pod XBMC. Ze wzgledow "pseudo-prawnych", bylismy zmuszeni usunac serwis z projektu (usnac plik ipla.py i wykomentowac kilka linijek w default.py). Jak kazdy dobrze wie, w internecie nic nie ginie, tak i plik ipla.py :) Plik ten zostal przeniesiony na kilka roznych serwerow, a wielu z nas wciaz ma jego lokalne kopie. Wystarczylo tylko odkomentowac kilka linijek w `default.py` i wciaz sie cieszyc IPLA.
 
==Auto Update i IPLA - sprawy sie komplikuja==
Jak juz wiemy Auto Update nadpisuje istniejaca wtyczke, wiec gdy wersja sie zmienia, nasz zmodyfikowany default.py (ten z wlaczona IPLA) zostaje nadpisany i musimy znow recznie modyfikowac default.py by ja wlaczyc. A co jesli mamy dolozone dodatkowe stacje w pliku stations.py? One tez bede nadpisany przez Auto Update. Jesli wtyczka jest uaktualniana kilka razy w tygodniu, to takie modyfikacje sa delikatnie uciazliwe. Wlasnie z tego powodu wersja wtyczki pozostala nie zmianiona przez ostatnie kilka miesiecy.
Jak juz wiemy Auto Update nadpisuje istniejaca wtyczke, wiec gdy wersja sie zmienia, nasz zmodyfikowany `default.py` (ten z wlaczona IPLA) zostaje nadpisany i musimy znow recznie modyfikowac `default.py` by ja wlaczyc. A co jesli mamy dolozone dodatkowe stacje w pliku `stations.py`? One tez bede nadpisany przez Auto Update. Jesli wtyczka jest uaktualniana kilka razy w tygodniu, to takie modyfikacje sa delikatnie uciazliwe. Wlasnie z tego powodu wersja wtyczki pozostala nie zmianiona przez ostatnie kilka miesiecy.
 
==Custom Update - Rozwiazanie problemu==
Skoro Auto Update nadpisuje nasze pliki to, my musimy zrobic dokladnie to samo, nadpisac uaktualnione pliki naszymi, "zmodyfikowanymi", ale to musi byc zrobione automatycznie. Tak zrodzil sie feature *Custom Update*. Dzieki tej funkcji, mozemy w latwy sposob dodac/zmodyfikowac pliki pluginu.
 
W ponizszym WIKI postaram sie wytlumaczyc jak skonfigurowac *Custom Update* tak by moc ogladac IPLA i dodac zagraniczne kanaly do stations.py, w naszej ulubionej wtyczce *plugin.video.polishtv.live*.
W ponizszym WIKI postaram sie wytlumaczyc jak skonfigurowac *Custom Update* tak by moc ogladac IPLA ~~i dodac zagraniczne kanaly do stations.py,~~ w naszej ulubionej wtyczce *plugin.video.polishtv.live*.
 
= Szczegoly =
Zasada dzialania jest stosunkowo prosta. *Custom Update* uzywa pliku XML, w ktorym zdefiniowane sa lokacje: naszego zmodyfikowanego pliku _(source)_ jak i pliku ktory chcemy nadpisac _(destination)_.
29,7 → 29,7
* _(destination)_ ma byc skopiowany do `default.py`
 
 
Wiedzac gdzie znajduja sie nasze "zmodyfikowane" pliki, jak rowniez gdzie maja byc skopiowane, jestesmy gotowi do swtorzenia plik XML. Struktura jest bardzo porsta i wyglada nastepujaco:
Wiedzac gdzie znajduja sie nasze "zmodyfikowane" pliki, jak rowniez gdzie maja byc skopiowane, jestesmy gotowi do swtorzenia plik XML. Struktura jest bardzo prosta i wyglada nastepujaco:
{{{
<custom id="plugin.video.polishtv.live">`
<file>
42,7 → 42,7
</file>
</custom>
}}}
Tworzymy plik i zapisujemy go w jakiejs dogodnej lokacji, np. `c:\sd-xbmc\custom.xml`. Nastepnie wchodzimy do Ustawien wtyczki, w `Default/Custom Update` w polu `XML file path` wpisujemy lokalizacje naszego wcieszniej stworazonego pliku XML, czyli: `c:\sd-xbmc\custom.xml`
Naciskamy `OK` by zaakceptowac zaminy. Wchodzimy do Ustawien jeszcze raz i naciskamy `Run Custom Update` i to tyle.
Tworzymy plik i zapisujemy go w jakiejs dogodnej lokacji, np. `c:\sd-xbmc\custom.xml`. Nastepnie wchodzimy do Ustawien wtyczki, w `Default/Custom Update` w polu `XML file path` wpisujemy lokalizacje naszego wczesniej stworzonego pliku XML, czyli: `c:\sd-xbmc\custom.xml`
Naciskamy `OK` by zaakceptowac zmiany. Wchodzimy do `Ustawien` jeszcze raz i naciskamy `Run Custom Update` i to tyle.
 
A tak na koniec. Jesli nie chce wam sie bawic w towrzenie XML ~~czy modyfikacje `stations.py`~~, a zalezy wam by miec IPLE, to pod adresem [http://jatrn.com/xbmc/sd-xbmc/custom.xml] znajduje sie gotowy XML. Nalezy wpisac ten adres w Ustawieniach wtyczki, nacisnac `OK` i `Run Custom Update` i po sprawie. Powodzenia!
A tak na koniec. Jesli nie chce wam sie bawic w tworzenie XML ~~czy modyfikacje `stations.py`~~, a zalezy wam by miec IPLE, to pod adresem [http://jatrn.com/xbmc/sd-xbmc/custom.xml] znajduje sie gotowy XML. Nalezy wpisac ten adres w `Ustawieniach` wtyczki, nacisnac `OK` i `Run Custom Update` i po sprawie. Powodzenia!
/wiki/WeebTV_TVGuide.wiki
12,8 → 12,6
 
Klikamy ustaw, jako źródło ustawiamy XMLTV, następnie ściągamy na dysk którąś z wersji EPG:
 
||[http://db.tt/ABX5BUx3]|| wersja na 3 dni + opisy około 5Mb posegregowane tematycznie||
||[http://db.tt/HSRgGwSx]|| wersja na 3 dni + opisy około 5Mb posegregowane tematycznie dla strefy czasowej UTC||
||[http://jatrn.com/xbmc/epg_weebtv.xml]|| wersja na 48 godzin dla weeb.tv||
||[http://jatrn.com/xbmc/epg_weebtv_CST.xml]|| wersja na 48 godzin dla weeb.tv dla strefy czasowej CST||
||[http://jatrn.com/xbmc/epg_weebtv_EST.xml]|| wersja na 48 godzin dla weeb.tv dla strefy czasowej EST||
/wiki/FAQ.wiki
New file
0,0 → 1,22
#summary najczesciej zadawane pytania
 
=== _Wtyczka wyswietla: Error script failed_ ===
Zapostuj problem, podaj swoja dystrybucje, podaj krok po kroku w jaki sposob blad jest generowany i najwazniejsze, zalacz {{{xbmc.log}}}
 
=== _Gdzie znajduje sie xbmc.log?_ ===
Wszystkie informacje na temat *xbmc.log* znajduja sie w [XBMC_debug WIKI]
 
=== _MacOSX: Error script failed_ ===
W logach pojawia sie: {{{ImportError: dynamic module does not define init function (initParser)}}}
 
Skopiuj:
{{{
/Users/xxx/Library/Application Support/XBMC/addons/plugin.video.polishtv.live/resources/lib/Parser.py
}}}
do
{{{
/Users/xxx/Library/Application Support/XBMC/addons/plugin.video.polishtv.live/Parser.py
}}}
 
=== _Windows: Error script failed_ ===
Nazwa uzytkownika systemu Windows nie moze zawierac polskich znakow.