[Enhancement] Use cookies on a per-source basis (#354)

* Added 'use_cookies' column to source

* Added cookies to the source form

* Updated every command to optionally include cookies

* LOTS of tests

* Made YT cookies off by default
This commit is contained in:
Kieran
2024-08-14 12:00:18 -07:00
committed by GitHub
parent 23492961d5
commit fd20ac5d84
26 changed files with 482 additions and 193 deletions
@@ -94,7 +94,8 @@ defmodule Pinchflat.SlowIndexing.SlowIndexingHelpers do
{:ok, pid} = FileFollowerServer.start_link()
handler = fn filepath -> setup_file_follower_watcher(pid, filepath, source) end
result = MediaCollection.get_media_attributes_for_collection(source.original_url, file_listener_handler: handler)
runner_opts = [file_listener_handler: handler, use_cookies: source.use_cookies]
result = MediaCollection.get_media_attributes_for_collection(source.original_url, runner_opts)
FileFollowerServer.stop(pid)