diff --git a/README.md b/README.md index 007a7b9..110621f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Malimali Ao 的Kodi插件 -> 适用于Kodi 19 及更高版本 +> 这是我个人感兴趣开发的一些适用于Kodi 19 及更高版本平台的插件,并为此做的一个插件下载主页。 -如果您想浏览更详细的介绍,请查看下载主页:https://malimaliao.github.io/kodi/ +请您直接访问并浏览主页:https://malimaliao.github.io/kodi/ diff --git a/metadata.mtime.com/addon.xml b/metadata.mtime.com/addon.xml deleted file mode 100644 index ec3be76..0000000 --- a/metadata.mtime.com/addon.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - Mtime Movie Scraper - Mtime filmadat leolvasó - Mtime 영화 스크래퍼 - Mtime Film Scraper - Scraper filmów Mtime - Scraper de filmes Mtime - Mtime Filmskrapa - Mtime电影刮削器 - Download Movie information from www.mtime.com. Mtime is the largest movie portal in China. Found in 2004, Mtime provides top four movie services in China: largest movie/TV database in Chinese: largest movie review and rating: the only nationwide movie theater and Showtime search; and the largest movie marketing and promotion services. - Film információk letöltése a www.mtime.com webhelyről - www.mtime.com 에서 영화 정보 다운로드 - Download film informatie van www.mtime.com - Pobieraj informacje o filmach z www.mtime.com - Descarregar informação de filmes de www.mtime.com - Ladda ner filminformation från www.mtime.com - 从时光网www.mtime.com下载电影资料。时光网是国内做的比较好的专业电影网,面向广大网民提供电影信息资料的在线浏览和搜索服务,并提供个人主页、博客、网络相册的创建以及通过个人主页联系建立虚拟社交圈的在线网络服务。时光网还是国内各大网络媒体的内容提供商和国内外知名电影厂商的服务提供商。 - all - - - - https://github.com/taxigps/metadata.mtime.com - - diff --git a/metadata.mtime.com/icon.png b/metadata.mtime.com/icon.png deleted file mode 100644 index 98366e7..0000000 Binary files a/metadata.mtime.com/icon.png and /dev/null differ diff --git a/metadata.mtime.com/mtime.xml b/metadata.mtime.com/mtime.xml deleted file mode 100644 index 256e350..0000000 --- a/metadata.mtime.com/mtime.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - (http://movie.mtime.com/movie/[0-9]*) - - - - - - - - - - - movieID":(\d+),"type":(.+?),".+?"titleCn":"(.+?)","titleEn":"(.+?)",.+?"year":"(.+?)", - - - - - - - - - - - - "movieId":(\d+),"name":"(.+?)","nameEn":"(.+?)"," - - - "movieId":(\d+),"name":"(.+?)","nameEn":"(.+?)"," - - - "year":"(.+?)", - - - "releaseArea":"(.+?)", - - - "type":\[(.+?)\], - - - - - "nameEn":"(.+?)"\} - - "companies":\[(.+?)\], - - - - 剧情:(.*?)更多剧情 - - - - - 演员 Actor(.*?)</dl>\s*</div> - - - <div class="actor_tit">\s*(<div class="pic_58">.*?src="([^_]*)_58X58.jpg" />\s*</a>\s*|)<h3>(.*?)</h3>.*?<h3>(.*?)</h3> - - - 导演 Director(.*?)</div> - - - <a [^>]*>(.*?)( |<) - - - 编剧 Writer(.*?)</div> - - - <a [^>]*>(.*?)( |<) - - - - - - - "title":"(正式海报|海报|预告海报|角色海报).*?"img_220":"(http://img[^_]*)_[0-9X]+.jpg" - - - - - - - "title":"(官方剧照|桌面).*?"img_220":"(http://img[^_]*)_[0-9X]+.jpg" - - - - - - - - - \{"url":"(.+?)","videoId":(\d+?),"videoSourceType":(\d+),"title":"(.+?)", - - - - - - - - - content":"(.+?)"\} - - - - diff --git a/metadata.mtime.com/readme.md b/metadata.mtime.com/readme.md deleted file mode 100644 index b201bae..0000000 --- a/metadata.mtime.com/readme.md +++ /dev/null @@ -1,4 +0,0 @@ - -# 未完成 - -* https://kodi.wiki/view/Scraper_development_XML \ No newline at end of file diff --git a/metadata.mtime.com/resources/language/Chinese (Simple)/strings.xml b/metadata.mtime.com/resources/language/Chinese (Simple)/strings.xml deleted file mode 100644 index 669630c..0000000 --- a/metadata.mtime.com/resources/language/Chinese (Simple)/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 启用同人画 - 启用预告片 - diff --git a/metadata.mtime.com/resources/language/English/strings.xml b/metadata.mtime.com/resources/language/English/strings.xml deleted file mode 100644 index f2bda66..0000000 --- a/metadata.mtime.com/resources/language/English/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Enable Fanart - Enable Trailer - diff --git a/metadata.mtime.com/resources/language/Hungarian/strings.xml b/metadata.mtime.com/resources/language/Hungarian/strings.xml deleted file mode 100644 index d9f2f5d..0000000 --- a/metadata.mtime.com/resources/language/Hungarian/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Fanart engedélyezése - diff --git a/metadata.mtime.com/resources/language/Korean/strings.xml b/metadata.mtime.com/resources/language/Korean/strings.xml deleted file mode 100644 index 390cdfd..0000000 --- a/metadata.mtime.com/resources/language/Korean/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - 팬아트 가져오기 - diff --git a/metadata.mtime.com/resources/language/Polish/strings.xml b/metadata.mtime.com/resources/language/Polish/strings.xml deleted file mode 100644 index ccb416d..0000000 --- a/metadata.mtime.com/resources/language/Polish/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Włącz fanart - diff --git a/metadata.mtime.com/resources/language/Portuguese/strings.xml b/metadata.mtime.com/resources/language/Portuguese/strings.xml deleted file mode 100644 index 55ca819..0000000 --- a/metadata.mtime.com/resources/language/Portuguese/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Ligar Fanart - diff --git a/metadata.mtime.com/resources/settings.xml b/metadata.mtime.com/resources/settings.xml deleted file mode 100644 index 0854db5..0000000 --- a/metadata.mtime.com/resources/settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/plugin.video.duolasousuo/README.md b/plugin.video.duolasousuo/README.md deleted file mode 100644 index b2d1baf..0000000 --- a/plugin.video.duolasousuo/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# plugin.video.duolasousuo - -## 哆啦搜索(Kodi视频插件) - -``` - -本視頻插件基於第三方資源站api進行模擬爬行構建拓撲,僅適用於Python開發測試和練習,請勿用於其他用途。 - -``` - -> 如何更換其他第三方資源站數據接口? - -在設置中,修改【內置搜索引擎接口】,可以修改為你所需要的資源站數據接口。 - -資源站json接口:例如“https://api.123.com/api.php/provide/vod/?ac=list” 則只需要接口為 “https://api.123.com/api.php/provide/vod/” -將 https://api.123.com/api.php/provide/vod/ 替換系統內置的接口地址即可。 - -> 如何啟用雲端引擎接口? - -在設置中,開啟【使用雲端搜索接口】即可 diff --git a/plugin.video.duolasousuo/addon.xml b/plugin.video.duolasousuo/addon.xml deleted file mode 100644 index d54791d..0000000 --- a/plugin.video.duolasousuo/addon.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - video - - - all - duola video search plugin - 哆啦搜索 - This plugin for Kodi v19 and above,form third-party website video resource, and its resource has nothing to do with the author of this plugin. - 哆啦搜索是免费的视频搜索插件,通过Kodi开放的计算平台,并基于Python爬虫自动拓扑第三方网站的数据并汇集成一个简单的影音库。 - https://github.com/malimaliao - malimaliao@gmail.com - All resources are irrelevant to the author! For your reference and study only. Please download and delete. Email: malimaliao@gmail.com - 本插件是一个Kodi练习测试应用,基于python拓扑了第三方的引用内容,所有资源均与作者无关!仅供阁下参考和学习。请下载学习后删除。投诉或者反馈联系方式:malimaliao@gmail.com - - logo.png - resources/hello.jpg - resources/1.png - resources/2.png - resources/3.png - resources/4.png - - - diff --git a/plugin.video.duolasousuo/logo.png b/plugin.video.duolasousuo/logo.png deleted file mode 100644 index a8a82c8..0000000 Binary files a/plugin.video.duolasousuo/logo.png and /dev/null differ diff --git a/plugin.video.duolasousuo/main.py b/plugin.video.duolasousuo/main.py deleted file mode 100644 index f94601d..0000000 --- a/plugin.video.duolasousuo/main.py +++ /dev/null @@ -1,474 +0,0 @@ -# -*- coding:utf-8 -*- -import sys, json, base64 -import requests -import urllib.parse -from collections import OrderedDict -# https://codedocs.xyz/xbmc/xbmc/ -import xbmc, xbmcplugin, xbmcgui -import xbmcvfs , xbmcaddon -import os, datetime - -# plugin base config -_plugin_name = '哆啦搜索' -_plugin_player_mimes = ['.m3u8','.mp4','.flv','.ts', '.ogg', '.mp3'] -_plugin_handle = int(sys.argv[1]) # 当前插件句柄 -_plugin_address = sys.argv[0] # 当前插件地址 -_plugin_parm = sys.argv[2] # 问号以后的内容 -_plugin_dialog = xbmcgui.Dialog() -_plugin_player_style = int(xbmcplugin.getSetting(_plugin_handle, 'Duola_play_style')) -# 系统会追加 ?addons=[_plugin_address] -# 镜像接口:https://raw.githubusercontent.com/malimaliao/kodi/matrix/api/plugin.video.duolasousuo/v1.json -_plugin_cloud_url = 'https://gitee.com/beijifeng/kodi/raw/matrix/api/plugin.video.duolasousuo/v1.json' - -# bot config -UA_head = { - 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36', - } - -# global debug -print('duola_debug: [' + str(_plugin_handle)+']'+ _plugin_address+' || '+ _plugin_parm) - -# custom function -def check_json(input_str): - try: - json.loads(input_str) - return True - except: - return False -def check_url_mime(url): - hz = '.' + url.split('.')[-1] - if hz in _plugin_player_mimes: - return True - else: - return False - -# request: https://123.com/api/provide/vod/?wd={keyword} -# return: -def Web_load_search(_api_url, keyword): - get_url = _api_url + '?wd=' + keyword - try: - res = requests.get(url=get_url,headers=UA_head) - res_text = res.text - # print('duola_debug:'+get_url, res.text) - #_plugin_dialog.ok(_plugin_name + 'debug', get_url) - except requests.exceptions.RequestException as e: - res_text = '' - _plugin_dialog.notification(heading=_plugin_name, message='搜索获取失败,暂不可用', time=3000) - print('duola_debug: Web_load_search => bad', e) - if check_json(res.text): - res_json = json.loads(res.text) - if res_json['code'] == 1: - if len(res_json['list']) > 0: - for video in res_json['list']: - vod_id = str(video['vod_id']) - vod_name = '[COLOR yellow]' + video['vod_name'] + '[/COLOR] ' - vod_remarks = video['vod_remarks'] - vod_typename = video['type_name'] - # 建立kodi菜单 - list_item = xbmcgui.ListItem(vod_name+' ('+ vod_typename+' / '+vod_remarks+')') - # list_item.setArt({'icon': '123.JPG'}) - # list_item.setInfo('video', {'year': vod['year'], 'title':vod['name'], 'episodeguide': play['name'], 'tracknumber': i}) - a_url = urllib.parse.quote(_api_url) - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address + '?Bot_search_return=' + a_url + '&read_detail='+vod_id, list_item, True) - # 退出kodi菜单布局 - xbmcplugin.endOfDirectory(handle=_plugin_handle, succeeded=True, updateListing=False, cacheToDisc=True) - else: - print('duola_debug:找不到资源') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,找不到相关资源', time=3000) - else: - print('duola_debug:无法解析json') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,由于无法解析返回的数据,服务暂时不可用,请稍后重试', time=3000) - else: - print('duola_debug:目标服务器返回的数据无法解析') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,目标服务器返回的数据无法响应,服务暂不可用', time=3000) - -# request: https://123.com/api/provide/vod/?ac=detail&ids={detail_id} -# return: play list -def Web_load_detail_one(_api_url, detail_id): - get_url = _api_url + '?ac=detail&ids=' + detail_id - try: - res = requests.get(url=get_url,headers=UA_head) - res_text = res.text - # print('duola_debug:'+get_url, res.text) - except requests.exceptions.RequestException as e: - res_text = '' - _plugin_dialog.notification(heading=_plugin_name, message='内容获取失败,暂不可用', time=3000) - print('duola_debug: Web_load_detail_one => bad', e) - if check_json(res.text): - res_json = json.loads(res.text) - if res_json['code'] == 1: - if len(res_json['list']) > 0: - video = res_json['list'][0] # 仅提取一个 - v_id = str(video['vod_id']) - v_name = video['vod_name'] - v_remarks = video['vod_remarks'] - v_typename = video['type_name'] - v_picture = video['vod_pic'] - v_list_text = video['vod_play_url'] # 多地址合集 - v_infos = {} - try: - v_infos['title'] = video['vod_name'] - v_infos['originaltitle'] = video['vod_name'] - v_infos['tag'] = video['vod_remarks'] - v_infos['status'] = 'n/a' - v_infos['country'] = video['vod_area'] - v_infos['year'] = video['vod_year'] - v_infos['director'] = video['vod_director'] - v_infos['cast'] = video['vod_actor'].split(',') - v_infos['plot'] = video['vod_content'] - v_infos['rating'] = float(video['vod_score']) - except IndexError as e: - pass - # dialog.select - V_name_list = [] - V_m3u8_list = [] - playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) - # 按$$$分隔不同的[播放来源]数据 - # 第01集$http://abc.com/1.mp4#第02集$http://abc.com/2.mp4$$$第01集$http://abc.com/1.flv#第02集$http://abc.com/2.flv - V_class_data = v_list_text.split('$$$') - if len(V_class_data) > 0: - select_title = v_name + ':请选择播放源开始播放' - for V_list in V_class_data: - # 按#分隔相同的[播放来源]数据中的不同[播放地址/剧集] - # 第01集$http://abc.com/1.flv#第02集$http://abc.com/2.flv - V_playlist = V_list.split('#') - V_i = 0 - for V_play in V_playlist: - # 按#分隔,将vod_title与vod_url区分 - # 第01集$http://abc.com/1.flv - V = V_play.split('$') - if len(V) == 2 and check_url_mime( V[1].strip() ): - _v_play_label = V[0].strip() # 去除首尾空格 - _v_play_url = V[1].strip() # 去除首尾空格 - V_name_list.append(_v_play_label) # 播放标签 - V_m3u8_list.append(_v_play_url) # 播放地址 - # listitem - list_item = xbmcgui.ListItem(v_name + ':' + _v_play_label, v_typename) - list_item.setArt({'thumb': v_picture, 'poster': v_picture}) - list_item.setInfo('video', v_infos) - playlist.add(url= _v_play_url, listitem=list_item, index=V_i) - V_i = V_i + 1 - else: - pass # 不符合条件的播放地址跳过 - else: - select_title = '此视频暂时没有播放源' - # 播放方式 - print('dlxx', v_picture) - # player_style ------------------------------------------------- - if _plugin_player_style == 0: - a = -1 - for x in V_name_list: - a = a + 1 - list_item = xbmcgui.ListItem('[COLOR yellow]【播放】[/COLOR]' + v_name + ' (' + V_name_list[a] +')' ) - list_item.setArt({'thumb': v_picture, 'poster': v_picture}) - list_item.setInfo('video', v_infos) - xbmcplugin.addDirectoryItem(_plugin_handle, V_m3u8_list[a] , list_item, False) - xbmcplugin.endOfDirectory(handle=_plugin_handle, succeeded=True, updateListing=False, cacheToDisc=True) - # player_style ------------------------------------------------- - if _plugin_player_style == 1: - dialog = xbmcgui.Dialog() - select_i = dialog.select(select_title, V_name_list) - print('duola_debug: select_i '+str(select_i)) - if select_i >= 0: - list_item = xbmcgui.ListItem('[COLOR yellow]【播放】[/COLOR]' + v_name, v_typename, V_m3u8_list[select_i], offscreen=False) - list_item.setArt({'thumb': v_picture, 'poster': v_picture}) - list_item.setInfo('video', v_infos) - #_plugin_dialog.info(list_item) # 显示视频信息,含播放按钮 - xbmc.Player().play(item=V_m3u8_list[select_i], listitem=list_item) # 立即播放视频 - _plugin_dialog.notification(heading=_plugin_name,message = '视频即将播放,请稍候', time=6000, sound=False) - # player_style ------------------------------------------------- - if _plugin_player_style == 2: - dialog = xbmcgui.Dialog() - select_i = dialog.select(select_title, V_name_list) - print('duola_debug: select_i '+str(select_i)) - if select_i >= 0: - xbmc.Player().play(item=playlist, listitem=list_item, windowed=False, startpos=select_i) # 立即播放列表 - _plugin_dialog.notification(heading = _plugin_name,message = '视频即将播放,请稍候',time=6000,sound=False) - else: - print('duola_debug:没有数据') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,找不到播放列表', time=3000) - else: - print('duola_debug:无法解析json') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,由于无法解析返回的数据,服务暂时不可用,请稍后重试', time=3000) - else: - print('duola_debug:目标服务器返回的数据无法解析') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,目标服务器返回的数据无法响应,服务暂不可用', time=3000) - -# request: https://123.com/api/provide/vod/?ac=list -# return: channels list -def Web_load_channels(_api_url): - get_url = _api_url + '?ac=list' - try: - res = requests.get(url=get_url,headers=UA_head) - res_text = res.text - except requests.exceptions.RequestException as e: - res_text = '' - _plugin_dialog.notification(heading=_plugin_name, message='栏目获取失败,暂不可用', time=3000) - print('duola_debug: Web_load_channels => bad', e) - if check_json(res.text): - res_json = json.loads(res.text) - if res_json['code'] == 1: - if len(res_json['class']) > 0: - for channel in res_json['class']: - type_id = str(channel['type_id']) - type_name = channel['type_name'] - ''' - type_pid = str(channel['type_pid']) - if type_pid != '0': - list_item = xbmcgui.ListItem(type_name) - a_url = urllib.parse.quote(_api_url) - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address + '?Bot_channel=' + a_url + '&channel_id='+type_id, list_item, True) - ''' - list_item = xbmcgui.ListItem(type_name) - a_url = urllib.parse.quote(_api_url) - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address + '?Bot_channel=' + a_url + '&channel_id='+type_id, list_item, True) - xbmcplugin.endOfDirectory(handle=_plugin_handle, succeeded=True, updateListing=False, cacheToDisc=True) - else: - print('duola_debug:暂无栏目') - _plugin_dialog.notification(heading=_plugin_name, message='当前引擎暂无栏目', time=3000) - else: - print('duola_debug:栏目暂时无法获取') - _plugin_dialog.notification(heading=_plugin_name, message='当前引擎栏目暂时无法获取', time=3000) - else: - print('duola_debug:无法解析json') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,无法解析返回的数据,服务暂时不可用,请稍后重试', time=3000) - -# request: https://123.com/api/provide/vod/?ac=list&t={type_id}&pg={page} -# return: list list -def Web_load_list(_api_url, type_id, page): - get_url = _api_url + '?ac=list&t=' + type_id + '&pg=' + page - print('dlt', get_url) - try: - res = requests.get(url=get_url,headers=UA_head) - res_text = res.text - except requests.exceptions.RequestException as e: - res_text = '' - _plugin_dialog.notification(heading=_plugin_name, message='列表获取失败,暂不可用', time=3000) - print('duola_debug: Web_load_list => bad', e) - if check_json(res.text): - res_json = json.loads(res.text) - if res_json['code'] == 1: - if len(res_json['list']) > 0: - for video in res_json['list']: - vod_id = str(video['vod_id']) - vod_name = video['vod_name'] - vod_remarks = video['vod_remarks'] - vod_typename = video['type_name'] - # 建立kodi菜单 - list_item = xbmcgui.ListItem(vod_name+' ('+ vod_typename+' / '+vod_remarks+')') - # list_item.setArt({'icon': '123.JPG'}) - # list_item.setInfo('video', {'year': vod['year'], 'title':vod['name'], 'episodeguide': play['name'], 'tracknumber': i}) - a_url = urllib.parse.quote(_api_url) - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address + '?Bot_search_return=' + a_url + '&read_detail=' + vod_id, list_item, True) - # 退出kodi菜单布局 - page = str(int(page) + 1) - list_item = xbmcgui.ListItem('[COLOR yellow]下一页[/COLOR][COLOR blue]【当前第:' + str(res_json['page']) + '页,共计:' + str(res_json['pagecount']) + '页】[/COLOR]') - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address + '?Bot_page=' + _api_url + '&channel_id=' + type_id + '&page_id='+ page, list_item, True) - xbmcplugin.endOfDirectory(handle=_plugin_handle, succeeded=True, updateListing=False, cacheToDisc=True) - else: - print('duola_debug:暂无列表') - _plugin_dialog.notification(heading=_plugin_name, message='当前栏目下列表是空的,请稍后重试', time=3000) - else: - print('duola_debug:列表暂时无法获取') - _plugin_dialog.notification(heading=_plugin_name, message='当前栏目下节目列表暂时无法获取', time=3000) - else: - print('duola_debug:无法解析json') - _plugin_dialog.notification(heading=_plugin_name, message='抱歉,无法解析返回的数据,服务暂时不可用,请稍后重试', time=3000) - -# API->engine get new -def API_get_Cloud_Engine_new(Cache_save_path): - tj_agent = xbmc.getUserAgent() - tj_agent += ' Kodi-Plugin:' + _plugin_address - tj_ua = { 'User-Agent': tj_agent } - # print('duola_debug: api=>' + _plugin_cloud_url, res.text) - try: - res = requests.get(url = _plugin_cloud_url + '?addons=', headers = tj_ua) - cloud_engine_text = res.text - # 写入缓存,降低服务器请求数 - expires_in = 3600 # 初始有效时间为1小时 - if check_json(cloud_engine_text): - api_json = json.loads(cloud_engine_text) - if 'expires_in' in api_json: - expires_in = float(api_json['expires_in']) # 使用服务器限定的有效期 - next_time = datetime.datetime.now() + datetime.timedelta(seconds=expires_in) # 设定时间有效期在n秒后失效 - next_timestamp = str(int(next_time.timestamp())) - with xbmcvfs.File(Cache_save_path, 'w') as f: - time_value = 'next_timestamp=' + next_timestamp # 有效时间 - f.write(time_value) # time - f.write('\n--------\n') # 此处分隔符 - f.write(cloud_engine_text) # json - except requests.exceptions.RequestException as e: - cloud_engine_text = '' - print('duola_debug: API_get_Cloud_Engine_new => BAD', e) - return cloud_engine_text - -# API->engine get -def API_get_Cloud_Engine(): - temp_path= xbmcvfs.translatePath('special://home/temp') - my_addon = xbmcaddon.Addon() - my_addon_id = my_addon.getAddonInfo('id') - my_cache_path = os.path.join(temp_path, my_addon_id, '') - xbmcvfs.mkdirs(my_cache_path) - if xbmcvfs.exists(my_cache_path): - print('duola_debug: 缓存目录读取成功->' + my_cache_path ) - my_cloud_engine_cache = os.path.join(my_cache_path, 'Duola_Local_Search_Engine.txt') - if xbmcvfs.exists(my_cloud_engine_cache): - cloud_engine_text = "" - with xbmcvfs.File(my_cloud_engine_cache) as f: - cache = f.read() - a = cache.split('--------') - a101 = a[1] # json text - b = a[0].split('timestamp=') - cc = b[1].replace('\n', '') # next_timestamp=1640507115 - print(b, cc) - next_timestamp = int(cc) - this_timestamp = int(datetime.datetime.now().timestamp()) - print('this_timestamp:'+str(this_timestamp)+',next_timestamp:' + str(next_timestamp), cloud_engine_text) - if this_timestamp < next_timestamp: - print('duola_debug: 从本地读取引擎数据->' + my_cloud_engine_cache) - cloud_engine_text = a101 # 使用缓存 - else: - print('duola_debug: 从云端刷新引擎数据->' + _plugin_cloud_url) - cloud_engine_text = API_get_Cloud_Engine_new(my_cloud_engine_cache) # 重新获取 - else: - print('duola_debug: 从云端拉取引擎数据->' + _plugin_cloud_url) - cloud_engine_text = API_get_Cloud_Engine_new(my_cloud_engine_cache) - # ----- 解析json ------ - if check_json(cloud_engine_text): - api = json.loads(cloud_engine_text) - #print('duola_debug:zy code' + str(api['code'] )) - #print('duola_debug:zy data_list' + str(len(api['data']['list'])) ) - if api['code'] == 1 and len(api['data']['list']) > 0: - print('duola_debug:zy YES') - for zy in api['data']['list']: - # print('duola_debug:zy' + zy['name'] + '@' + zy['api_url']) - if zy['status'] == 1: - _api_url = urllib.parse.quote(base64.b64decode(zy['api_url'])) # base64 解码后,再URL编码 - _api_title = ' [COLOR yellow] (' + zy['name'] + ') [/COLOR]' - listitem=xbmcgui.ListItem('哆啦搜索' + _api_title) - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address+'?Bot_engine='+_api_url, listitem, True) - else: - _api_title = ' [COLOR blue] (' + zy['name'] + ') ' + ' 暂不可用[/COLOR]' - listitem=xbmcgui.ListItem('哆啦搜索' + _api_title) - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address, listitem, True) - else: - _plugin_dialog.notification(heading=_plugin_name, message='云端搜索引擎暂时出现故障,请稍后重试' + api['message'], time=3000) - else: - _plugin_dialog.notification(heading=_plugin_name, message='暂时无法连接云端搜索引擎服务器,请稍后重试', time=3000) - # ----- 解析json ------ - else: - print('duola_debug: 缓存目录读取失败->' + my_cache_path ) - _plugin_dialog.ok(_plugin_name, '抱歉,由于缓存无法读写,因此云端引擎不可用。文件地址:' + my_cache_path) - -# API->Notice -def API_get_Cloud_Notice(): - tj_agent = xbmc.getUserAgent() - tj_agent += ' Kodi-Plugin:' + _plugin_address - tj_ua = { 'User-Agent': tj_agent } - # print('duola_debug: api=>' + _plugin_cloud_url, res.text) - try: - res = requests.get(url = _plugin_cloud_url + '?addons=', headers = tj_ua) - cloud_engine_text = res.text - if check_json(cloud_engine_text): - api_json = json.loads(cloud_engine_text) - notice = base64.b64decode(api_json['notice']) - client = str(api_json['client']) - _plugin_dialog.notification(heading=_plugin_name+' 最新版本: '+client, message=notice, time=4000) - except requests.exceptions.RequestException as e: - print('duola_debug: notice => bad', e) - -# / -if _plugin_parm == '': - # print('duola_debug:'+ xbmcplugin.getSetting(_plugin_handle, 'Duola_Cloud_Search_Engine') ) - enable_cloud = xbmcplugin.getSetting(_plugin_handle, 'Duola_Cloud_Search_Engine') - _b = "" - # add cloud menu - if enable_cloud == 'true': - _b = ' (本机内置接口)' - API_get_Cloud_Notice() - API_get_Cloud_Engine() - # add local menu - _local_api_url = xbmcplugin.getSetting(_plugin_handle, 'Duola_Local_Search_Engine') - _api_url = urllib.parse.quote(_local_api_url) - listitem=xbmcgui.ListItem('哆啦搜索' + _b) - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address+'?Bot_engine='+_api_url, listitem, True) - # add help menu - listitem=xbmcgui.ListItem('[COLOR=blue]使用帮助[/COLOR]') - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address+'?Bot_help', listitem, True) - # exit menu build - xbmcplugin.endOfDirectory(handle=_plugin_handle, succeeded=True, updateListing=False, cacheToDisc=True) - -# /?Bot_help -if '?Bot_help' in _plugin_parm: - help_text = '1, 选择在线搜索搜索中文时, 请确保已安装kodi中文输入法\n' - help_text += '2, 本机内置接口允许您自由修改,可通过插件设置修改内置接口\n' - help_text += '3, 通过插件设置开启云端搜索引擎接口可连接更多通道\n' - help_text += '4, 首次播放缓冲较慢,耐心等待后播放就会流畅。\n' - help_text += '更多内容请参照本插件介绍页' - _plugin_dialog.ok(_plugin_name + '使用帮助', help_text) - -# /?Bot_engine=https%3A%2F%2F123.com%2Fapi%2Fprovide%2Fvod%2F :: 云引擎 -if '?Bot_engine=' in _plugin_parm: - _parm_url = urllib.parse.unquote(_plugin_parm) - engine_url = _parm_url.split("Bot_engine=")[1] - listitem=xbmcgui.ListItem('[COLOR yellow]在线搜索[/COLOR]') - xbmcplugin.addDirectoryItem(_plugin_handle, _plugin_address+'?Bot_search='+engine_url, listitem, True) - Web_load_channels(engine_url) - xbmcplugin.endOfDirectory(handle=_plugin_handle, succeeded=True, updateListing=False, cacheToDisc=True) - -# /?Bot_search=https%3A%2F%2F123.com%2Fapi%2Fprovide%2Fvod%2F -if '?Bot_search=' in _plugin_parm: - _parm_url = urllib.parse.unquote(_plugin_parm) - engine_url = _parm_url.split("Bot_search=")[1] - keyboard = xbmc.Keyboard() - keyboard.setHeading('请输入关键词') - keyboard.doModal() - # xbmc.sleep(1500) - if keyboard.isConfirmed(): - keyword = keyboard.getText() - if len(keyword) < 1: - msgbox = _plugin_dialog.ok(_plugin_name, '您必须输入关键词才可以搜索相关内容') - else: - keyword = '' - print('duola_debug:' + keyword) - if len(keyword) > 0: - Web_load_search(engine_url, keyword) - -# /?Bot_channel=https%3A%2F%2F123.com%2Fapi%2Fprovide%2Fvod%2F&channel_id=123 -if '?Bot_channel=' in _plugin_parm and '&channel_id=' in _plugin_parm: - _parm_url = urllib.parse.unquote(_plugin_parm) - channel_id = _parm_url.split("&channel_id=")[1] - engine_url = _parm_url.replace('&channel_id=' + channel_id, '').split("Bot_channel=")[1] - print('dlca', engine_url, channel_id) - if channel_id != "": - Web_load_list(engine_url, channel_id, '1') - else: - print('duola_debug:传入的 channel_id 地址为空') - _plugin_dialog.notification(heading=_plugin_name, message='此栏目无效', time=3000) - - -# /?Bot_page=https%3A%2F%2F123.com%2Fapi%2Fprovide%2Fvod%2F&channel_id=123&page_id=2 -if '?Bot_page=' in _plugin_parm and '&channel_id=' in _plugin_parm and '&page_id=' in _plugin_parm: - _parm_url = urllib.parse.unquote(_plugin_parm) - page = _parm_url.split("&page_id=")[1] - channel_id = _parm_url.replace('&page_id=' + page, '').split("&channel_id=")[1] - engine_url = _parm_url.replace('&channel_id=' + channel_id + '&page_id=' + page, '').split("Bot_page=")[1] - print('dlcb', engine_url, channel_id, page) - if channel_id != "": - Web_load_list(engine_url, channel_id, page) - else: - print('duola_debug:传入的 channel_id 地址为空') - _plugin_dialog.notification(heading=_plugin_name, message='此栏目无效', time=3000) - - -# /?Bot_search_return=https%3A%2F%2F123.com%2Fapi%2Fprovide%2Fvod%2F&read_detail=123 -if '?Bot_search_return=' in _plugin_parm and '&read_detail' in _plugin_parm: - _parm_url = urllib.parse.unquote(_plugin_parm) - detail_id = _parm_url.split("&read_detail=")[1] - engine_url = _parm_url.replace('&read_detail='+detail_id, '').split("Bot_search_return=")[1] - print('dlc', engine_url, detail_id) - if detail_id != "": - this_list = Web_load_detail_one(engine_url, detail_id) - else: - print('duola_debug:传入的 read_detail 地址为空') - _plugin_dialog.notification(heading=_plugin_name, message='此视频信息无效', time=3000) diff --git a/plugin.video.duolasousuo/resources/1.png b/plugin.video.duolasousuo/resources/1.png deleted file mode 100644 index 3b760ab..0000000 Binary files a/plugin.video.duolasousuo/resources/1.png and /dev/null differ diff --git a/plugin.video.duolasousuo/resources/2.png b/plugin.video.duolasousuo/resources/2.png deleted file mode 100644 index 26099de..0000000 Binary files a/plugin.video.duolasousuo/resources/2.png and /dev/null differ diff --git a/plugin.video.duolasousuo/resources/3.png b/plugin.video.duolasousuo/resources/3.png deleted file mode 100644 index 1688966..0000000 Binary files a/plugin.video.duolasousuo/resources/3.png and /dev/null differ diff --git a/plugin.video.duolasousuo/resources/4.png b/plugin.video.duolasousuo/resources/4.png deleted file mode 100644 index 20b0121..0000000 Binary files a/plugin.video.duolasousuo/resources/4.png and /dev/null differ diff --git a/plugin.video.duolasousuo/resources/hello.jpg b/plugin.video.duolasousuo/resources/hello.jpg deleted file mode 100644 index 60a4766..0000000 Binary files a/plugin.video.duolasousuo/resources/hello.jpg and /dev/null differ diff --git a/plugin.video.duolasousuo/resources/language/resource.language.en_gb/strings.po b/plugin.video.duolasousuo/resources/language/resource.language.en_gb/strings.po deleted file mode 100644 index ec859a6..0000000 --- a/plugin.video.duolasousuo/resources/language/resource.language.en_gb/strings.po +++ /dev/null @@ -1,46 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: /script.video.duolasousuo\n" -"POT-Creation-Date: 2021-12-25 14:00+0300\n" -"PO-Revision-Date: 2021-12-25 14:00+0200\n" -"Last-Translator: Malimaliao\n" -"Language-Team: Malimaliao\n" -"Language: en_gb\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -# 3010x -msgctxt "#30100" -msgid "Basic config" -msgstr "" - -msgctxt "#30101" -msgid "Player style" -msgstr "" - -msgctxt "#30102" -msgid "Server config" -msgstr "" - -msgctxt "#30103" -msgid "Cloud Search Engine" -msgstr "" - -msgctxt "#30104" -msgid "Local Search Engine" -msgstr "" - -#3000x -msgctxt "#30001" -msgid "List Mode" -msgstr "" - -msgctxt "#30002" -msgid "Movie Mode" -msgstr "" - -msgctxt "#30003" -msgid "TV Mode" -msgstr "" \ No newline at end of file diff --git a/plugin.video.duolasousuo/resources/language/resource.language.zh_cn/strings.po b/plugin.video.duolasousuo/resources/language/resource.language.zh_cn/strings.po deleted file mode 100644 index db137d8..0000000 --- a/plugin.video.duolasousuo/resources/language/resource.language.zh_cn/strings.po +++ /dev/null @@ -1,52 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: /script.video.duolasousuo\n" -"POT-Creation-Date: 2021-12-25 14:00+0300\n" -"PO-Revision-Date: 2021-12-25 14:00+0200\n" -"Last-Translator: Malimaliao\n" -"Language-Team: Malimaliao\n" -"Language: zh_cn\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -# https://kodi.wiki/view/Language_support -# 字符串 30000 到 30999 保留用于插件和插件设置 -# 字符串 31000 到 31999 保留给皮肤 -# 为脚本保留的字符串 32000 到 32999 -# 字符串 33000 到 33999 保留用于附加组件中使用的常用字符串 - -# 3010x -msgctxt "#30100" -msgid "Basic config" -msgstr "基本设置" - -msgctxt "#30101" -msgid "Player style" -msgstr "播放显示风格" - -msgctxt "#30102" -msgid "Server config" -msgstr "服务器设置" - -msgctxt "#30103" -msgid "Cloud Search Engine" -msgstr "使用云端搜索引擎" - -msgctxt "#30104" -msgid "Local Search Engine" -msgstr "内置搜索引擎接口" - -#3000x -msgctxt "#30001" -msgid "List Mode" -msgstr "列表模式" - -msgctxt "#30002" -msgid "Movie Mode" -msgstr "影院模式" - -msgctxt "#30003" -msgid "TV Mode" -msgstr "剧集模式(推荐)" \ No newline at end of file diff --git a/plugin.video.duolasousuo/resources/settings.xml b/plugin.video.duolasousuo/resources/settings.xml deleted file mode 100644 index 23e2b06..0000000 --- a/plugin.video.duolasousuo/resources/settings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file