![]() |
|
![]() |
#11 |
Junior Member
Регистрация: 07.01.2012
Сообщений: 2
|
![]()
Внезапно перестал работать
![]() Помогите пожалуйста. Version Eden 11 beta Debug log: http://pastebin.com/mf457BMu |
![]() |
![]() |
![]() |
#12 |
Senior Member
Регистрация: 26.01.2010
Адрес: Растворился
Сообщений: 1,316
|
![]()
Ну тогда смотрим в XBMC Russia
![]() Пока автор этого полезного патча не найдет решение...
__________________
https://code.google.com/archive/p/se...iki_Index.wiki |
![]() |
![]() |
![]() |
#13 | |
Senior Member
Регистрация: 29.12.2010
Сообщений: 774
|
![]() Цитата:
Попробуйте набрать в браузере http://direct-time.ru/index.php?id=20 У меня работает по прежнему, но такие ситуации, конечно же, стоило бы учитывать. Вот подправил немного "напильником". Теперь если есть проблемы, то будет выдавать старый добрый список каналов Код:
def root(url): try: msktmht = getURL('http://direct-time.ru/index.php?id=20'); msktmls = re.compile('<td id="local_time">(.*?)</td>').findall(msktmht) msktmst = time.strptime('1970-' + msktmls[0], "%Y-%H:%M:%S") except: pass http = getURL(url) oneline = re.sub( '\n', ' ', http) chndls = re.compile('<div class="chlogo">(.*?)</div> <!-- (left|right)(up|down)part -->').findall(oneline) for chndel, rEL, rEU in chndls: chells = re.compile('<a href=(.*?)><img src="(.*?)" alt="(.*?)" title="(.*?)"></div>').findall(chndel) description = chells[0][3] title = description thumbnail = chells[0][1].replace('./', url) uri = sys.argv[0] + '?mode=BIG' uri += '&url='+urllib.quote_plus(url + chells[0][0]) uri += '&name='+urllib.quote_plus(title) uri += '&plot='+urllib.quote_plus(description) uri += '&thumbnail='+urllib.quote_plus(thumbnail) ptls = re.compile('<div class="prtime">(.*?)</div><div class="prdesc">(.*?)</div>').findall(chndel) ptlsln = len(ptls) if ptlsln: prtm = ptls[len(ptls) - 1][0] prds = ptls[len(ptls) - 1][1] prtmst = time.strptime('1970-' + prtm, "%Y-%H:%M") try: tmdf = time.mktime(msktmst) - time.mktime(prtmst) if (tmdf < 0) and (tmdf > -(12*60.0*60)) and (ptlsln > 1): prtm = ptls[len(ptls) - 2][0] + '-' + prtm prds = ptls[len(ptls) - 2][1] title = prtm + " " + prds except: pass item=xbmcgui.ListItem(title, iconImage=thumbnail, thumbnailImage=thumbnail) item.setInfo( type='video', infoLabels={'title': title, 'plot': description}) item.setProperty('IsPlayable', 'true') item.setProperty('fanart_image',thumbnail) xbmcplugin.addDirectoryItem(pluginhandle,uri,item) xbmcplugin.endOfDirectory(pluginhandle) |
|
![]() |
![]() |
![]() |
#14 |
Junior Member
Регистрация: 07.01.2012
Сообщений: 2
|
![]()
Заработало.
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Регистрация: 29.12.2010
Сообщений: 774
|
![]()
Ну и еще один update для тех кто живет не по московскому времени.
Будет показывать местное время (local time for your PC/XBMC) для списка телепрограмм. Замените функцию root на эти две toLcTm и root:: Код:
def toLcTm(tzd, tmst): return time.strftime("%H:%M",time.localtime((time.mktime(tmst) - tzd*3600))) def root(url): try: msktmht = getURL('http://time.jp-net.ru/'); msktmls = re.compile('<h1 align=\'center\'>(.*?): (.*?)</h1>').findall(msktmht) msktmst = time.strptime(msktmls[0][1] + ' ' + msktmls[1][1], "%Y-%d-%m %H:%M:%S") #print (msktmls[0][1] + ' ' + msktmls[1][1]) tzdf = round( (time.mktime(msktmst) - time.mktime(time.localtime())) / (3600)) except: pass http = getURL(url) oneline = re.sub( '\n', ' ', http) chndls = re.compile('<div class="chlogo">(.*?)</div> <!-- (left|right)(up|down)part -->').findall(oneline) for chndel, rEL, rEU in chndls: chells = re.compile('<a href=(.*?)><img src="(.*?)" alt="(.*?)" title="(.*?)"></div>').findall(chndel) description = chells[0][3] title = description thumbnail = chells[0][1].replace('./', url) uri = sys.argv[0] + '?mode=BIG' uri += '&url='+urllib.quote_plus(url + chells[0][0]) uri += '&name='+urllib.quote_plus(title) uri += '&plot='+urllib.quote_plus(description) uri += '&thumbnail='+urllib.quote_plus(thumbnail) ptls = re.compile('<div class="prtime">(.*?)</div><div class="prdesc">(.*?)</div>').findall(chndel) ptlsln = len(ptls) i = 1 while ptlsln - i + 1: prtm = ptls[ptlsln - i][0] prds = ptls[ptlsln - i][1] prtmst = time.strptime(msktmls[0][1] + ' ' + prtm, "%Y-%d-%m %H:%M") try: tmdf = time.mktime(msktmst) - time.mktime(prtmst) if (((tmdf < 0) and (tmdf > -12*3600.0)) or (tmdf > 12*3600.0)) and (ptlsln > 1): i += 1 else: # if i > 1: # prtm = prtm + '-' + ptls[ptlsln - i + 1][0] if i > 1: prtmst2 = time.strptime(msktmls[0][1] + ' ' + ptls[ptlsln - i + 1][0], "%Y-%d-%m %H:%M") prtm = toLcTm(tzdf, prtmst) + '-' + toLcTm(tzdf, prtmst2) else: prtm = toLcTm(tzdf, prtmst) title = prtm + " " + prds break except: break if ptlsln: #print title item=xbmcgui.ListItem(title, iconImage=thumbnail, thumbnailImage=thumbnail) item.setInfo( type='video', infoLabels={'title': title, 'plot': description}) item.setProperty('IsPlayable', 'true') item.setProperty('fanart_image',thumbnail) xbmcplugin.addDirectoryItem(pluginhandle,uri,item) xbmcplugin.endOfDirectory(pluginhandle) |
![]() |
![]() |
![]() |
#16 |
Senior Member
Регистрация: 26.01.2010
Адрес: Растворился
Сообщений: 1,316
|
![]()
__________________
https://code.google.com/archive/p/se...iki_Index.wiki |
![]() |
![]() |
![]() |
#17 |
Senior Member
Регистрация: 22.12.2011
Сообщений: 262
|
![]()
Подскажите, пожалуйста, как можно убрать время внизу. А то малость раздражает, когда секунды постоянно тикают
|
![]() |
![]() |
![]() |
#18 |
Senior Member
Регистрация: 29.12.2010
Сообщений: 774
|
![]() |
![]() |
![]() |
![]() |
#19 |
Senior Member
Регистрация: 22.12.2011
Сообщений: 262
|
![]()
ясно, спасибо
|
![]() |
![]() |
![]() |
#20 |
Senior Member
Регистрация: 22.12.2011
Сообщений: 262
|
![]()
А что за косяк произошёл? Несколько дней не работало, а сейчас работает, но всё как в замедленной съёмке, скорость воспроизведения в 2 раза меньше. На сайте всё нормально работает
|
![]() |
![]() |
![]() |
Метки |
addon, debilizator, video |
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1) | |
Опции темы | |
Опции просмотра | |
|
|
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Очень бы хотелось RuTube.ru и www.debilizator.tv | bk007 | Помощь по плагинам | 33 | 04.09.2010 00:27 |