From d81b99416156c4bddae578648a63f01ad0bccaa5 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Fri, 17 Jan 2025 18:28:59 +0300
Subject: [PATCH 1/8] Create check_scripts.sh
---
.husky/check_scripts.sh | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100755 .husky/check_scripts.sh
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
From 80828e544621e9db2ad7bcaedd5c846e08be819a Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Fri, 17 Jan 2025 18:29:03 +0300
Subject: [PATCH 2/8] Create check_channels.sh
---
.husky/check_channels.sh | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100755 .husky/check_channels.sh
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
From 0d45f0835211b0bd8ee5b725ef383264e29eae00 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Fri, 17 Jan 2025 18:29:06 +0300
Subject: [PATCH 3/8] Update pre-commit
---
.husky/pre-commit | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
From 3fbbc0e6db7dcca3a22a31b7849d8c5ae554e15a Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Sat, 18 Jan 2025 14:43:19 +0300
Subject: [PATCH 4/8] Remove wrong xmltv-ids
---
sites/galamtv.kz/galamtv.kz.channels.xml | 10 +++++-----
sites/meo.pt/meo.pt.channels.xml | 12 ++++++------
sites/nostv.pt/nostv.pt.channels.xml | 12 ++++++------
sites/tv.trueid.net/tv.trueid.net_en.channels.xml | 4 ++--
sites/tv.trueid.net/tv.trueid.net_th.channels.xml | 4 ++--
5 files changed, 21 insertions(+), 21 deletions(-)
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
ไทยพีบีเอส
From 426525e3b2aec6caf276c3360ea6e5982d3c52f4 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Sat, 18 Jan 2025 15:16:04 +0300
Subject: [PATCH 5/8] Update lint.mts
---
scripts/commands/channels/lint.mts | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
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)
From 4eb4096692fc6c3a57b038b92e558a48df1c83db Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Sat, 18 Jan 2025 15:16:18 +0300
Subject: [PATCH 6/8] Fix linter issues
---
sites/artonline.tv/artonline.tv.channels.xml | 10 +++++-----
sites/artonline.tv/artonline.tv.config.js | 4 +++-
sites/artonline.tv/artonline.tv.test.js | 2 +-
sites/berrymedia.co.kr/berrymedia.co.kr.channels.xml | 1 -
sites/xem.kplus.vn/xem.kplus.vn.channels.xml | 5 -----
sites/xem.kplus.vn/xem.kplus.vn.config.js | 2 ++
6 files changed, 11 insertions(+), 13 deletions(-)
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/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_', ''),
From 2674459b3519fba0ec80351f6becffd930efa221 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Sun, 19 Jan 2025 01:18:38 +0300
Subject: [PATCH 7/8] Update check.yml
---
.github/workflows/check.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index f8f5b7c6..d6a3158d 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -16,7 +16,6 @@ jobs:
- uses: tj-actions/changed-files@v45
id: files
with:
- since_last_remote_commit: true
files_yaml: |
js:
- tests/**/*.{js,ts}
From 4d0c5c109a45c4d2e15f74b3bef194dede1851a8 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Sun, 19 Jan 2025 01:21:29 +0300
Subject: [PATCH 8/8] Update check.yml
---
.github/workflows/check.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index d6a3158d..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