mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 02:16:40 -05:00
minor fixes, delete unused files
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaComedy.it" site_id="DTH#9039">Sky Cinema Comedy</channel>
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaDrama.it" site_id="DTH#10518">Sky Cinema Drama</channel>
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaDue.it" site_id="DTH#9034">Sky Cinema Due</channel>
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaDuePlus24.it" site_id="DTH#10517">Sky Cinema Due +24</channel>
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaDue.it@Plus24" site_id="DTH#10517">Sky Cinema Due +24</channel>
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaFamily.it" site_id="DTH#9042">Sky Cinema Family</channel>
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaRomance.it" site_id="DTH#9055">Sky Cinema Romance</channel>
|
||||
<channel site="guidatv.sky.it" lang="it" xmltv_id="SkyCinemaSuspense.it" site_id="DTH#10515">Sky Cinema Suspense</channel>
|
||||
|
||||
@@ -44,7 +44,7 @@ module.exports = {
|
||||
lang: 'it',
|
||||
site_id: `DTH#${ch.id}`,
|
||||
name: ch.name,
|
||||
xmltv_id: ch.name.replace(/ |HD|\+1/g, '') + num + '.it' + feeds,
|
||||
xmltv_id: ch.name.replace(/ |HD|\+1|\+24/g, '') + num + '.it' + feeds,
|
||||
}
|
||||
})
|
||||
return channels
|
||||
|
||||
@@ -11,7 +11,7 @@ dayjs.extend(utc)
|
||||
const date = dayjs.utc('2025-07-30', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: 'a1p',
|
||||
xmltv_id: 'ArenaSportPremium1.rs'
|
||||
xmltv_id: 'ArenaSport1Premium.rs'
|
||||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"data":{"duration":"240","providerId":"9100001138","startTime":"1736640000","items":[{"channel":{"fullName":"CBS National Schedule","name":"CBS","number":null,"sourceId":9200018514,"legacySourceId":null,"networkName":"CBS","networkId":1,"logo":"/provider/8/4/8-9200018514.png"},"programSchedules":[{"airingAttrib":524304,"catId":5,"startTime":1736643600,"endTime":1736647200,"programId":9000351140,"title":"FBI: International","rating":null,"programDetails":"https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000351140/web"},{"airingAttrib":524304,"catId":5,"startTime":1736647200,"endTime":1736650800,"programId":9000317198,"title":"FBI: Most Wanted","rating":null,"programDetails":"https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000317198/web"},{"airingAttrib":524308,"catId":5,"startTime":1736650800,"endTime":1736654400,"programId":9000415495,"title":"48 Hours","rating":null,"programDetails":"https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000415495/web"}]}]},"links":{"self":{"href":"https://backend.tvguide.com/tvschedules/tvguide/9100001138/web?start=1736640000&duration=240&apiKey=DI9elXhZ3bU6ujsA2gXEKOANyncXGUGc"},"prev":{"href":"https://backend.tvguide.com/tvschedules/tvguide/9100001138/web?start=1736625600&duration=240&apiKey=DI9elXhZ3bU6ujsA2gXEKOANyncXGUGc"},"next":{"href":"https://backend.tvguide.com/tvschedules/tvguide/9100001138/web?start=1736654400&duration=240&apiKey=DI9elXhZ3bU6ujsA2gXEKOANyncXGUGc"}},"meta":{"componentName":null,"componentDisplayName":null,"componentType":null}}
|
||||
@@ -1 +0,0 @@
|
||||
{"data":{"duration":"240","providerId":"9100001138","startTime":"1736654400","items":[{"channel":{"fullName":"CBS National Schedule","name":"CBS","number":null,"sourceId":9200018514,"legacySourceId":null,"networkName":"CBS","networkId":1,"logo":"/provider/8/4/8-9200018514.png"},"programSchedules":[{"airingAttrib":524288,"catId":5,"startTime":1736654400,"endTime":1736661600,"programId":9000000408,"title":"Local Programs","rating":null,"programDetails":"https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000000408/web"},{"airingAttrib":524288,"catId":5,"startTime":1736661600,"endTime":1736668800,"programId":9000000408,"title":"Local Programs","rating":null,"programDetails":"https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000000408/web"}]}]},"links":{"self":{"href":"https://backend.tvguide.com/tvschedules/tvguide/9100001138/web?start=1736654400&duration=240&apiKey=DI9elXhZ3bU6ujsA2gXEKOANyncXGUGc"},"prev":{"href":"https://backend.tvguide.com/tvschedules/tvguide/9100001138/web?start=1736640000&duration=240&apiKey=DI9elXhZ3bU6ujsA2gXEKOANyncXGUGc"},"next":{"href":"https://backend.tvguide.com/tvschedules/tvguide/9100001138/web?start=1736668800&duration=240&apiKey=DI9elXhZ3bU6ujsA2gXEKOANyncXGUGc"}},"meta":{"componentName":null,"componentDisplayName":null,"componentType":null}}
|
||||
@@ -1 +0,0 @@
|
||||
{"data":{"item":{"id":9000351140,"name":"FBI: International","isSportsEvent":false,"tvRating":"TV-14","categoryId":5,"subCategoryId":0,"episodeNumber":12,"mcoId":1060026058,"title":"FBI: International","type":"show","slug":"fbi-international","typeId":1,"images":[{"id":"2-da3822c4eec5e6100c9b6ff2ac667213","provider":"2","imageType":{"typeId":1,"typeName":"showcard","providerTypeName":"showcard"},"bucketType":"catalog","bucketPath":"/provider/2/13/2-da3822c4eec5e6100c9b6ff2ac667213.jpg","filename":"","width":3840,"height":2160},{"id":"2-d7bbccddf55702be0028e4c7b37d91d2","provider":"2","imageType":{"typeId":2,"typeName":"poster art","providerTypeName":"poster art"},"bucketType":"catalog","bucketPath":"/provider/2/2/2-d7bbccddf55702be0028e4c7b37d91d2.jpg","filename":"","width":1400,"height":2100}],"genres":[{"id":3,"name":"Action & Adventure","genres":["Action","Adventure"]},{"id":5,"name":"Suspense","genres":["Crime","Mystery","Thriller"]},{"id":1,"name":"Drama","genres":["Drama"]}],"metacriticSummary":null,"video":null,"parentId":1060026058,"description":"The owner of a prominent cyber security company is murdered in Copenhagen just before a massive data leak surfaces online, leading the NSA to ask the team for assistance in catching the killer and leaker before more data is revealed.","rating":"L","episodeTitle":"Gift","releaseYear":2024,"seoUrl":null,"episodeAirDate":"/Date(1715644800000)/","seasonNumber":3,"duration":null}},"links":{"self":{"href":"https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000351140/web"}},"meta":{"componentName":null,"componentDisplayName":null,"componentType":null}}
|
||||
@@ -1 +0,0 @@
|
||||
{"data":{"item":{"id":9000000408,"name":"Local Programs","isSportsEvent":false,"tvRating":"TV-14","categoryId":5,"subCategoryId":0,"episodeNumber":null,"mcoId":null,"title":null,"type":null,"slug":null,"typeId":null,"images":[],"genres":[],"metacriticSummary":null,"video":null,"parentId":null,"description":"Local programming information.","rating":"L","episodeTitle":"Local Programs","releaseYear":null,"seoUrl":null,"episodeAirDate":null,"seasonNumber":null,"duration":null}},"links":{"self":{"href":"https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000000408/web"}},"meta":{"componentName":null,"componentDisplayName":null,"componentType":null}}
|
||||
@@ -13,14 +13,14 @@ jest.mock('axios')
|
||||
const date = dayjs.utc('2025-07-29', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: '9200004683',
|
||||
xmltv_id: 'NatGeoWild.us'
|
||||
xmltv_id: 'NationalGeographicWild.us@East'
|
||||
}
|
||||
|
||||
it('can generate valid url', async () => {
|
||||
axios.get.mockImplementation(url => {
|
||||
if (url === 'https://www.tvguide.com/listings/') {
|
||||
return Promise.resolve({
|
||||
data: 'html_apiKey=DI9elXhZ3bU6ujsA2gXEKOANyncXGUGc&...'
|
||||
data: fs.readFileSync(path.join(__dirname, '__data__', 'content.html'), 'utf8')
|
||||
})
|
||||
}
|
||||
throw new Error(`Unexpected URL: ${url}`)
|
||||
@@ -33,7 +33,7 @@ it('can generate valid url', async () => {
|
||||
})
|
||||
|
||||
it('can parse response', async () => {
|
||||
const content = JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/content.json'), 'utf-8'))
|
||||
const content = JSON.parse(fs.readFileSync(path.join(__dirname, '__data__', 'content.json'), 'utf-8'))
|
||||
|
||||
axios.get.mockImplementation(url => {
|
||||
if (
|
||||
@@ -41,7 +41,7 @@ it('can parse response', async () => {
|
||||
'https://backend.tvguide.com/tvschedules/tvguide/programdetails/9000058285/web'
|
||||
) {
|
||||
return Promise.resolve({
|
||||
data: JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/program.json')))
|
||||
data: JSON.parse(fs.readFileSync(path.join(__dirname, '__data__', 'program.json')))
|
||||
})
|
||||
} else {
|
||||
return Promise.resolve({ data: '' })
|
||||
@@ -72,7 +72,7 @@ it('can handle empty guide', async () => {
|
||||
const results = await parser({
|
||||
date,
|
||||
channel,
|
||||
content: fs.readFileSync(path.resolve(__dirname, '__data__/no-content.json'))
|
||||
content: fs.readFileSync(path.join(__dirname, '__data__', 'no-content.json'))
|
||||
})
|
||||
expect(results).toMatchObject([])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user