Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/pr/music/music.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ defmodule PR.Music do
{:ok}
end

def clear_playlist do
Queue.clear()
queue_updated()
end

# This take a little while to run, so there can be race conditions if it gets called
# a few times, before it's had a chance to affect the play state
def trigger_playlist(force \\ :dont_force) do
Expand Down
4 changes: 2 additions & 2 deletions lib/pr_web/live/user_header_live/user_header_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ defmodule PRWeb.UserHeaderLive do
Timex.today()
|> Timex.weekday()
|> case do
5 -> 35
_ -> 25
5 -> 40
_ -> 30
end
end

Expand Down
2 changes: 1 addition & 1 deletion scripts/clear.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
echo "Clearing queue"
bin/pr rpc "PR.Queue.clear";
bin/pr rpc "PR.Music.clear_playlist";
Loading