Skip to content

Commit 34bd8d2

Browse files
committed
Print the action to terminal
1 parent 87a3e14 commit 34bd8d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

youtube-upnext.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,15 +867,16 @@ local function show_menu()
867867

868868
if text:sub(-1) == " " then
869869
-- Append video to playlist
870-
msg.info("Appending " .. upnext[selected].label .. " to playlist")
871870
-- prevent appending the same video twice
872871
if appended_to_playlist[upnext[selected].file] == true then
872+
msg.info("Already in playlist: " .. upnext[selected].label)
873873
if timeout ~= nil then
874874
timeout:kill()
875875
timeout:resume()
876876
end
877877
return
878878
else
879+
msg.info("Appending " .. upnext[selected].label .. " to playlist")
879880
add_to_playlist(upnext[selected].file, upnext[selected].label, upnext[selected].length, "append")
880881
appended_to_playlist[upnext[selected].file] = true
881882
selected_move(1)
@@ -1076,6 +1077,7 @@ local function show_menu()
10761077

10771078
local function on_key_select()
10781079
destroy()
1080+
msg.info("Playing " .. tostring(upnext[selected].label))
10791081
if opts.keep_playlist_on_select then
10801082
add_to_playlist(upnext[selected].file, upnext[selected].label, upnext[selected].length, "append-play")
10811083
local playlist_index_current = tonumber(mp.get_property("playlist-current-pos", "1"))
@@ -1091,12 +1093,14 @@ local function show_menu()
10911093
local function on_key_append()
10921094
-- prevent appending the same video twice
10931095
if appended_to_playlist[upnext[selected].file] == true then
1096+
msg.info("Already in playlist: " .. upnext[selected].label)
10941097
if timeout ~= nil then
10951098
timeout:kill()
10961099
timeout:resume()
10971100
end
10981101
return
10991102
else
1103+
msg.info("Appending " .. upnext[selected].label .. " to playlist")
11001104
add_to_playlist(upnext[selected].file, upnext[selected].label, upnext[selected].length, "append")
11011105
appended_to_playlist[upnext[selected].file] = true
11021106
selected_move(1)

0 commit comments

Comments
 (0)