mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-16 09:58:50 +00:00
added youtube playlist import functionality. fixes issue #2114
Signed-off-by: Gavin Johnson <gavinj1984@gmail.com>
This commit is contained in:
@@ -310,6 +310,16 @@ module Invidious::Routes::PreferencesRoute
|
||||
response: error_template(415, "Invalid subscription file uploaded")
|
||||
)
|
||||
end
|
||||
# Gavin Johnson (thtmnisamnstr), 20230127: Call the Youtube playlist import function
|
||||
when "import_youtube_pl"
|
||||
filename = part.filename || ""
|
||||
success = Invidious::User::Import.from_youtube_pl(user, body, filename, type)
|
||||
|
||||
if !success
|
||||
haltf(env, status_code: 415,
|
||||
response: error_template(415, "Invalid playlist file uploaded")
|
||||
)
|
||||
end
|
||||
when "import_freetube"
|
||||
Invidious::User::Import.from_freetube(user, body)
|
||||
when "import_newpipe_subscriptions"
|
||||
|
||||
Reference in New Issue
Block a user