From a14e61a7fb731c7b689f87775f0955197b9c7f20 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 16 Oct 2025 10:53:26 +0800 Subject: [PATCH] bugfix --- models/mysql.ddl.sql | 60 +++++++++++++++++++++++++ wwwroot/api/newest_channels.dspy | 25 +++++++++++ wwwroot/header.ui | 30 ++++++++----- wwwroot/imgs/channelsearch.svg | 1 + wwwroot/imgs/newestchannels.svg | 3 ++ wwwroot/index.ui | 2 +- wwwroot/iptvsource.md | 6 +-- wwwroot/newest/.index.ui.swp | Bin 0 -> 12288 bytes wwwroot/newest/index.ui | 61 ++++++++++++++++++++++++++ wwwroot/searchchannels/dc_channels.ui | 60 +++++++++++++++++++++++++ wwwroot/searchchannels/index.ui | 36 +++++++++++++++ wwwroot/searchchannels/search.ui | 25 +++++++++++ 12 files changed, 293 insertions(+), 16 deletions(-) create mode 100755 wwwroot/api/newest_channels.dspy create mode 100644 wwwroot/imgs/channelsearch.svg create mode 100644 wwwroot/imgs/newestchannels.svg create mode 100644 wwwroot/newest/.index.ui.swp create mode 100644 wwwroot/newest/index.ui create mode 100644 wwwroot/searchchannels/dc_channels.ui create mode 100644 wwwroot/searchchannels/index.ui create mode 100644 wwwroot/searchchannels/search.ui diff --git a/models/mysql.ddl.sql b/models/mysql.ddl.sql index 2f63d92..ce096a9 100644 --- a/models/mysql.ddl.sql +++ b/models/mysql.ddl.sql @@ -1,4 +1,39 @@ +-- ./iptvchannels.xlsx + + + + + +drop table if exists iptvchannels; +CREATE TABLE iptvchannels +( + + `id` VARCHAR(32) comment '编号', + `tv_group` VARCHAR(500) comment '频道组', + `tv_name` VARCHAR(500) comment '频道名称', + `logo_url` VARCHAR(1000) comment '台标url', + `url` VARCHAR(1000) comment 'url', + `media_type` VARCHAR(100) comment '媒体类型', + `download_date` VARCHAR(10) comment '下载日期', + `channel_delay` int comment '频道延迟', + `channel_grade` int comment '频道等级', + `del_flg` VARCHAR(1) comment '删除标志' + + +,primary key(id) + + +) +engine=innodb +default charset=utf8 +comment 'IPTV频道清单' +; + +CREATE INDEX iptvchannels_idx1 ON iptvchannels(tv_group); +CREATE INDEX iptvchannels_idx2 ON iptvchannels(tv_name); +CREATE UNIQUE INDEX iptvchannels_idx3 ON iptvchannels(url); + -- ./badchannels.xlsx @@ -24,4 +59,29 @@ comment '坏频道' ; +-- ./device.xlsx + + + + + +drop table if exists device; +CREATE TABLE device +( + + `id` VARCHAR(32) comment 'id', + `name` VARCHAR(255) comment '设备名称', + `takeover_flg` VARCHAR(1) comment '接管标志', + `userid` VARCHAR(32) comment '用户id' + + +,primary key(id) + + +) +engine=innodb +default charset=utf8 +comment '设备表' +; + diff --git a/wwwroot/api/newest_channels.dspy b/wwwroot/api/newest_channels.dspy new file mode 100755 index 0000000..70cba57 --- /dev/null +++ b/wwwroot/api/newest_channels.dspy @@ -0,0 +1,25 @@ +sql = "select * from iptvchannels where del_flg='0'" +ns = { +} +ns = params_kw.copy() +ns['sort'] = 'tv_name' +parts = [] +tv_name = params_kw.get('tv_name', None) +if tv_name: + tv_name = '%' + tv_name + '%' + parts.append(' tv_name like ${tv_name}$ ') + ns['tv_name'] = tv_name + +if len(parts) > 0: + sql += ' and ' + 'and'.join(parts) + +sql += ' order by download_date desc' +db=DBPools() +if not params_kw.get('page'): + ns['page'] = 1 + ns['rows'] = 100 + +async with db.sqlorContext('iptvdb') as sor: + recs = await sor.sqlPaging(sql, ns) + return recs + diff --git a/wwwroot/header.ui b/wwwroot/header.ui index a4187e2..4f834a2 100644 --- a/wwwroot/header.ui +++ b/wwwroot/header.ui @@ -5,12 +5,23 @@ }, "subwidgets":[ { - "widgettype":"Icon", - "options":{ - "url":"{{entire_url('/imgs/atvoe.svg')}}", - "cursor":"pointer", - "rate":1.5 - }, + "widgettype": "HBox", + "options":{}, + "subwidgets":[ + { + "widgettype":"Icon", + "options":{ + "url":"{{entire_url('/imgs/atvoe.svg')}}", + "cursor":"pointer", + "rate":1.5 + } + },{ + "widgettype":"Title6", + "options":{ + "text":"All TV On Earth" + } + } + ], "binds":[ { "wid":"self", @@ -25,13 +36,8 @@ ] }, { - "id":"cur_tag", - "widgettype":"Title4", + "widgettype":"Filler", "options":{ - "height":"auto", - "otext":"全球电视📺", - "i18n":true, - "wrap":true } } ] diff --git a/wwwroot/imgs/channelsearch.svg b/wwwroot/imgs/channelsearch.svg new file mode 100644 index 0000000..2026f62 --- /dev/null +++ b/wwwroot/imgs/channelsearch.svg @@ -0,0 +1 @@ + diff --git a/wwwroot/imgs/newestchannels.svg b/wwwroot/imgs/newestchannels.svg new file mode 100644 index 0000000..fba6e9f --- /dev/null +++ b/wwwroot/imgs/newestchannels.svg @@ -0,0 +1,3 @@ + + + diff --git a/wwwroot/index.ui b/wwwroot/index.ui index bf649d6..189a991 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -27,7 +27,7 @@ { "widgettype":"urlwidget", "options":{ - "url":"{{entire_url('search_channels.ui')}}" + "url":"{{entire_url('tabs.ui')}}" } } ] diff --git a/wwwroot/iptvsource.md b/wwwroot/iptvsource.md index b325c69..5d2e184 100644 --- a/wwwroot/iptvsource.md +++ b/wwwroot/iptvsource.md @@ -1,4 +1,4 @@ -# Where the iptv channels come from +# Source of channels * [iptv](https://github.com/iptv-org/iptv) * [freeiptv](https://github.com/ipstreet312/freeiptv) @@ -9,8 +9,8 @@ * [m3u8-xtream/m3u8-xtream-playlist](https://github.com/m3u8-xtream/m3u8-xtream-playlist) # Legal Disclaimer -The playlists linked on this page are aggregated from various public sources and are provided for informational purposes only. We do not host, upload, or manage any streaming content. The streams are freely available on the internet and were collected from public sources. +The iptv channels on this website are aggregated from various public sources and are provided for informational purposes only. We do not host, upload, or manage any streaming content. The streams are freely available on the internet and were collected from public sources. -Users are responsible for ensuring their usage of these playlists complies with local laws and regulations regarding copyright and content access. We encourage users to support content creators by subscribing to official services. +Users are responsible for ensuring their usage of these iptv channels complies with local laws and regulations regarding copyright and content access. We encourage users to support content creators by subscribing to official services. diff --git a/wwwroot/newest/.index.ui.swp b/wwwroot/newest/.index.ui.swp new file mode 100644 index 0000000000000000000000000000000000000000..b01cbce4b114e25717421f746fd612c8d68ab1d0 GIT binary patch literal 12288 zcmeI2%WD%+6o+pWgi)hK-5Zbb1)8*xYAJ}I2v!h_wF*86)68vVa56K_+$0TS6jyH4 zKcOqpl?blfiHqXSg;Ly!pr{KMBDioP{^pfOyQp0jPUy!>?&I8ZzI$g8I<~18jf|umLu(4h`sr z5N|gN@o@{1$N&Gc-~WHN3-KMi1B>7VSO7Y>0M3Cj*bQ>v_ckHEf+esBUV&%eDR=-v zPy-jiaj*;Iz$PHTmz)sq!AtNMJOcN@JrDv1m|zB+1bMI#{MahQ2k;s^0Sn+ExDBp@ zGhh@P1jFDD>ih+MfN$V4_ypqm*Wvzg%4~oQumLu}2G{@_U;}KRXP_fA{KaTDaFgD4 zFB&y`nnA)2J?$=^8YVr>P6mm*{ZX-pOt>vd~L~&@wvNq%2q=M9@xm zjz+3karC;3q7}mQORt|i-Ph{@O@zrJ4nS+hwxn9GoEMJ6_?$=}#U@Gdrg7=Z#Ru+i#YLt>{d(rBs4soNwsST1%=|oej zwpG2^ZN(t81=5~No8kg#7NJqxwJ7r&NrY&RdV8ahsoPe~!DL&`sZ1}meBFaXe`jTSY+r*uVjx%?+J-BNjm$_bkY*5%2OEPs93&? zY#lsM(mgAE1HMuoRJdKW|M>{*#y{3WUl1DQQSFx=iKB$8Q LpLXp41&87vok&H< literal 0 HcmV?d00001 diff --git a/wwwroot/newest/index.ui b/wwwroot/newest/index.ui new file mode 100644 index 0000000..14201a1 --- /dev/null +++ b/wwwroot/newest/index.ui @@ -0,0 +1,61 @@ +{ + "widgettype":"Cols", + "id":"channel_list", + "options":{ + "width": "100%", + "height": "100%", + "data_url": "{{entire_url('/api/newest_channels.dspy')}}", + "data_params":{ + }, + "data_method":"POST", + "col_cwidth":22, + "record_view":{ + "widgettype":"HBox", + "options":{ + "cwidth":22, + "cheight":5 + }, + "subwidgets":[ + { + "widgettype":"Image", + "options":{ + "cwidth":1.5, + "cheight":1.5, + "url":"${logo_url}", + "default_url":"/imgs/tv.png" + } + }, + { + "widgettype":"Title6", + "options":{ + "text":"${tv_name}", + "wrap": true, + "halign":"left" + } + } + ], + "binds":[ + { + "wid":"self", + "event":"click", + "actiontype":"urlwidget", + "target":"PopupWindow", + "popup_options":{ + "width":"80%", + "height":"80%", + "title":"${tv_name}" + }, + "options":{ + "params":{ + "tv_name": "${tv_name}", + "url":"${url}", + "id":"${id}" + }, + "method": "POST", + "url":"/play.ui" + } + } + ] + } + } +} diff --git a/wwwroot/searchchannels/dc_channels.ui b/wwwroot/searchchannels/dc_channels.ui new file mode 100644 index 0000000..a0ab693 --- /dev/null +++ b/wwwroot/searchchannels/dc_channels.ui @@ -0,0 +1,60 @@ +{ + "widgettype":"Cols", + "id":"channel_list", + "options":{ + "width": "100%", + "height": "100%", + "data_url": "{{entire_url('/api/channels.dspy')}}", + "data_params":{ + }, + "data_method":"POST", + "col_cwidth":22, + "record_view":{ + "widgettype":"HBox", + "options":{ + "cwidth":22, + "cheight":5 + }, + "subwidgets":[ + { + "widgettype":"Image", + "options":{ + "cwidth":1.5, + "cheight":1.5, + "url":"${logo_url}", + "default_url":"/imgs/tv.png" + } + }, + { + "widgettype":"Title6", + "options":{ + "text":"${tv_name}", + "halign":"left" + } + } + ], + "binds":[ + { + "wid":"self", + "event":"click", + "actiontype":"urlwidget", + "target":"PopupWindow", + "popup_options":{ + "width":"80%", + "height":"80%", + "title":"${tv_name}" + }, + "options":{ + "params":{ + "tv_name": "${tv_name}", + "url":"${url}", + "id":"${id}" + }, + "method": "POST", + "url":"/play.ui" + } + } + ] + } + } +} diff --git a/wwwroot/searchchannels/index.ui b/wwwroot/searchchannels/index.ui new file mode 100644 index 0000000..60dd76f --- /dev/null +++ b/wwwroot/searchchannels/index.ui @@ -0,0 +1,36 @@ +{ + "widgettype":"VBox", + "options":{ + "width":"100%", + "height":"100%" + }, + "subwidgets":[ + { + "widgettype":"urlwidget", + "options":{ + "url":"{{entire_url('search.ui')}}" + } + }, + { + "widgettype":"Filler", + "options":{}, + "subwidgets":[ + { + "widgettype":"urlwidget", + "options":{ + "url":"{{entire_url('dc_channels.ui')}}" + } + } + ] + } + ], + "binds":[ + { + "wid":"tv_name", + "event":"changed", + "actiontype":"method", + "target":"channel_list", + "method":"load_first_page" + } + ] +} diff --git a/wwwroot/searchchannels/search.ui b/wwwroot/searchchannels/search.ui new file mode 100644 index 0000000..d32cbeb --- /dev/null +++ b/wwwroot/searchchannels/search.ui @@ -0,0 +1,25 @@ +{ + "widgettype":"HBox", + "options":{ + "height":"40px" + }, + "subwidgets":[ + { + "widgettype":"Text", + "options":{ + "i18n":true, + "width":"120px", + "otext":"Search" + } + }, + { + "id":"tv_name", + "widgettype":"UiStr", + "options":{ + "height":"40px", + "name":"tv_name", + "value":"" + } + } + ] +}