diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index f8f5b7c6..d1da7386 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -3,6 +3,8 @@ on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]
+ branches:
+ - master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
@@ -16,7 +18,6 @@ jobs:
- uses: tj-actions/changed-files@v45
id: files
with:
- since_last_remote_commit: true
files_yaml: |
js:
- tests/**/*.{js,ts}
diff --git a/.husky/check_channels.sh b/.husky/check_channels.sh
new file mode 100755
index 00000000..f934e7a4
--- /dev/null
+++ b/.husky/check_channels.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+channels_changed="$(git diff --staged --name-only --diff-filter=ACMR -- 'sites/**/*.channels.xml' | sed 's| |\\ |g')"
+
+if [ ! -z "$channels_changed" ]; then
+ echo "npx eslint $channels_changed"
+ npm run channels:lint -- $channels_changed
+fi
\ No newline at end of file
diff --git a/.husky/check_scripts.sh b/.husky/check_scripts.sh
new file mode 100755
index 00000000..a29f7607
--- /dev/null
+++ b/.husky/check_scripts.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+scripts_changed="$(git diff --staged --name-only --diff-filter=ACMR -- 'tests/**/*.ts' 'tests/**/*.js' 'scripts/**/*.ts' 'scripts/**/*.mts' 'scripts/**/*.js' 'sites/**/*.js' 'sites/**/*.ts' | sed 's| |\\ |g')"
+
+if [ ! -z "$scripts_changed" ]; then
+ echo "npx eslint $scripts_changed"
+ npx eslint $scripts_changed
+fi
\ No newline at end of file
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 3c60e992..ac5a8377 100644
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,2 +1,2 @@
-npm run lint
-npm run channels:lint
+.husky/check_scripts.sh
+.husky/check_channels.sh
\ No newline at end of file
diff --git a/scripts/commands/channels/lint.mts b/scripts/commands/channels/lint.mts
index b8e5f859..ad27fcb6 100644
--- a/scripts/commands/channels/lint.mts
+++ b/scripts/commands/channels/lint.mts
@@ -14,13 +14,34 @@ const xsd = `
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`
program.argument('[filepath]', 'Path to *.channels.xml files to check').parse(process.argv)
diff --git a/sites/artonline.tv/artonline.tv.channels.xml b/sites/artonline.tv/artonline.tv.channels.xml
index 9bcdf1fb..03629de6 100644
--- a/sites/artonline.tv/artonline.tv.channels.xml
+++ b/sites/artonline.tv/artonline.tv.channels.xml
@@ -1,8 +1,8 @@
- افلام 1
- افلام 2
- سينما
- حكايات
- حكايات 2
+ افلام 1
+ افلام 2
+ سينما
+ حكايات
+ حكايات 2
\ No newline at end of file
diff --git a/sites/artonline.tv/artonline.tv.config.js b/sites/artonline.tv/artonline.tv.config.js
index 4513751e..2b9fe78c 100644
--- a/sites/artonline.tv/artonline.tv.config.js
+++ b/sites/artonline.tv/artonline.tv.config.js
@@ -13,7 +13,9 @@ module.exports = {
site: 'artonline.tv',
days: 2,
url: function ({ channel }) {
- return `https://www.artonline.tv/Home/Tvlist${channel.site_id}`
+ const [, site_id] = channel.site_id.split('#')
+
+ return `https://www.artonline.tv/Home/Tvlist${site_id}`
},
request: {
method: 'POST',
diff --git a/sites/artonline.tv/artonline.tv.test.js b/sites/artonline.tv/artonline.tv.test.js
index 315f056f..121f4ad5 100644
--- a/sites/artonline.tv/artonline.tv.test.js
+++ b/sites/artonline.tv/artonline.tv.test.js
@@ -6,7 +6,7 @@ dayjs.extend(customParseFormat)
dayjs.extend(utc)
const channel = {
- site_id: 'Aflam2',
+ site_id: '#Aflam2',
xmltv_id: 'ARTAflam2.sa'
}
diff --git a/sites/berrymedia.co.kr/berrymedia.co.kr.channels.xml b/sites/berrymedia.co.kr/berrymedia.co.kr.channels.xml
index fa4a0c7a..8ca0586c 100644
--- a/sites/berrymedia.co.kr/berrymedia.co.kr.channels.xml
+++ b/sites/berrymedia.co.kr/berrymedia.co.kr.channels.xml
@@ -3,7 +3,6 @@
BallTV
CookTV
GMTV
- GTV
생활체육TV
UHDDreamTV
diff --git a/sites/galamtv.kz/galamtv.kz.channels.xml b/sites/galamtv.kz/galamtv.kz.channels.xml
index f2a04103..7b167299 100644
--- a/sites/galamtv.kz/galamtv.kz.channels.xml
+++ b/sites/galamtv.kz/galamtv.kz.channels.xml
@@ -6,16 +6,16 @@
Balapan
Munara TV
Turan TV
- Седьмой канал
+ Седьмой канал
31 Канал
Ел Арна
Almaty TV
Jibek Joly
Новое Телевидение
- Жетысу
- твоЁтв
+ Жетысу
+ твоЁтв
Мир 24
- Hit TV
+ Hit TV
Первый канал Евразия
Atameken Business
ТДК 42
@@ -26,5 +26,5 @@
Astana TV
НТК
Caspian News
- INSPORT
+ INSPORT
diff --git a/sites/meo.pt/meo.pt.channels.xml b/sites/meo.pt/meo.pt.channels.xml
index b39caece..cbba2ab4 100644
--- a/sites/meo.pt/meo.pt.channels.xml
+++ b/sites/meo.pt/meo.pt.channels.xml
@@ -125,12 +125,12 @@
Disney Junior
Deutsche Welle (A)
DEUTSCHE WELLE
- DAZN Eleven 1
- DAZN Eleven 2
- DAZN Eleven 3
- DAZN Eleven 4
- DAZN Eleven 5
- DAZN Eleven 6
+ DAZN Eleven 1
+ DAZN Eleven 2
+ DAZN Eleven 3
+ DAZN Eleven 4
+ DAZN Eleven 5
+ DAZN Eleven 6
Euronews
Fight Sports
France 2
diff --git a/sites/nostv.pt/nostv.pt.channels.xml b/sites/nostv.pt/nostv.pt.channels.xml
index 6464147f..bc5ac5ab 100644
--- a/sites/nostv.pt/nostv.pt.channels.xml
+++ b/sites/nostv.pt/nostv.pt.channels.xml
@@ -57,12 +57,12 @@
DW (Alemão)
DW
E! Entertainment HD
- ELEVEN SPORTS 1
- ELEVEN SPORTS 2
- ELEVEN SPORTS 3
- ELEVEN SPORTS 4
- ELEVEN SPORTS 5
- ELEVEN SPORTS 6
+ ELEVEN SPORTS 1
+ ELEVEN SPORTS 2
+ ELEVEN SPORTS 3
+ ELEVEN SPORTS 4
+ ELEVEN SPORTS 5
+ ELEVEN SPORTS 6
Euronews
Eurosport 1 HD
Eurosport 2
diff --git a/sites/tv.trueid.net/tv.trueid.net_en.channels.xml b/sites/tv.trueid.net/tv.trueid.net_en.channels.xml
index 1ef67d80..acded78d 100644
--- a/sites/tv.trueid.net/tv.trueid.net_en.channels.xml
+++ b/sites/tv.trueid.net/tv.trueid.net_en.channels.xml
@@ -97,7 +97,7 @@
Amarin TV
beIN SPORTS 1
beIN SPORTS 2
- Channel 3
+ Channel 3
Channel 7HD
Channel 8
Crime + Investigation
@@ -107,7 +107,7 @@
MONO 29
Nation TV
NBT
- One31
+ One31
PPTV
SPOTV 2
Thai PBS
diff --git a/sites/tv.trueid.net/tv.trueid.net_th.channels.xml b/sites/tv.trueid.net/tv.trueid.net_th.channels.xml
index c44f2cc1..7a82ff70 100644
--- a/sites/tv.trueid.net/tv.trueid.net_th.channels.xml
+++ b/sites/tv.trueid.net/tv.trueid.net_th.channels.xml
@@ -97,7 +97,7 @@
อมรินทร์
บีอินสปอตส์ 1
บีอินสปอตส์ 2
- ช่อง 3 HD
+ ช่อง 3 HD
ช่อง 7HD
ช่อง 8
ไคร์ม แอนด์ อินเวสทิเกชั่น
@@ -107,7 +107,7 @@
โมโน 29
เนชั่น ทีวี
เอ็นบีที
- วัน HD
+ วัน HD
พีพีทีวี
SPOTV 2
ไทยพีบีเอส
diff --git a/sites/xem.kplus.vn/xem.kplus.vn.channels.xml b/sites/xem.kplus.vn/xem.kplus.vn.channels.xml
index b8a21f15..8b468de6 100644
--- a/sites/xem.kplus.vn/xem.kplus.vn.channels.xml
+++ b/sites/xem.kplus.vn/xem.kplus.vn.channels.xml
@@ -77,9 +77,4 @@
HA GIANG
VTV7
ON O2TV
- K+SPORT1
- K+SPORT2
- K+CINE
- K+ACTION
- K+KIDS
diff --git a/sites/xem.kplus.vn/xem.kplus.vn.config.js b/sites/xem.kplus.vn/xem.kplus.vn.config.js
index aae7cf4c..e648ca2f 100644
--- a/sites/xem.kplus.vn/xem.kplus.vn.config.js
+++ b/sites/xem.kplus.vn/xem.kplus.vn.config.js
@@ -74,6 +74,8 @@ module.exports = {
let channels = []
await doFetch(queue, (url, data) => {
data.assets.forEach(channel => {
+ if (!channel?.params?.params?.id) return
+
channels.push({
lang: 'vi',
name: channel.params.internalTitle.replace('Channels_', ''),