KoD 1.4
- completato il supporto al futuro Kodi 19\n- ridisegnato infoplus\n- fix vari ed eventuali\n
This commit is contained in:
+11
-10
@@ -52,7 +52,7 @@ validUrlRegex = re.compile(
|
||||
r'(?::\d+)?' # optional port
|
||||
r'(?:/?|[/?]\S+)$', re.IGNORECASE)
|
||||
|
||||
chBlackList = ['url']
|
||||
chBlackList = ['url', 'mediasetplay']
|
||||
chNumRis = {
|
||||
'altadefinizione01': {
|
||||
'Film': 20
|
||||
@@ -120,7 +120,7 @@ chNumRis = {
|
||||
'Serie TV': 12
|
||||
},
|
||||
'serietvonline': {
|
||||
'Film': 35,
|
||||
'Film': 50,
|
||||
'Serie TV': 35
|
||||
},
|
||||
'tantifilm': {
|
||||
@@ -133,6 +133,7 @@ servers = []
|
||||
channels = []
|
||||
|
||||
channel_list = channelselector.filterchannels("all") if 'KOD_TST_CH' not in os.environ else [Item(channel=os.environ['KOD_TST_CH'], action="mainlist")]
|
||||
logger.info(channel_list)
|
||||
ret = []
|
||||
for chItem in channel_list:
|
||||
try:
|
||||
@@ -145,7 +146,7 @@ for chItem in channel_list:
|
||||
serversFound = {}
|
||||
|
||||
for it in mainlist:
|
||||
print 'preparing ' + ch + ' -> ' + it.title
|
||||
print('preparing ' + ch + ' -> ' + it.title)
|
||||
|
||||
if it.action == 'channel_config':
|
||||
hasChannelConfig = True
|
||||
@@ -177,7 +178,7 @@ for chItem in channel_list:
|
||||
|
||||
from specials import news
|
||||
dictNewsChannels, any_active = news.get_channels_list()
|
||||
print channels
|
||||
print(channels)
|
||||
# only 1 server item for single server
|
||||
serverNames = []
|
||||
serversFinal = []
|
||||
@@ -207,7 +208,7 @@ class GenericChannelTest(unittest.TestCase):
|
||||
title, itemlist in ch['menuItemlist'].items()])
|
||||
class GenericChannelMenuItemTest(unittest.TestCase):
|
||||
def test_menu(self):
|
||||
print 'testing ' + self.ch + ' --> ' + self.title
|
||||
print('testing ' + self.ch + ' --> ' + self.title)
|
||||
self.assertTrue(self.module.host, 'channel ' + self.ch + ' has not a valid hostname')
|
||||
self.assertTrue(self.itemlist, 'channel ' + self.ch + ' -> ' + self.title + ' is empty')
|
||||
self.assertTrue(self.serversFound,
|
||||
@@ -245,7 +246,7 @@ class GenericChannelMenuItemTest(unittest.TestCase):
|
||||
self.assertTrue(nextPageItemlist,
|
||||
'channel ' + self.ch + ' -> ' + self.title + ' has nextpage not working')
|
||||
|
||||
print '<br>test passed'
|
||||
print('<br>test passed')
|
||||
|
||||
|
||||
@parameterized.parameterized_class(serversFinal)
|
||||
@@ -253,7 +254,7 @@ class GenericServerTest(unittest.TestCase):
|
||||
def test_get_video_url(self):
|
||||
module = __import__('servers.%s' % self.name, fromlist=["servers.%s" % self.name])
|
||||
page_url = self.server.url
|
||||
print 'testing ' + page_url
|
||||
print('testing ' + page_url)
|
||||
self.assert_(hasattr(module, 'test_video_exists'), self.name + ' has no test_video_exists')
|
||||
try:
|
||||
if module.test_video_exists(page_url)[0]:
|
||||
@@ -261,7 +262,7 @@ class GenericServerTest(unittest.TestCase):
|
||||
server_parameters = servertools.get_server_parameters(self.name)
|
||||
self.assertTrue(urls or server_parameters.get("premium"),
|
||||
self.name + ' scraper did not return direct urls for ' + page_url)
|
||||
print urls
|
||||
print(urls)
|
||||
for u in urls:
|
||||
spl = u[1].split('|')
|
||||
if len(spl) == 2:
|
||||
@@ -274,7 +275,7 @@ class GenericServerTest(unittest.TestCase):
|
||||
h, v = name.split('=')
|
||||
h = str(h)
|
||||
headers[h] = str(v)
|
||||
print headers
|
||||
print(headers)
|
||||
if 'magnet:?' in directUrl: # check of magnet links not supported
|
||||
continue
|
||||
page = downloadpage(directUrl, headers=headers, only_headers=True, use_requests=True)
|
||||
@@ -292,6 +293,6 @@ class GenericServerTest(unittest.TestCase):
|
||||
if __name__ == '__main__':
|
||||
if 'KOD_TST_CH' not in os.environ:
|
||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(report_name='report', add_timestamp=False, combine_reports=True,
|
||||
report_title='KoD Test Suite'), exit=False)
|
||||
report_title='KoD Test Suite', template=os.path.join(config.get_runtime_path(), 'tests', 'template.html')), exit=False)
|
||||
else:
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user