[Enhancement] Add rate limiting to yt-dlp requests; prevent saving Media Items when throttled by YouTube (#559)
* Added sleep interval to settings * Added new sleep setting to yt-dlp runner and added tests * Added setting for form; updated setting name * Updated form label * Prevented saving/updating of media items if being throttled by youtube * Added the bot message to the list of non-retryable errors * Fixed typo
This commit is contained in:
1 parent
fb27988963
commit
e9f6b45953
16 files changed
+241
-33
No files matched your search
@@ -921,6 +921,14 @@ defmodule Pinchflat.MediaTest do
|
||||
media_item = media_item_fixture()
|
||||
assert %Ecto.Changeset{} = Media.change_media_item(media_item)
|
||||
end
|
||||
|
||||
test "validates the title doesn't start with 'youtube video #'" do
|
||||
# This is to account for youtube restricting indexing. See issue #549 for more
|
||||
media_item = media_item_fixture()
|
||||
|
||||
assert %Ecto.Changeset{valid?: false} = Media.change_media_item(media_item, %{title: "youtube video #123"})
|
||||
assert %Ecto.Changeset{valid?: true} = Media.change_media_item(media_item, %{title: "any other title"})
|
||||
end
|
||||
end
|
||||
|
||||
describe "change_media_item/1 when testing upload_date_index and source is a channel" do
|
||||
|
||||
Reference in new issue
Block a user