mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
fix: panic during YouTube channel feed discovery
Regression introduced in commit e54825b
This commit is contained in:
parent
f847c3e754
commit
79ea9e28b5
1 changed files with 3 additions and 2 deletions
|
@ -87,10 +87,11 @@ func (f *SubscriptionFinder) FindSubscriptions(websiteURL, rssBridgeURL string)
|
|||
return Subscriptions{NewSubscription(responseHandler.EffectiveURL(), responseHandler.EffectiveURL(), feedFormat)}, nil
|
||||
}
|
||||
|
||||
subscriptions := make(Subscriptions, 1)
|
||||
var subscriptions Subscriptions
|
||||
|
||||
// Step 2) Parse URL to find feeds from YouTube.
|
||||
kind, _, err := youtubeURLIDExtractor(websiteURL)
|
||||
slog.Debug("YouTube URL ID extraction", slog.String("website_url", websiteURL), slog.Any("kind", kind), slog.Any("err", err))
|
||||
|
||||
// If YouTube url has been detected, return the YouTube feed
|
||||
if err == nil || !errors.Is(err, errNotYoutubeUrl) {
|
||||
|
@ -393,6 +394,6 @@ func youtubeURLIDExtractor(websiteURL string) (idKind youtubeKind, id string, er
|
|||
id = decodedUrl.Query().Get("list")
|
||||
return
|
||||
}
|
||||
err = fmt.Errorf("unable to extract youtube id from URL: %s", websiteURL)
|
||||
err = fmt.Errorf("finder: unable to extract youtube id from URL: %s", websiteURL)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue