Reset current song on tape removal
Also added quick jump every 5 minutes
This commit is contained in:
parent
7e94bc4f0a
commit
d6d0e42978
|
@ -495,6 +495,7 @@ function()
|
|||
tw, th = term.getSize()
|
||||
elseif ev == "tape_removed" then
|
||||
mplayer.songs = {}
|
||||
mplayer.currentSong = 0
|
||||
elseif ev == "tape_inserted" then
|
||||
local seekToAndPlay = nil
|
||||
if drive.getState() == "PLAYING" then
|
||||
|
@ -515,11 +516,18 @@ function()
|
|||
length = drive.getSize() - 10
|
||||
},
|
||||
{
|
||||
title = "[ !!! ] It's just a regular tape",
|
||||
title = "NOTE: It's just a regular tape",
|
||||
offset = drive.getSize() - 10,
|
||||
length = 10
|
||||
}
|
||||
}
|
||||
for t = 1, drive.getSize(), 6000 * 60 * 5 do
|
||||
table.insert(mplayer.songs, 2, {
|
||||
title = "Skip to " .. time2str(t),
|
||||
offset = t,
|
||||
length = 6000 * 60 * 5
|
||||
})
|
||||
end
|
||||
break
|
||||
end
|
||||
title = title:sub(1, title:find("\x00"))
|
||||
|
|
Loading…
Reference in New Issue