mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-20 11:58:48 +00:00
videos: remove unused 'VideoRedirect' exception
This commit is contained in:
@@ -14,8 +14,6 @@ module Invidious::Routes::API::Manifest
|
||||
|
||||
begin
|
||||
video = get_video(id, region: region)
|
||||
rescue ex : VideoRedirect
|
||||
return env.redirect env.request.resource.gsub(id, ex.video_id)
|
||||
rescue ex : NotFoundException
|
||||
haltf env, status_code: 404
|
||||
rescue ex
|
||||
|
||||
@@ -9,9 +9,6 @@ module Invidious::Routes::API::V1::Videos
|
||||
|
||||
begin
|
||||
video = get_video(id, region: region)
|
||||
rescue ex : VideoRedirect
|
||||
env.response.headers["Location"] = env.request.resource.gsub(id, ex.video_id)
|
||||
return error_json(302, "Video is unavailable", {"videoId" => ex.video_id})
|
||||
rescue ex : NotFoundException
|
||||
return error_json(404, ex)
|
||||
rescue ex
|
||||
@@ -41,9 +38,6 @@ module Invidious::Routes::API::V1::Videos
|
||||
|
||||
begin
|
||||
video = get_video(id, region: region)
|
||||
rescue ex : VideoRedirect
|
||||
env.response.headers["Location"] = env.request.resource.gsub(id, ex.video_id)
|
||||
return error_json(302, "Video is unavailable", {"videoId" => ex.video_id})
|
||||
rescue ex : NotFoundException
|
||||
haltf env, 404
|
||||
rescue ex
|
||||
@@ -168,9 +162,6 @@ module Invidious::Routes::API::V1::Videos
|
||||
|
||||
begin
|
||||
video = get_video(id, region: region)
|
||||
rescue ex : VideoRedirect
|
||||
env.response.headers["Location"] = env.request.resource.gsub(id, ex.video_id)
|
||||
return error_json(302, "Video is unavailable", {"videoId" => ex.video_id})
|
||||
rescue ex : NotFoundException
|
||||
haltf env, 404
|
||||
rescue ex
|
||||
|
||||
Reference in New Issue
Block a user