Repository navigation
Release: Playlist download filters, YouTube cookie alerts, separate .m3u files for videos and MP3s, and an External API UI - #1073
Open
dialmaster wants to merge 119 commits into
Open
dialmaster wants to merge 119 commits into
dialmaster wants to merge 119 commits into
Conversation
fix: explain YouTube bot checks to the user
Download failure messages for a YouTube bot check or HTTP 403 told users to upload cookies. With an external cookie file configured, uploads are refused and Settings only refreshes the file's status, so that advice could not be followed. The same sentences also lived in four files in slightly different versions and had drifted apart: a 403 without cookies read as fixable by cookies in one place and as often temporary in another. - Add youtubeBlockAdvice, holding every bot check and HTTP 403 text by kind and cookie state. The output router, status resolver, job finalizer and failure advisor read from it instead of keeping their own copies. ytdlpBotCheck keeps the matcher and error code. - Tell runs that sent cookies to upload fresh ones in Settings or replace the external cookie file, and runs without cookies to set cookies up. The texts no longer name YOUTARR_COOKIES_FILE, whose underscores could affect Slack's italic formatting. - Store the failed videos' diagnosis as the job note for a bot check or 403, replacing the separately worded notes. - Point the mid-run 403 hint at Settings -> Cookies instead of the old Configuration page. - Give the blocked Sonarr/Radarr grab advice both options. Diagnosis keys, titles and error codes are unchanged. Refs: #1070
fix: cover external cookie files in block advice
The key editor only sees grants on enabled channels, and saving replaced the whole grant list. Editing a key while one of its channels was disabled removed that grant for good, even when only the rating changed. Replace only the grants on enabled, non-terminated channels. A grant on a disabled channel grants nothing while it stays that way and comes back when the channel is turned on again.
The channel list sorted by uploader alone, so channels with the same or an empty name could repeat or drop out between pages. The key editor pages through every channel, and a skipped channel could not be granted.
externalApiEnabled reads false until /getconfig answers, so reloading or bookmarking /requests sent you to Settings. The route now waits for the config to load before choosing.
After one background poll the reload stayed marked silent, so later filter and page changes showed no spinner or error and left the old rows under the new filter. A load is now silent only when it reloads the same query the poll started.
Closing on pointerdown changed every dialog in the app: a right-click or the start of a touch closed it, and the rest of the tap could land underneath. The Select isTrusted check already keeps a select trigger from dismissing its dialog, so go back to dev's click handler. Also drop the trusted-mousedown test. jsdom cannot make a trusted event, so it returned before its assertion and checked nothing.
Select all granted every channel in the library even when a search showed only a few, and clearing it dropped picks hidden by the search. It now adds or removes only the channels the search shows.
frontend.md asks new code to use the lib/icons aliases rather than lucide-react. Switch the new Requests and API key files over and add the Pencil and Radio icons they need.
Dev added read-only status keys while this branch split the settings into bookmarklet and external key lists, so status keys would have shown up as external keys. List them with the download keys, label each key's type, and offer the read-only option and the status summary address when creating one. Also address review gaps in the lists: - hide revoked keys from the bookmarklet list, as dev did, since GET /api/keys returns every key ever created; - keep active external keys listed while the External API is off, so they can still be revoked; they count toward the 20-key limit; - close the regenerate confirmation when regenerating fails, so the error behind it is visible. Update AUTHENTICATION.md, which still described the external API as a future feature, and note the grant and disabled-API behavior in EXTERNAL_API.md.
Expired or rotated cookies failed silently: public videos kept downloading, while members-only videos and private playlists stopped. The only way to notice was to run Test cookies by hand. - Add a "Check YouTube cookies" scheduled task that runs the Test cookies probe every 8 hours while cookies are enabled. - Send one notification per cookie file after two failed checks in a row, or at once when a download gets yt-dlp's "cookies are no longer valid" warning. Network problems, timeouts and bot checks do not count. - Keep the state in the run history so it survives a restart. - Ignore what a download saw when its cookies were replaced before it finished, for this report and for members-only access. Refs: #1066
…tification feat: notify when YouTube cookies stop working
Approving or rejecting from the list's review column opened the details dialog once the decision saved. Go back to the list instead; a decision made from the details dialog still returns there with the new status.
jsdom only makes untrusted events, so the test took the same path as dev's Select and passed either way. The guard is for real taps, where the compatibility mousedown opened the menu under the finger before the click; explain that next to it.
Fold the created-key, create, revoke and regenerate dialog state into one value each, so the section is down to 9 useState calls and 300 lines, inside frontend.md's guide.
The section tests stub useApiKeys, so the hook's create, update, revoke and regenerate requests were untested. Add tests for those, for the privilege-increase check that guards saving, and for the external access editor's load, confirm, failure and retry paths. Move the hook test next to the hook.
If a granted channel was disabled between the eligibility check and the save, its kept grant collided with the new row and the save returned 500. Skip the duplicate, and say in EXTERNAL_API.md how a dormant grant is removed.
- Label the select-all box "Select all channels" until a search is typed, and say when a search matches no channels. - Don't show the zero-channels warning while the key's grants are still loading or failed to load. - Use the same eye icon for view-only access as the key cards do. - List the new external request types and rating policy files in the external-api rule paths so the rule loads for them.
Contributor
📊 Test Coverage ReportBackend Coverage
Frontend Coverage
Coverage Requirements
Coverage report generated for commit c2cd489 |
When Sonarr or Radarr grabbed a video, they only got the video. Subtitles Youtarr had downloaded stayed behind in its library. Youtarr now passes a video's subtitle files along with it. Sonarr and Radarr import them once "Import Extra Files" is turned on in their Media Management settings. - Regional subtitles such as en-GB are passed along as plain "en", the only form the apps recognize. - When a video has several subtitles in one language, all of them are passed along, and exact duplicates only once. - The Sonarr / Radarr settings page and the guide explain how to turn this on. - Fix a button on that settings page that ran off the screen on phones. Refs: #1065
Four server test files failed in CI because staging.js read fs.constants as it loaded, and those tests stub fs without it. Behavior is unchanged. Refs: #1065
…itles feat: hand subtitles to Sonarr and Radarr
feat: add external API administrator UI
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playlists get download filters (title and duration) in Playlist Settings, and Youtarr now notifies you when your YouTube cookies stop working, so you don't find out weeks later that members-only videos stopped downloading. Video + MP3 playlists and channels also get a second .m3u file that lists only the MP3s. Sonarr and Radarr can now get a video's subtitles along with the video. The opt-in External API also gets its pages in the app: you can create external keys in Settings and approve or reject requests on a new Requests page. The fixes are mostly about clearer messages when YouTube is bot-checking your server, plus a Sonarr search fix and better-sized channel thumbnails.
features
(?i)added so they keep ignoring case. A pattern that Python can't read shows a warning on the playlist page and holds that playlist's automatic downloads until you fix it. The videos the filter used to hide show up as Filtered after the next refresh.<name>.m3ulists the videos and<name> (MP3).m3ulists the MP3s. Before, there was one file that pointed at the video files, so a music player given that file was handed videos. Video Only and MP3 Only still get one file. For a playlist you already have, the (MP3) file is written after the next download, or right away with "Rebuild .m3u file". (M3U file for Video + MP3 playlist #925)EXTERNAL_API_ENABLED=true, Settings > API Keys & Bookmarklet gets an "External access keys" section. There you create a key, choose what it may request (videos, channels, deleting downloaded videos), set its rating, media type and workload limits, and pick the channels it can see. A new Requests page in the main navigation lists what outside tools asked for, with filters by status, requester and type, and every approval or rejection asks you to confirm first. The External API is still off by default, and with it off the Requests page and the external key controls are hidden. Thanks @bballdavis! (Expand Youtarr's external API for third-party integrations #568)fixes
--trim-filenamesis now blocked. It was allowed with a warning, but it can cut the video ID off file names, and Youtarr needs that ID to recognize each download. If your saved custom args use it, that one option is skipped and the rest still apply. (fix: pass ffmpeg resize arguments as a list #1067)docs