show filter by default, minor ' in song name fix

This commit is contained in:
stjet
2025-02-03 07:14:21 +00:00
parent c605315530
commit 4ebc65d6c9
2 changed files with 3 additions and 2 deletions

View File

@@ -174,6 +174,7 @@ builder.serve_template(renderer, "/player", "player", {
{ {
name: song.slice(`${l.name}/`.length), name: song.slice(`${l.name}/`.length),
//I don't think " can be in file names... but just in case //I don't think " can be in file names... but just in case
//might need to do " for the html and \" for the js?
sanitized_name: song.slice(`${l.name}/`.length).replaceAll("\"", "\\\""), sanitized_name: song.slice(`${l.name}/`.length).replaceAll("\"", "\\\""),
favourite: l.favourites.chapters.includes(song.slice(`${l.name}/`.length)), favourite: l.favourites.chapters.includes(song.slice(`${l.name}/`.length)),
subbed: subbed_songs.includes(song), subbed: subbed_songs.includes(song),

View File

@@ -94,7 +94,7 @@
<input type="checkbox" id="show-title"/> <input type="checkbox" id="show-title"/>
<label for="show-title">Show Current Track in Page Title</label> <label for="show-title">Show Current Track in Page Title</label>
<br> <br>
<input type="checkbox" id="show-filters"/> <input type="checkbox" id="show-filters" checked/>
<label for="show-filters">Show Filters</label> <label for="show-filters">Show Filters</label>
<div id="filters-container" style="display: none;"> <div id="filters-container" style="display: none;">
<input type="button" value="Select All" onclick="filter_select_all()"/> <input type="button" value="Select All" onclick="filter_select_all()"/>
@@ -106,7 +106,7 @@
<div id="[[ artist.sanitized_name ]]-song-filter" class="artist-song-filter"> <div id="[[ artist.sanitized_name ]]-song-filter" class="artist-song-filter">
[[ for:artist.songs:song ]] [[ for:artist.songs:song ]]
<input type="checkbox" id="[[ artist.sanitized_name ]]-[[ song.sanitized_name ]]-checkbox" onchange="update_playable_songs()"/> <input type="checkbox" id="[[ artist.sanitized_name ]]-[[ song.sanitized_name ]]-checkbox" onchange="update_playable_songs()"/>
<label for="[[ artist.sanitized_name ]]-[[ song.sanitized_name ]]-checkbox">[[ if:song.favourite ]]★[[ endif ]][[ song.name ]][[ if:song.subbed ]] (subbed)[[ endif ]] <button class="add-to-queue-btns" onclick="add_to_queue('[[ artist.sanitized_name ]]/[[ song.sanitized_name ]]')">Add to Queue</button></label> <label for="[[ artist.sanitized_name ]]-[[ song.sanitized_name ]]-checkbox">[[ if:song.favourite ]]★[[ endif ]][[ song.name ]][[ if:song.subbed ]] (subbed)[[ endif ]] <button class="add-to-queue-btns" onclick="add_to_queue(&quot;[[ artist.sanitized_name ]]/[[ song.sanitized_name ]]&quot;)">Add to Queue</button></label>
[[ endfor ]] [[ endfor ]]
</div> </div>
</div> </div>