fix programetv.ro checking, continue uniformizing

This commit is contained in:
theofficialomega
2025-07-27 18:10:22 +02:00
parent 5be8899520
commit f3a3a8c404
44 changed files with 193 additions and 154 deletions

View File

@@ -0,0 +1 @@
[{ "Event_id": "0x6a57", "Start_time": "2024年07月27日05時00分00秒", "Duration": "01:00:00", "Event_name": "ヒーリングタイム&ヘッドラインニュース", "Event_text": "ねこの足跡", "Component": "480i 16:9 パンベクトルなし", "Sound": "ステレオ", "Event_detail": ""}]

View File

@@ -1,4 +1,6 @@
const { parser, url } = require('./s.mxtv.jp.config.js')
const fs = require('fs')
const path = require('path')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
const customParseFormat = require('dayjs/plugin/customParseFormat')
@@ -11,8 +13,6 @@ const channel = {
name: 'Tokyo MX2',
xmltv_id: 'TokyoMX2.jp'
}
const content =
'[{ "Event_id": "0x6a57", "Start_time": "2024年07月27日05時00分00秒", "Duration": "01:00:00", "Event_name": "ヒーリングタイム&ヘッドラインニュース", "Event_text": "ねこの足跡", "Component": "480i 16:9 パンベクトルなし", "Sound": "ステレオ", "Event_detail": ""}]'
it('can generate valid url', () => {
const result = url({ date, channel })
@@ -20,6 +20,7 @@ it('can generate valid url', () => {
})
it('can parse response', () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
const result = parser({ date, channel, content }).map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()