Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 86 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^9.39.3",
"@freearhey/core": "^0.15.2",
"@freearhey/core": "^0.16.1",
"@freearhey/storage-js": "^0.2.0",
"@iptv-org/sdk": "^1.3.0",
"@joi/date": "^2.1.1",
Expand Down
11 changes: 6 additions & 5 deletions scripts/commands/db/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async function addChannel(issue: Issue) {
channel: newChannel.id,
id: createFeedId(feedName),
name: feedName,
alt_names: issueData.getArray('feed_alt_names'),
alt_names: issueData.getArray('feed_alt_names') || [],
is_main: true,
broadcast_area: broadcastArea,
timezones: timezones,
Expand All @@ -221,8 +221,8 @@ async function addChannel(issue: Issue) {
const newLogo = new Logo({
channel: newChannel.id,
feed: null,
in_use: issueData.getBoolean('in_use'),
tags: issueData.getArray('tags'),
in_use: issueData.getBoolean('in_use') === false ? false : true,
tags: issueData.getArray('tags') || [],
width: imageInfo.width,
height: imageInfo.height,
format: imageInfo.format,
Expand Down Expand Up @@ -395,8 +395,8 @@ async function addFeed(issue: Issue) {
const newLogo = new Logo({
channel: channelId,
feed: feedId,
in_use: issueData.getBoolean('in_use'),
tags: issueData.getArray('tags'),
in_use: issueData.getBoolean('in_use') === false ? false : true,
tags: issueData.getArray('tags') || [],
width: imageInfo.width,
height: imageInfo.height,
format: imageInfo.format,
Expand Down Expand Up @@ -555,6 +555,7 @@ async function addLogo(issue: Issue) {
channel: channelId,
feed: feedId,
url: logoUrl,
in_use: issueData.getBoolean('in_use') === false ? false : true,
tags: issueData.getArray('tags') || [],
width: imageInfo.width,
height: imageInfo.height,
Expand Down
20 changes: 10 additions & 10 deletions scripts/core/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,16 @@ function cacheData() {
cities: data.cities.clone(),
countries: data.countries.clone(),
logos: data.logos.clone(),
citiesKeyByCode: data.citiesKeyByCode,
feedsGroupedByChannelId: data.feedsGroupedByChannelId,
feedsKeyByStreamId: data.feedsKeyByStreamId,
channelsKeyById: data.channelsKeyById,
countriesKeyByCode: data.countriesKeyByCode,
subdivisionsKeyByCode: data.subdivisionsKeyByCode,
categoriesKeyById: data.categoriesKeyById,
regionsKeyByCode: data.regionsKeyByCode,
timezonesKeyById: data.timezonesKeyById,
languagesKeyByCode: data.languagesKeyByCode
citiesKeyByCode: data.citiesKeyByCode.clone(),
feedsGroupedByChannelId: data.feedsGroupedByChannelId.clone(),
feedsKeyByStreamId: data.feedsKeyByStreamId.clone(),
channelsKeyById: data.channelsKeyById.clone(),
countriesKeyByCode: data.countriesKeyByCode.clone(),
subdivisionsKeyByCode: data.subdivisionsKeyByCode.clone(),
categoriesKeyById: data.categoriesKeyById.clone(),
regionsKeyByCode: data.regionsKeyByCode.clone(),
timezonesKeyById: data.timezonesKeyById.clone(),
languagesKeyByCode: data.languagesKeyByCode.clone()
}
}

Expand Down
3 changes: 2 additions & 1 deletion tests/__data__/input/db/update/data/countries.csv
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Spain,ES,spa;cat;eus;glg,🇪🇸
Uruguay,UY,spa,🇺🇾
Turkiye,TR,tur,🇹🇷
Afghanistan,AF,pus;prd;tuk,🇦🇫
United States,US,eng;spa,🇺🇸
United States,US,eng;spa,🇺🇸
Sweden,SE,swe,🇸🇪
3 changes: 2 additions & 1 deletion tests/__data__/input/db/update/data/timezones.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Atlantic/Bermuda,-04:00,BM
Europe/London,+00:00,UK;GG;IM;JE
Africa/Johannesburg,+02:00,ZA;LS;SZ
Africa/Kigali,+02:00,RW
America/Sao_Paulo,-03:00,BR
America/Sao_Paulo,-03:00,BR
Europe/Stockholm,+01:00,SE
158 changes: 158 additions & 0 deletions tests/__data__/input/db/update/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -2479,5 +2479,163 @@ module.exports = [
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/23575/timeline',
performed_via_github_app: null,
state_reason: null
},
{
url: 'https://api.github.com/repos/iptv-org/database/issues/27096',
repository_url: 'https://api.github.com/repos/iptv-org/database',
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/labels{/name}',
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/comments',
events_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/events',
html_url: 'https://github.com/iptv-org/database/issues/27096',
id: 3627496814,
node_id: 'I_kwDOG1Kwp85y_x4L',
number: 27096,
title: 'Add: Canal+ Hits',
user: {
login: 'AntiPontifex',
id: 81566772,
node_id: 'MDQ6VXNlcjgxNTY2Nzcy',
avatar_url: 'https://avatars.githubusercontent.com/u/81566772?v=4',
gravatar_id: '',
url: 'https://api.github.com/users/AntiPontifex',
html_url: 'https://github.com/AntiPontifex',
followers_url: 'https://api.github.com/users/AntiPontifex/followers',
following_url: 'https://api.github.com/users/AntiPontifex/following{/other_user}',
gists_url: 'https://api.github.com/users/AntiPontifex/gists{/gist_id}',
starred_url: 'https://api.github.com/users/AntiPontifex/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/AntiPontifex/subscriptions',
organizations_url: 'https://api.github.com/users/AntiPontifex/orgs',
repos_url: 'https://api.github.com/users/AntiPontifex/repos',
events_url: 'https://api.github.com/users/AntiPontifex/events{/privacy}',
received_events_url: 'https://api.github.com/users/AntiPontifex/received_events',
type: 'User',
site_admin: false
},
labels: [
{
id: 5303575699,
node_id: 'LA_kwDOG1Kwp88AAAABPB4kkw',
url: 'https://api.github.com/repos/iptv-org/database/labels/channels:add',
name: 'channels:add',
color: '017ff8',
default: false,
description: 'Request to add a channel into the database'
},
{
id: 5366738347,
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
name: 'approved',
color: '85DDDE',
default: false,
description: ''
}
],
state: 'open',
locked: false,
assignee: null,
assignees: [],
milestone: null,
comments: 0,
created_at: '2023-10-06T02:10:41Z',
updated_at: '2023-10-06T02:52:02Z',
closed_at: null,
author_association: 'CONTRIBUTOR',
active_lock_reason: null,
body: '### Channel Name\n\nCanal+ Hits\n\n### Alternative Names (optional)\n\n_No response_\n\n### Network (optional)\n\n_No response_\n\n### Owners (optional)\n\n_No response_\n\n### Country\n\nSE\n\n### Categories (optional)\n\n_No response_\n\n### NSFW\n\nFALSE\n\n### Launched (optional)\n\n_No response_\n\n### Closed (optional)\n\n_No response_\n\n### Replaced By (optional)\n\nCanalMoreHits.se\n\n### Website (optional)\n\n_No response_\n\n### Logo URL\n\nhttps://i.imgur.com/ziiYOND.png\n\n### Feed Name\n\nSD\n\n### Broadcast Area\n\nc/ES\n\n### Languages\n\nswe\n\n### Timezones\n\nEurope/Stockholm\n\n### Format\n\n576i\n\n### Notes\n\n_No response_',
reactions: {
url: 'https://api.github.com/repos/iptv-org/database/issues/27096/reactions',
total_count: 0,
'+1': 0,
'-1': 0,
laugh: 0,
hooray: 0,
confused: 0,
heart: 0,
rocket: 0,
eyes: 0
},
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/timeline',
performed_via_github_app: null,
state_reason: null
},
{
url: 'https://api.github.com/repos/iptv-org/database/issues/27098',
repository_url: 'https://api.github.com/repos/iptv-org/database',
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/labels{/name}',
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/comments',
events_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/events',
html_url: 'https://github.com/iptv-org/database/issues/27098',
id: 3627496814,
node_id: 'I_kwDOG1Kwp85y_x4L',
number: 27098,
title: 'Add: Canal+ Film 2',
user: {
login: 'AntiPontifex',
id: 81566772,
node_id: 'MDQ6VXNlcjgxNTY2Nzcy',
avatar_url: 'https://avatars.githubusercontent.com/u/81566772?v=4',
gravatar_id: '',
url: 'https://api.github.com/users/AntiPontifex',
html_url: 'https://github.com/AntiPontifex',
followers_url: 'https://api.github.com/users/AntiPontifex/followers',
following_url: 'https://api.github.com/users/AntiPontifex/following{/other_user}',
gists_url: 'https://api.github.com/users/AntiPontifex/gists{/gist_id}',
starred_url: 'https://api.github.com/users/AntiPontifex/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/AntiPontifex/subscriptions',
organizations_url: 'https://api.github.com/users/AntiPontifex/orgs',
repos_url: 'https://api.github.com/users/AntiPontifex/repos',
events_url: 'https://api.github.com/users/AntiPontifex/events{/privacy}',
received_events_url: 'https://api.github.com/users/AntiPontifex/received_events',
type: 'User',
site_admin: false
},
labels: [
{
id: 5303575699,
node_id: 'LA_kwDOG1Kwp88AAAABPB4kkw',
url: 'https://api.github.com/repos/iptv-org/database/labels/channels:add',
name: 'channels:add',
color: '017ff8',
default: false,
description: 'Request to add a channel into the database'
},
{
id: 5366738347,
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
name: 'approved',
color: '85DDDE',
default: false,
description: ''
}
],
state: 'open',
locked: false,
assignee: null,
assignees: [],
milestone: null,
comments: 0,
created_at: '2023-10-06T02:10:41Z',
updated_at: '2023-10-06T02:52:02Z',
closed_at: null,
author_association: 'CONTRIBUTOR',
active_lock_reason: null,
body: '### Channel Name\n\nCanal+ Film 2\n\n### Alternative Names (optional)\n\n_No response_\n\n### Network (optional)\n\n_No response_\n\n### Owners (optional)\n\n_No response_\n\n### Country\n\nSE\n\n### Categories (optional)\n\n_No response_\n\n### NSFW\n\nFALSE\n\n### Launched (optional)\n\n_No response_\n\n### Closed (optional)\n\n_No response_\n\n### Replaced By (optional)\n\nCanalPlusHits.se\n\n### Website (optional)\n\n_No response_\n\n### Logo URL\n\nhttps://i.imgur.com/ziiYOND.png\n\n### Feed Name\n\nSD\n\n### Broadcast Area\n\nc/ES\n\n### Languages\n\nswe\n\n### Timezones\n\nEurope/Stockholm\n\n### Format\n\n576i\n\n### Notes\n\n_No response_',
reactions: {
url: 'https://api.github.com/repos/iptv-org/database/issues/27098/reactions',
total_count: 0,
'+1': 0,
'-1': 0,
laugh: 0,
hooray: 0,
confused: 0,
heart: 0,
rocket: 0,
eyes: 0
},
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/timeline',
performed_via_github_app: null,
state_reason: null
}
]
Loading