-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix: importing subscriptions with terminated channels #3816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -1035,10 +1035,9 @@ export default defineComponent({ | |||
| invidiousAPICall(subscriptionsPayload).then((response) => { | ||||
| resolve(response) | ||||
| }).catch((err) => { | ||||
| console.error(err) | ||||
| const errorMessage = this.$t('Invidious API Error (Click to copy)') | ||||
| showToast(`${errorMessage}: ${err.responseJSON.error}`, 10000, () => { | ||||
| copyToClipboard(err.responseJSON.error) | ||||
| showToast(`${errorMessage}: ${err}`, 10000, () => { | ||||
| copyToClipboard(err) | ||||
| }) | ||||
|
|
||||
| if (process.env.IS_ELECTRON && this.backendFallback && this.backendPreference === 'invidious') { | ||||
|
|
@@ -1056,7 +1055,7 @@ export default defineComponent({ | |||
| const channel = await getLocalChannel(channelId) | ||||
|
|
||||
| if (channel.alert) { | ||||
| return undefined | ||||
| return [] | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know that returning an empty array is inline with the other parts of this file, however I think we should change that in all places, because we don't check for the empty array anywhere. e.g. on this line we check if the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separate PR? (Since I have no idea what do you mean
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also more difficult to review with more changes, this is just to fix importing
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doing it in a separate pull request sounds good to me. The current solution works, so technically the bug is fixed, it's just that the way it's done in the whole file, including this pull request, is bad and makes the code confusing. I suspect it's leftover from a previous refactoring. Hopefully chunky understands what I mean, otherwise I can do it myself. |
||||
| } | ||||
|
|
||||
| return { | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.