mirror of https://github.com/iv-org/invidious.git
Change "list" to "comp"
This commit is contained in:
parent
5fdaa1bf57
commit
379761ab7b
|
@ -452,7 +452,7 @@ end
|
|||
def template_compilation(compilation)
|
||||
html = <<-END_HTML
|
||||
<h3>
|
||||
<a href="/compilation?list=#{compilation["compilationId"]}">
|
||||
<a href="/compilation?comp=#{compilation["compilationId"]}">
|
||||
#{compilation["title"]}
|
||||
</a>
|
||||
</h3>
|
||||
|
@ -463,7 +463,7 @@ def template_compilation(compilation)
|
|||
compilation["videos"].as_a.each do |video|
|
||||
html += <<-END_HTML
|
||||
<li class="pure-menu-item" id="#{video["videoId"]}">
|
||||
<a href="/watch?v=#{video["videoId"]}&list=#{compilation["compilationId"]}&index=#{video["index"]}">
|
||||
<a href="/watch?v=#{video["videoId"]}&comp=#{compilation["compilationId"]}&index=#{video["index"]}">
|
||||
<div class="thumbnail">
|
||||
<img loading="lazy" class="thumbnail" src="/vi/#{video["videoId"]}/mqdefault.jpg" alt="" />
|
||||
<p class="length">#{recode_length_seconds(video["lengthSeconds"].as_i)}</p>
|
||||
|
|
|
@ -52,7 +52,7 @@ module Invidious::Routes::Compilations
|
|||
|
||||
compilation = create_compilation(title, privacy, user)
|
||||
|
||||
env.redirect "/compilation?list=#{compilation.id}"
|
||||
env.redirect "/compilation?comp=#{compilation.id}"
|
||||
end
|
||||
|
||||
def self.delete_page(env)
|
||||
|
@ -264,7 +264,7 @@ module Invidious::Routes::Compilations
|
|||
|
||||
update_first_video_params(compid)
|
||||
|
||||
env.redirect "/compilation?list=#{compid}"
|
||||
env.redirect "/compilation?comp=#{compid}"
|
||||
end
|
||||
|
||||
def self.add_compilation_items_page(env)
|
||||
|
@ -496,7 +496,7 @@ module Invidious::Routes::Compilations
|
|||
user = env.get?("user").try &.as(User)
|
||||
referer = get_referer(env)
|
||||
|
||||
compid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
||||
compid = env.params.query["comp"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
||||
if !compid
|
||||
return env.redirect "/"
|
||||
end
|
||||
|
@ -504,10 +504,6 @@ module Invidious::Routes::Compilations
|
|||
page = env.params.query["page"]?.try &.to_i?
|
||||
page ||= 1
|
||||
|
||||
if compid.starts_with? "RD"
|
||||
return env.redirect "/mix?list=#{compid}"
|
||||
end
|
||||
|
||||
begin
|
||||
compilation = get_compilation(compid)
|
||||
rescue ex : NotFoundException
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
<div class="pure-u-1 pure-u-lg-3-5">
|
||||
<div class="h-box">
|
||||
<form class="pure-form pure-form-aligned" action="/add_compilation_items" method="get">
|
||||
<legend><a href="/compilation?list=<%= compilation.id %>"><%= translate(locale, "Editing compilation `x`", %|"#{HTML.escape(compilation.title)}"|) %></a></legend>
|
||||
<legend><a href="/compilation?comp=<%= compilation.id %>"><%= translate(locale, "Editing compilation `x`", %|"#{HTML.escape(compilation.title)}"|) %></a></legend>
|
||||
|
||||
<fieldset>
|
||||
<input class="pure-input-1" type="search" name="q"
|
||||
<% if query %>value="<%= HTML.escape(query.text) %>"<% end %>
|
||||
placeholder="<%= translate(locale, "Search for videos") %>">
|
||||
<input type="hidden" name="list" value="<%= compid %>">
|
||||
<input type="hidden" name="comp" value="<%= compid %>">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -13,23 +13,23 @@
|
|||
<%- if compilation.is_a?(InvidiousCompilation) && compilation.author == user.try &.email -%>
|
||||
<%- if compilation.index.size > 0 -%>
|
||||
<div class="pure-u">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/watch?v=<%= compilation.first_video_id %>&list=<%= compid %>&index=<%= compilation.index[0] %>&t=<%= compilation.first_video_starting_timestamp_seconds %>&end=<%= compilation.first_video_ending_timestamp_seconds %>">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/watch?v=<%= compilation.first_video_id %>&comp=<%= compid %>&index=<%= compilation.index[0] %>&t=<%= compilation.first_video_starting_timestamp_seconds %>&end=<%= compilation.first_video_ending_timestamp_seconds %>">
|
||||
<i class="icon ion-md-play"></i> <%= translate(locale, "compilation_button_play") %>
|
||||
</a>
|
||||
</div>
|
||||
<%- end -%>
|
||||
<div class="pure-u">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/add_compilation_items?list=<%= compid %>">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/add_compilation_items?comp=<%= compid %>">
|
||||
<i class="icon ion-md-add"></i> <%= translate(locale, "compilation_button_add_items") %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="pure-u">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/edit_compilation?list=<%= compid %>">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/edit_compilation?comp=<%= compid %>">
|
||||
<i class="icon ion-md-create"></i> <%= translate(locale, "generic_button_edit") %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="pure-u">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/delete_compilation?list=<%= compid %>">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/delete_compilation?comp=<%= compid %>">
|
||||
<i class="icon ion-md-trash"></i> <%= translate(locale, "generic_button_delete") %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
if item.id.starts_with? "RD"
|
||||
link_url = "/mix?list=#{item.id}&continuation=#{URI.parse(item.thumbnail || "/vi/-----------").request_target.split("/")[2]}"
|
||||
elsif item.id.starts_with? "IVCMP"
|
||||
link_url = "/compilation?list=#{item.id}"
|
||||
link_url = "/compilation?comp=#{item.id}"
|
||||
else
|
||||
link_url = "/playlist?list=#{item.id}"
|
||||
end
|
||||
|
@ -100,7 +100,6 @@
|
|||
elsif item.is_a?(MixVideo)
|
||||
link_url = "/watch?v=#{item.id}&list=#{item.rdid}"
|
||||
endpoint_params = "?v=#{item.id}&list=#{item.rdid}"
|
||||
# elsif item.is_a?(CompilationVideo)
|
||||
else
|
||||
link_url = "/watch?v=#{item.id}"
|
||||
endpoint_params = "?v=#{item.id}"
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/compilation/<%= compid %>" />
|
||||
<% end %>
|
||||
|
||||
<form action="/edit_compilation?list=<%= compid %>" method="post">
|
||||
<form action="/edit_compilation?comp=<%= compid %>" method="post">
|
||||
<div class="h-box flexible">
|
||||
<div class="flex-right button-container">
|
||||
<div class="pure-u">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/compilation?list=<%= compid %>">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/compilation?comp=<%= compid %>">
|
||||
<i class="icon ion-md-close"></i> <%= translate(locale, "generic_button_cancel") %>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="pure-u">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/delete_compilation?list=<%= compid %>">
|
||||
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/delete_compilation?comp=<%= compid %>">
|
||||
<i class="icon ion-md-trash"></i> <%= translate(locale, "generic_button_delete") %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue