You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you save a bookmark for a live stream it won't resume as it's trying to play whatever timestamp the stream was at. Solution is save it as 0. Kinda involved but added the following code and it works great.
-- Quickly saves a bookmark no time without bringing up the menu
function quickSaveNoTime()
if not active then
loadBookmarks()
local slot = addBookmarkNoTime()
if slot > 0 then mp.osd_message("Saved new bookmark at slot " .. slot) end
end
end
function addBookmarkNoTime(name)
local bookmark = makeBookmarkNoTime(name)
if bookmark == nil then
abort(styleOn .. "{\\c&H0000FF&}{\\b1}Can't find the media file to create the bookmark for")
return -1
end
table.insert(bookmarks, bookmark)
if #bookmarks == 1 then currentSlot = 1 end
calcPages()
saveBookmarks()
displayBookmarks()
return #bookmarks
end
function makeBookmarkNoTime(bname)
local chaptername = mp.get_property("chapter-metadata/title") or ""
if mp.get_property("path") ~= nil then
if bname == nil then bname = mp.get_property("media-title") .. " #" .. chaptername .. " @ (Live Stream)" end
local bookmark = {
name = parseName(bname),
pos = 0,
-- pos = mp.get_property_number("time-pos"),
path = parsePath(mp.get_property("path")),
version = 2
}
return bookmark
else
return nil
end
end
Save a bookmark with pos = 0
If you save a bookmark for a live stream it won't resume as it's trying to play whatever timestamp the stream was at. Solution is save it as 0. Kinda involved but added the following code and it works great.
-- Quickly saves a bookmark no time without bringing up the menu
mp.register_script_message("bookmarker-quick-save-notime", quickSaveNoTime)
then in input.conf
B script-message bookmarker-quick-save #! [History Chapters Bookmarks] > Save Bookmark
Alt+b script-message bookmarker-quick-save-notime #! [History Chapters Bookmarks] > Save Bookmark no time (live streams)
b script-message playlist-play-index=none ; script-message bookmarker-menu #! [History Chapters Bookmarks] > Bookmarker Menu
Meta+b script-message bookmarker-quick-load #! [History Chapters Bookmarks] > Play Last Bookmark
The text was updated successfully, but these errors were encountered: