Merge pull request #18142 from iptv-org/freearhey-patch-13

Patch 2024.12.2
pull/24814/head
Dum4G 11 months ago committed by GitHub
commit fccd988018

@ -9,10 +9,10 @@ body:
value: | value: |
Please fill out the issue template as much as you can so we could efficiently process your request Please fill out the issue template as much as you can so we could efficiently process your request
- type: input - type: textarea
attributes: attributes:
label: Broken Link label: Broken Links
description: Please specify the broken link from a playlist description: Please specify the broken links from the playlist (one per line)
placeholder: 'https://lnc-kdfw-fox-aws.tubi.video/index.m3u8' placeholder: 'https://lnc-kdfw-fox-aws.tubi.video/index.m3u8'
validations: validations:
required: true required: true

@ -54,14 +54,21 @@ async function removeStreams(loader: IssueLoader) {
const issues = await loader.load({ labels: ['streams:remove', 'approved'] }) const issues = await loader.load({ labels: ['streams:remove', 'approved'] })
issues.forEach((issue: Issue) => { issues.forEach((issue: Issue) => {
const data = issue.data const data = issue.data
if (data.missing('stream_url')) return if (data.missing('broken_links')) return
const brokenLinks = data.get('broken_links').split(/\r?\n/).filter(Boolean)
const found: Stream = streams.first((_stream: Stream) => _stream.url === data.get('stream_url')) let changed = false
brokenLinks.forEach(link => {
const found: Stream = streams.first((_stream: Stream) => _stream.url === link.trim())
if (found) { if (found) {
found.removed = true found.removed = true
processedIssues.add(issue.number) changed = true
} }
}) })
if (changed) processedIssues.add(issue.number)
})
} }
async function editStreams(loader: IssueLoader) { async function editStreams(loader: IssueLoader) {

@ -82,7 +82,7 @@ async function main() {
logger.info('checking broken streams reports...') logger.info('checking broken streams reports...')
const brokenStreamReports = await loader.load({ labels: ['broken stream'] }) const brokenStreamReports = await loader.load({ labels: ['broken stream'] })
brokenStreamReports.forEach((issue: Issue) => { brokenStreamReports.forEach((issue: Issue) => {
const streamUrl = issue.data.get('stream_url') || undefined const brokenLinks = issue.data.get('broken_links') || undefined
const result = new Dictionary({ const result = new Dictionary({
issueNumber: issue.number, issueNumber: issue.number,
@ -91,8 +91,8 @@ async function main() {
status: undefined status: undefined
}) })
if (!streamUrl) result.set('status', 'missing_link') if (!brokenLinks) result.set('status', 'missing_link')
else if (groupedStreams.missing(streamUrl)) result.set('status', 'invalid_link') else if (groupedStreams.missing(brokenLinks)) result.set('status', 'invalid_link')
else result.set('status', 'pending') else result.set('status', 'pending')
report.add(result.data()) report.add(result.data())

@ -7,7 +7,8 @@ const FIELDS = new Dictionary({
'Stream URL': 'stream_url', 'Stream URL': 'stream_url',
'Stream URL (optional)': 'stream_url', 'Stream URL (optional)': 'stream_url',
'Stream URL (required)': 'stream_url', 'Stream URL (required)': 'stream_url',
'Broken Link': 'stream_url', 'Broken Link': 'broken_links',
'Broken Links': 'broken_links',
Label: 'label', Label: 'label',
Quality: 'quality', Quality: 'quality',
Timeshift: 'timeshift', Timeshift: 'timeshift',
@ -27,8 +28,10 @@ export class IssueParser {
const data = new Dictionary() const data = new Dictionary()
fields.forEach((field: string) => { fields.forEach((field: string) => {
let [_label, , _value] = field.split(/\r?\n/) let parsed = field.split(/\r?\n/).filter(Boolean)
let _label = parsed.shift()
_label = _label ? _label.trim() : '' _label = _label ? _label.trim() : ''
let _value = parsed.join('\r\n')
_value = _value ? _value.trim() : '' _value = _value ? _value.trim() : ''
if (!_label || !_value) return data if (!_label || !_value) return data

@ -70,7 +70,7 @@ module.exports = [
closed_at: null, closed_at: null,
author_association: 'CONTRIBUTOR', author_association: 'CONTRIBUTOR',
active_lock_reason: null, active_lock_reason: null,
body: '### Stream URL\n\nhttps://ythls.onrender.com/channel/UC40TUSUx490U5uR1lZt3Ajg.m3u8\n\n### Reason\n\nNot loading\n\n### Notes (optional)\n\nOne link (VTV.br) is misspelled.\n\n### Contributing Guide\n\n- [x] I have read [Contributing Guide](https://github.com/iptv-org/iptv/blob/master/CONTRIBUTING.md)', body: '### Broken Link\n\nhttps://ythls.onrender.com/channel/UC40TUSUx490U5uR1lZt3Ajg.m3u8\n\n### Reason\n\nNot loading\n\n### Notes (optional)\n\nOne link (VTV.br) is misspelled.\n\n### Contributing Guide\n\n- [x] I have read [Contributing Guide](https://github.com/iptv-org/iptv/blob/master/CONTRIBUTING.md)',
reactions: { reactions: {
url: 'https://api.github.com/repos/iptv-org/iptv/issues/14151/reactions', url: 'https://api.github.com/repos/iptv-org/iptv/issues/14151/reactions',
total_count: 0, total_count: 0,
@ -97,7 +97,7 @@ module.exports = [
id: 1881649602, id: 1881649602,
node_id: 'I_kwDOCWUK8M5wJ7HC', node_id: 'I_kwDOCWUK8M5wJ7HC',
number: 14140, number: 14140,
title: 'Broken: RIK HD Cyprus', title: 'Broken: Cyprus Channels',
user: { user: {
login: 'ROBGagn', login: 'ROBGagn',
id: 124619576, id: 124619576,
@ -176,7 +176,7 @@ module.exports = [
closed_at: null, closed_at: null,
author_association: 'NONE', author_association: 'NONE',
active_lock_reason: null, active_lock_reason: null,
body: '### Broken Link\n\nhttp://l6.cloudskep.com/rikcy/rikhd/playlist.m3u8\n\n### What happened to the stream?\n\nNot loading\n\n### Possible Replacement (optional)\n\nhttp://l6.cloudskep.com/rikcy/rikhd/playlist2.m3u8\n\n### Notes (optional)\n\nToken needed...\r\nSame issue with RIK 1 and 2. May happen in the future with ANT1 Cyprus, Sigma and Omega.\n\n### Contributing Guide\n\n- [X] I have read [Contributing Guide](https://github.com/iptv-org/iptv/blob/master/CONTRIBUTING.md)', body: '### Broken Links\n\nhttp://l6.cloudskep.com/rikcy/rikhd/playlist.m3u8\r\n\r\nhttp://l6.cloudskep.com/rikcy/rik2/playlist.m3u8\n\n### What happened to the stream?\n\nNot loading\n\n### Possible Replacement (optional)\n\nhttp://l6.cloudskep.com/rikcy/rikhd/playlist2.m3u8\n\n### Notes (optional)\n\nToken needed...\r\nSame issue with RIK 1 and 2. May happen in the future with ANT1 Cyprus, Sigma and Omega.\n\n### Contributing Guide\n\n- [X] I have read [Contributing Guide](https://github.com/iptv-org/iptv/blob/master/CONTRIBUTING.md)',
reactions: { reactions: {
url: 'https://api.github.com/repos/iptv-org/iptv/issues/14140/reactions', url: 'https://api.github.com/repos/iptv-org/iptv/issues/14140/reactions',
total_count: 0, total_count: 0,
@ -193,103 +193,6 @@ module.exports = [
performed_via_github_app: null, performed_via_github_app: null,
state_reason: null state_reason: null
}, },
{
url: 'https://api.github.com/repos/iptv-org/iptv/issues/14139',
repository_url: 'https://api.github.com/repos/iptv-org/iptv',
labels_url: 'https://api.github.com/repos/iptv-org/iptv/issues/14139/labels{/name}',
comments_url: 'https://api.github.com/repos/iptv-org/iptv/issues/14139/comments',
events_url: 'https://api.github.com/repos/iptv-org/iptv/issues/14139/events',
html_url: 'https://github.com/iptv-org/iptv/issues/14139',
id: 1881648047,
node_id: 'I_kwDOCWUK8M5wJ6uv',
number: 14139,
title: 'Broken: RIK2 Cyprus',
user: {
login: 'ROBGagn',
id: 124619576,
node_id: 'U_kgDOB22LOA',
avatar_url: 'https://avatars.githubusercontent.com/u/124619576?v=4',
gravatar_id: '',
url: 'https://api.github.com/users/ROBGagn',
html_url: 'https://github.com/ROBGagn',
followers_url: 'https://api.github.com/users/ROBGagn/followers',
following_url: 'https://api.github.com/users/ROBGagn/following{/other_user}',
gists_url: 'https://api.github.com/users/ROBGagn/gists{/gist_id}',
starred_url: 'https://api.github.com/users/ROBGagn/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/ROBGagn/subscriptions',
organizations_url: 'https://api.github.com/users/ROBGagn/orgs',
repos_url: 'https://api.github.com/users/ROBGagn/repos',
events_url: 'https://api.github.com/users/ROBGagn/events{/privacy}',
received_events_url: 'https://api.github.com/users/ROBGagn/received_events',
type: 'User',
site_admin: false
},
labels: [
{
id: 1707513547,
node_id: 'MDU6TGFiZWwxNzA3NTEzNTQ3',
url: 'https://api.github.com/repos/iptv-org/iptv/labels/broken%20stream',
name: 'broken stream',
color: 'FBCA04',
default: false,
description: 'Stream is not working properly'
},
{
id: 3241837512,
node_id: 'MDU6TGFiZWwzMjQxODM3NTEy',
url: 'https://api.github.com/repos/iptv-org/iptv/labels/CY',
name: 'CY',
color: '90FA7B',
default: false,
description: 'Cyprus'
},
{
id: 5923498886,
node_id: 'LA_kwDOCWUK8M8AAAABYRFrhg',
url: 'https://api.github.com/repos/iptv-org/iptv/labels/approved',
name: 'approved',
color: '85ddde',
default: false,
description: ''
},
{
id: 5932506810,
node_id: 'LA_kwDOCWUK8M8AAAABYZreug',
url: 'https://api.github.com/repos/iptv-org/iptv/labels/streams:remove',
name: 'streams:remove',
color: '5373a2',
default: false,
description: ''
}
],
state: 'open',
locked: false,
assignee: null,
assignees: [],
milestone: null,
comments: 0,
created_at: '2023-09-05T10:08:08Z',
updated_at: '2023-09-07T00:50:06Z',
closed_at: null,
author_association: 'NONE',
active_lock_reason: null,
body: '### Broken Link\n\nhttp://l6.cloudskep.com/rikcy/rik2/playlist.m3u8\n\n### What happened to the stream?\n\nNot loading\n\n### Possible Replacement (optional)\n\n_No response_\n\n### Notes (optional)\n\nToken needed...\r\nSame issue with RIK 1 and HD. May happen in the future with ANT1 Cyprus, Sigma and Omega.\n\n### Contributing Guide\n\n- [X] I have read [Contributing Guide](https://github.com/iptv-org/iptv/blob/master/CONTRIBUTING.md)',
reactions: {
url: 'https://api.github.com/repos/iptv-org/iptv/issues/14139/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/iptv/issues/14139/timeline',
performed_via_github_app: null,
state_reason: null
},
{ {
url: 'https://api.github.com/repos/iptv-org/iptv/issues/14138', url: 'https://api.github.com/repos/iptv-org/iptv/issues/14138',
repository_url: 'https://api.github.com/repos/iptv-org/iptv', repository_url: 'https://api.github.com/repos/iptv-org/iptv',

@ -25,9 +25,7 @@ it('can format playlists', () => {
) )
}) })
expect(stdout).toBe( expect(stdout).toBe('OUTPUT=closes #14151, closes #14140, closes #14110, closes #14178\n')
'OUTPUT=closes #14151, closes #14140, closes #14139, closes #14110, closes #14178\n'
)
}) })
function content(filepath: string) { function content(filepath: string) {

Loading…
Cancel
Save