The branch, dharma has been updated
via 6a4741b07c332ba564bcb6b407ec836fab7c93c9 (commit)
from 4bce59904cfaf6226197249c463f3986996001ad (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=6a4741b07c332ba564bcb6b407ec836fab7c93c9
commit 6a4741b07c332ba564bcb6b407ec836fab7c93c9
Author: spiff <[email protected]>
Date: Tue Feb 21 20:18:45 2012 +0100
[plugin.video.brt] updated to version 1.2.5
diff --git a/.gitignore b/.gitignore
index 7173a12..1cf24e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,6 +70,7 @@ plugin.video.gametest.dk/.idea
plugin.video.nos/.git
plugin.audio.groove/description.xml
plugin.video.brt/.git
+plugin.video.brt/.project
plugin.video.4players/.git
plugin.video.hockeystreams/.git
plugin.video.hockeystreams/.idea
diff --git a/plugin.video.brt/addon.xml b/plugin.video.brt/addon.xml
index 1ab7abd..e7bb332 100644
--- a/plugin.video.brt/addon.xml
+++ b/plugin.video.brt/addon.xml
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.video.brt"
- version="1.0.1"
- name="BestRussianTV.com"
+ version="1.2.5"
+ name="BestRussianTV"
provider-name="BestRussianTV.com">
<requires>
<import addon="xbmc.python" version="1.0"/>
+ <import addon="script.module.beautifulsoup" version="3.0.8"/>
+
</requires>
- <extension point="xbmc.python.pluginsource" library="brt.py">
+ <extension point="xbmc.python.pluginsource" library="brtv.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
diff --git a/plugin.video.brt/archive.py b/plugin.video.brt/archive.py
index 1f4b2c4..43369e7 100644
--- a/plugin.video.brt/archive.py
+++ b/plugin.video.brt/archive.py
@@ -1,3 +1,4 @@
+# coding=utf-8
#
# <BestRussianTV plugin for XBMC>
# Copyright (C) <2011> <BestRussianTV>
@@ -15,11 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
-
import httplib, urllib, urllib2, re
import xml.parsers.expat
-import config
+import config1
class GetChannels:
req = \
@@ -41,12 +40,13 @@ class GetChannels:
element = None
def __init__(self, Username, Password):
- self.req = self.req.replace('{SiteId}',
config.siteId).replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{SiteId}',
config1.siteId).replace('{AppName}', config1.appName) \
.replace('{Username}', Username).replace('{Password}', Password)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.epgService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.epgService, self.req, {
+
'SOAPAction': 'http://iptv-distribution.net/ds/epg/GetPVRChannels',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -71,7 +71,9 @@ class GetChannels:
self.element = name
def end_element(self, name):
if name == 'TVChannelData':
- self.channels.append((str(len(self.channels) + 1).zfill(2) + '. '
+ self.name, self.id, self.icon))
+ temp = str(len(self.channels) + 1).zfill(2) + '. ' + self.name
+ #temp = temp.encode('utf-8')
+ self.channels.append((temp, self.id, self.icon))
self.id = None
self.name = None
def char_data(self, data):
@@ -109,19 +111,20 @@ class GetPVREPG:
element = None
def __init__(self, Username, Password, Channel, Date):
- self.req = self.req.replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{AppName}', config1.appName) \
.replace('{Username}', Username).replace('{Password}', Password) \
.replace('{Channel}', Channel).replace('{Date}', Date)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.epgService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net', 80)
+ conn.request('POST', config1.epgService, self.req, {
+ 'Host' : 'iptv-distribution.net',
'SOAPAction': 'http://iptv-distribution.net/ds/epg/GetPVREPG',
'Content-Type': 'text/xml; charset=utf-8'
})
response = conn.getresponse()
data = response.read()
- print data
+
p = xml.parsers.expat.ParserCreate()
@@ -134,15 +137,17 @@ class GetPVREPG:
def start_element(self, name, attrs):
if name == 'TVProgramData':
self.id = attrs['TvGuideID']
- self.name = attrs['TvProgramName'].encode('utf-8')
+ self.name = attrs['TvProgramName']
# description is not returned by the service
self.description = ""
- #self.description = attrs['Description'].encode('utf-8')
+ #self.description = attrs['Description']#.encode('utf-8')
self.start = attrs['Date'][11:16].encode('utf-8')
self.isWatchable = attrs['IsWatchable']
- def end_element(self, name):
+ def end_element(self, name):
if name == 'TVProgramData' and self.isWatchable != 'false':
- self.programs.append((self.start + ' ' + self.name, self.id,
self.description))
+ test = self.start + ' ' + self.name
+ test = test.encode('utf-8')
+ self.programs.append((test, self.id, self.description))
self.id = None
self.start = None
self.name = None
@@ -165,12 +170,13 @@ class GetArchStream:
streamUrl = None
def __init__(self, Username, Password, Program):
- self.req = self.req.replace('{AppName}',
config.appName).replace('{Protocol}', config.protocol) \
+ self.req = self.req.replace('{AppName}',
config1.appName).replace('{Protocol}', config1.protocol) \
.replace('{Username}', Username).replace('{Password}',
Password).replace('{Program}', Program)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vodService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net', 80)
+ conn.request('POST', config1.vodService, self.req, {
+ 'Host': 'iptv-distribution.net',
'SOAPAction':
'http://www.iptv-distribution.com/ucas/GetPVRStreamURL',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -214,18 +220,18 @@ class GetPvrPlaylist:
streamUrl = None
def __init__(self, Username, Password, Program):
- self.req = self.req.replace('{AppName}',
config.appName).replace('{Protocol}', config.protocol) \
+ self.req = self.req.replace('{AppName}',
config1.appName).replace('{Protocol}', config1.protocol) \
.replace('{Username}', Username).replace('{Password}',
Password).replace('{Program}', Program)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.streamService, self.req, {
+ conn = httplib.HTTPConnection(config1.server)
+ conn.request('POST', config1.streamService, self.req, {
'SOAPAction':
'http://iptv-distribution.net/ds/cas/streams/generic/GetPvrPlaylist',
'Content-Type': 'text/xml; charset=utf-8'
})
response = conn.getresponse()
data = response.read()
- print data
+
p = xml.parsers.expat.ParserCreate()
diff --git a/plugin.video.brt/asx.py b/plugin.video.brt/asx.py
index 5540223..c7e1e39 100644
--- a/plugin.video.brt/asx.py
+++ b/plugin.video.brt/asx.py
@@ -1,3 +1,4 @@
+# coding=utf-8
#
# <BestRussianTV plugin for XBMC>
# Copyright (C) <2011> <BestRussianTV>
@@ -15,10 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
import httplib, urllib, urllib2, re
import xml.parsers.expat
-import config
+import config1
class Parser:
streams = []
diff --git a/plugin.video.brt/config.py b/plugin.video.brt/config.py
index 1b68cdd..6129a26 100644
--- a/plugin.video.brt/config.py
+++ b/plugin.video.brt/config.py
@@ -1,30 +1,15 @@
-#
-# <BestRussianTV plugin for XBMC>
-# Copyright (C) <2011> <BestRussianTV>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-
import sys
-server = 'iptv-distribution.net'
epgService = '/ds/epg/service.asmx'
+server = 'ivsmedia.iptv-distribution.net'
+MediaService = '/MediaService.svc/soap'
+ContentService = '/ContentService.svc/soap'
+ClientService = '/ClientService.svc/soap'
+siteId = '2'
+appName = 'XBMC Plugin (' + sys.platform + ')'
+streamService = '/ds/cas/streams/generic/stream.asmx'
+protocol = 'mms'
vodService = '/ucas/service.asmx'
vod2Service = '/ds/vod/generic/service.asmx'
radioService = '/ucas/service.asmx'
-streamService = '/ds/cas/streams/generic/stream.asmx'
-protocol = 'mms'
-siteId = '2'
-appName = 'XBMC Plugin (' + sys.platform + ')'
+
diff --git a/plugin.video.brt/radio.py b/plugin.video.brt/radio.py
index b5cd57b..b512a39 100644
--- a/plugin.video.brt/radio.py
+++ b/plugin.video.brt/radio.py
@@ -1,4 +1,3 @@
-
#
# <BestRussianTV plugin for XBMC>
# Copyright (C) <2011> <BestRussianTV>
@@ -19,7 +18,7 @@
import httplib, urllib, urllib2, re
import xml.parsers.expat
-import config
+import config1
class GetRadioStationListByUser:
req = \
@@ -40,13 +39,14 @@ class GetRadioStationListByUser:
element = None
def __init__(self, Username):
- self.req = self.req.replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{AppName}', config1.appName) \
.replace('{Username}', Username)
#print self.req
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.radioService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.radioService, self.req, {
+ 'Host': 'iptv-distribution.net',
'SOAPAction':
'http://www.iptv-distribution.com/ucas/GetRadioStationListByUser',
'Content-Type': 'text/xml; charset=utf-8'
})
diff --git a/plugin.video.brt/resources/language/English/strings.xml
b/plugin.video.brt/resources/language/English/strings.xml
index 223f0c2..0b8d7ed 100644
--- a/plugin.video.brt/resources/language/English/strings.xml
+++ b/plugin.video.brt/resources/language/English/strings.xml
@@ -1,6 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<strings>
- <string id="30000">Username</string>
- <string id="30001">Password</string>
- <string id="30002">Time Zone</string>
+ <string id="30000">ÐÐ¼Ñ Ð¿Ð¾Ð»ÑзоваÑелÑ</string>
+ <string id="30001">ÐаÑолÑ</string>
+ <string id="30010">СеÑвеÑ</string>
+ <string id="30149">Ðона ÐеÑаниÑ</string>
+ <string id="30150">Russian Standart Time</string>
+ <string id="30151">Pacific Standart Time</string>
+ <string id="30152">Eastern Standart Time</string>
+ <string id="30153">E. Australia Standard Time</string>
+
+ <string id="30154">ÐÑÑоÑник 1</string>
+ <string id="30155">ÐÑÑоÑник 2</string>
+
+ <string id="30156">HQ</string>
+ <string id="30157">SQ</string>
+
+ <string id="30158">1080p</string>
+ <string id="30159">720p</string>
+ <string id="30160">480p 4:3</string>
+ <string id="30161">480p 16:9</string>
</strings>
\ No newline at end of file
diff --git a/plugin.video.brt/resources/language/Russian/strings.xml
b/plugin.video.brt/resources/language/Russian/strings.xml
index 02ea115..f883efc 100644
--- a/plugin.video.brt/resources/language/Russian/strings.xml
+++ b/plugin.video.brt/resources/language/Russian/strings.xml
@@ -2,5 +2,21 @@
<strings>
<string id="30000">ÐÐ¼Ñ Ð¿Ð¾Ð»ÑзоваÑелÑ</string>
<string id="30001">ÐаÑолÑ</string>
- <string id="30002">ЧаÑовой поÑÑ</string>
+ <string id="30010">СеÑвеÑ</string>
+ <string id="30149">Ðона ÐеÑаниÑ</string>
+ <string id="30150">Russian Standart Time</string>
+ <string id="30151">Pacific Standart Time</string>
+ <string id="30152">Eastern Standart Time</string>
+ <string id="30153">E. Australia Standard Time</string>
+
+ <string id="30154">ÐÑÑоÑник 1</string>
+ <string id="30155">ÐÑÑоÑник 2</string>
+
+ <string id="30156">HQ</string>
+ <string id="30157">SQ</string>
+
+ <string id="30158">1080p</string>
+ <string id="30159">720p</string>
+ <string id="30160">480p 4:3</string>
+ <string id="30161">480p 16:9</string>
</strings>
\ No newline at end of file
diff --git a/plugin.video.brt/resources/settings.xml
b/plugin.video.brt/resources/settings.xml
index 51d5d1f..69851d2 100644
--- a/plugin.video.brt/resources/settings.xml
+++ b/plugin.video.brt/resources/settings.xml
@@ -2,4 +2,9 @@
<settings>
<setting id="username" type="text" label="30000" />
<setting id="password" type="text" option="hidden" label="30001" />
+ <setting id="server" type="enum" label="30010" default="0"
lvalues="30154|30155"/>
+ <setting id="region" type="enum" label="30149" default="0"
+ lvalues="30150|30151|30152|30153" />
+ <setting id="quality" type="enum" label="ÐаÑеÑÑво видео"
default="0" lvalues="30156|30157"/>
+ <setting id="resolution" type="enum" label="РазÑеÑение
ÑкÑана" default="0" lvalues="30158|30159|30160|30161"/>
</settings>
\ No newline at end of file
diff --git a/plugin.video.brt/vod.py b/plugin.video.brt/vod.py
index 8783cc2..671883d 100644
--- a/plugin.video.brt/vod.py
+++ b/plugin.video.brt/vod.py
@@ -1,4 +1,4 @@
-
+# coding=utf-8
#
# <BestRussianTV plugin for XBMC>
# Copyright (C) <2011> <BestRussianTV>
@@ -16,10 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
import httplib, urllib, urllib2, re
import xml.parsers.expat
-import config
+import config1
class GetVODAddedLastWeekByUser:
req = \
@@ -42,13 +41,13 @@ class GetVODAddedLastWeekByUser:
day = None
def __init__(self, Username, Password, Day):
- self.req = self.req.replace('{SiteId}',
config.siteId).replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{SiteId}',
config1.siteId).replace('{AppName}', config1.appName) \
.replace('{Username}', Username).replace('{Password}',
Password).replace('{Day}', Day)
self.day = Day
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vodService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vodService, self.req, {
'SOAPAction':
'http://www.iptv-distribution.com/ucas/GetVODAddedLastWeekByUser',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -66,12 +65,13 @@ class GetVODAddedLastWeekByUser:
def start_element(self, name, attrs):
if name == 'Series':
self.id = attrs['ID']
- self.name = attrs['Name'].encode('utf-8') + ' ' +
attrs['RecPart'].encode('utf-8')
+ self.name = (attrs['Name'] + ' ' +
attrs['RecPart']).encode('utf-8')
self.description = attrs['description'].encode('utf-8')
if name == 'Movies' and attrs.has_key('Image'):
self.icon = attrs['Image']
def end_element(self, name):
if name == 'Series':
+
self.programs.append((self.name, self.id, self.description,
self.icon))
self.id = None
self.name = None
@@ -95,12 +95,12 @@ class GetVODStreamURL:
streamUrl = None
def __init__(self, Username, Password, Id):
- self.req = self.req.replace('{AppName}',
config.appName).replace('{Protocol}', config.protocol) \
+ self.req = self.req.replace('{AppName}',
config1.appName).replace('{Protocol}', config1.protocol) \
.replace('{Username}', Username).replace('{Password}',
Password).replace('{Id}', Id)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vodService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vodService, self.req, {
'SOAPAction':
'http://www.iptv-distribution.com/ucas/GetVODStreamURL',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -140,12 +140,13 @@ class GetVODGenresByUser:
name = None
def __init__(self, Username):
- self.req = self.req.replace('{SiteId}',
config.siteId).replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{SiteId}',
config1.siteId).replace('{AppName}', config1.appName) \
.replace('{Username}', Username)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vodService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vodService, self.req, {
+ 'Host': 'iptv-distribution.net',
'SOAPAction':
'http://www.iptv-distribution.com/ucas/GetVODGenresByUser',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -187,12 +188,12 @@ class GetVODSubGenres:
description = None
def __init__(self, Id):
- self.req = self.req.replace('{SiteId}',
config.siteId).replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{SiteId}',
config1.siteId).replace('{AppName}', config1.appName) \
.replace('{Id}', Id)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vodService, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vodService, self.req, {
'SOAPAction':
'http://www.iptv-distribution.com/ucas/GetVODSubGenres',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -241,15 +242,16 @@ class GetVODMoviesBySubGenreUser:
parts = 1
rating = 0
length = 0
-
+ date = ""
def __init__(self, Username, Password, Id):
- self.req = self.req.replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{AppName}', config1.appName) \
.replace('{Username}', Username).replace('{Password}', Password) \
.replace('{Id}', Id)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vod2Service, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vod2Service, self.req, {
+ 'Host': 'iptv-distribution.net',
'SOAPAction':
'http://iptv-distribution.net/ds/vod/generic/GetVODMoviesBySubGenreUser',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -262,30 +264,44 @@ class GetVODMoviesBySubGenreUser:
p.EndElementHandler = self.end_element
p.Parse(str(data))
- return self.programs
+ return sorted(self.programs, key=lambda date: date[6], reverse=True)
def start_element(self, name, attrs):
if name == 'Movie':
+
self.id = attrs['Vid']
- self.name = (attrs['Name'] + ' ' +
attrs['RecParts']).encode('utf-8')
+ if int(attrs['RecParts']) > 1:
+ self.name = (attrs['Name'] + '. ' +
attrs['RecParts']).encode('utf-8')
+ else:
+ self.name = attrs['Name'].encode('utf-8')
if 'Description' in attrs:
- self.description = attrs['Description']
+ self.description = attrs['Description'].encode('utf-8')
+ else:
+ self.description = ""
self.parts = int(attrs['RecParts'])
if 'Rating' in attrs:
self.rating = float(attrs['Rating'])
+ else:
+ self.rating = float(0.1)
+ if 'MovieDate' in attrs:
+ self.date = attrs['MovieDate']
+ else:
+ self.date = "2100-09-05T23:59:59"
if 'Length' in attrs:
l = int(attrs['Length'])
self.length = str(int(l/60)) + ':' + str(l%60)
- print self.length
+ else:
+ self.length = "0:00"
def end_element(self, name):
if name == 'Movie':
- self.programs.append((self.name, self.id, self.description,
self.parts, self.rating, self.length))
+ self.programs.append((self.name, self.id, self.description,
self.parts, self.rating, self.length, self.date))
self.id = None
self.name = None
self.description = None
self.parts = 1
self.rating = 0
self.length = 0
+ self.date = ""
class GetVODSeries:
req = \
@@ -309,13 +325,13 @@ class GetVODSeries:
parts = 1
def __init__(self, Username, Password, Id):
- self.req = self.req.replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{AppName}', config1.appName) \
.replace('{Username}', Username).replace('{Password}', Password) \
.replace('{Id}', Id)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vod2Service, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vod2Service, self.req, {
'SOAPAction':
'http://iptv-distribution.net/ds/vod/generic/GetVODSeries',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -334,7 +350,7 @@ class GetVODSeries:
if name == 'Movie':
self.id = attrs['Vid']
if 'Description' in attrs:
- self.description = attrs['Description']
+ self.description = attrs['Description'].encode('utf-8')
else:
self.description = ''
self.parts = int(attrs['RecParts'])
@@ -370,14 +386,15 @@ class GetVODMoviesNewInVODByUser:
id = None
name = None
description = None
-
+ date = ""
def __init__(self, Username, Password):
- self.req = self.req.replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{AppName}', config1.appName) \
.replace('{Username}', Username).replace('{Password}', Password)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vod2Service, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vod2Service, self.req, {
+ 'Host': 'iptv-distribution.net',
'SOAPAction':
'http://iptv-distribution.net/ds/vod/generic/GetVODMoviesNewInVODByUser',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -390,16 +407,20 @@ class GetVODMoviesNewInVODByUser:
p.EndElementHandler = self.end_element
p.Parse(str(data))
- return sorted(self.programs, key=lambda prog: prog[0])
+ return sorted(self.programs, key=lambda prog: prog[3], reverse=True)
def start_element(self, name, attrs):
if name == 'Movie':
self.id = attrs['Vid']
self.name = attrs['Name'].encode('utf-8')
- self.description = attrs['Description']
+ self.description = attrs['Description'].encode('utf-8')
+ if 'MovieDate' in attrs:
+ self.date = attrs['MovieDate']
+ else:
+ self.date = "2100-09-05T23:59:59"
def end_element(self, name):
if name == 'Movie':
- self.programs.append((self.name, self.id, self.description))
+ self.programs.append((self.name, self.id, self.description,
self.date))
self.id = None
self.name = None
self.description = None
@@ -424,14 +445,14 @@ class GetVODMoviesTOP100ByUser:
id = None
name = None
description = None
-
+ rating = 0
def __init__(self, Username, Password):
- self.req = self.req.replace('{AppName}', config.appName) \
+ self.req = self.req.replace('{AppName}', config1.appName) \
.replace('{Username}', Username).replace('{Password}', Password)
def Request(self):
- conn = httplib.HTTPConnection(config.server)
- conn.request('POST', config.vod2Service, self.req, {
+ conn = httplib.HTTPConnection('iptv-distribution.net')
+ conn.request('POST', config1.vod2Service, self.req, {
'SOAPAction':
'http://iptv-distribution.net/ds/vod/generic/GetVODMoviesTOP100ByUser',
'Content-Type': 'text/xml; charset=utf-8'
})
@@ -444,16 +465,21 @@ class GetVODMoviesTOP100ByUser:
p.EndElementHandler = self.end_element
p.Parse(str(data))
- return sorted(self.programs, key=lambda prog: prog[0])
+ return sorted(self.programs, key=lambda prog: prog[3], reverse=True)
def start_element(self, name, attrs):
if name == 'Movie':
self.id = attrs['Vid']
self.name = attrs['Name'].encode('utf-8')
- self.description = attrs['Description']
+ self.description = attrs['Description'].encode('utf-8')
+ if 'Rating' in attrs:
+ self.rating = float(attrs['Rating'])
+ else:
+ self.rating = float(0.1)
def end_element(self, name):
if name == 'Movie':
- self.programs.append((self.name, self.id, self.description))
+ self.programs.append((self.name, self.id, self.description,
self.rating))
self.id = None
self.name = None
self.description = None
+ self.rating
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
plugin.video.brt/ArcSearch.py | 109 ++++
plugin.video.brt/ClientService.py | 54 ++
plugin.video.brt/Common.py | 41 ++
plugin.video.brt/Content.py | 262 ++++++++
plugin.video.brt/ContentService.py | 577 +++++++++++++++++
plugin.video.brt/GetBest.py | 81 +++
plugin.video.brt/Media.py | 79 +++
plugin.video.brt/MediaService.py | 176 +++++
plugin.video.brt/RusKeyboard.py | 381 +++++++++++
plugin.video.brt/VodSearch.py | 113 ++++
plugin.video.brt/addon.xml | 8 +-
plugin.video.brt/archive.py | 50 +-
plugin.video.brt/asx.py | 4 +-
plugin.video.brt/background.png | Bin 0 -> 8671 bytes
plugin.video.brt/brtv.py | 675 ++++++++++++++++++++
plugin.video.brt/config.py | 33 +-
plugin.video.brt/config1.py | 14 +
plugin.video.brt/icon/icon_movies.png | Bin 0 -> 16661 bytes
plugin.video.brt/icon/icon_radio.png | Bin 0 -> 12333 bytes
plugin.video.brt/icon/icon_teleteka.png | Bin 0 -> 21165 bytes
plugin.video.brt/icon/icon_tv_archive.png | Bin 0 -> 17032 bytes
plugin.video.brt/icon/icon_tv_live.png | Bin 0 -> 16611 bytes
plugin.video.brt/radio.py | 10 +-
.../resources/language/English/strings.xml | 22 +-
.../resources/language/Russian/strings.xml | 18 +-
plugin.video.brt/resources/settings.xml | 5 +
plugin.video.brt/vod.py | 112 ++--
28 files changed, 2722 insertions(+), 103 deletions(-)
create mode 100644 plugin.video.brt/ArcSearch.py
create mode 100644 plugin.video.brt/ClientService.py
create mode 100644 plugin.video.brt/Common.py
create mode 100644 plugin.video.brt/Content.py
create mode 100644 plugin.video.brt/ContentService.py
create mode 100644 plugin.video.brt/GetBest.py
create mode 100644 plugin.video.brt/Media.py
create mode 100644 plugin.video.brt/MediaService.py
create mode 100644 plugin.video.brt/RusKeyboard.py
create mode 100644 plugin.video.brt/VodSearch.py
create mode 100644 plugin.video.brt/background.png
create mode 100644 plugin.video.brt/brtv.py
create mode 100644 plugin.video.brt/config1.py
create mode 100644 plugin.video.brt/icon/icon_movies.png
create mode 100644 plugin.video.brt/icon/icon_radio.png
create mode 100644 plugin.video.brt/icon/icon_teleteka.png
create mode 100644 plugin.video.brt/icon/icon_tv_archive.png
create mode 100644 plugin.video.brt/icon/icon_tv_live.png
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons