Skip to content

Commit c2f2912

Browse files
committed
Update slideshowMusic.lua
Only pause, if the old view was "slideshow".
1 parent 3d0e536 commit c2f2912

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

contrib/slideshowMusic.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ local function playSlideshowMusic(_, old_view, new_view)
5959
--dt.print_error(playCommand)
6060
coroutine.yield("RUN_COMMAND", playCommand)
6161
else
62-
stopCommand = "rhythmbox-client --pause"
63-
--dt.print_error(stopCommand)
64-
coroutine.yield("RUN_COMMAND", stopCommand)
62+
if (old_view.id == "slideshow") then
63+
stopCommand = "rhythmbox-client --pause"
64+
--dt.print_error(stopCommand)
65+
coroutine.yield("RUN_COMMAND", stopCommand)
66+
end
6567
end
6668
end
6769
end

0 commit comments

Comments
 (0)