mirror of
https://github.com/ksyasuda/mpv-youtube-queue.git
synced 2024-10-28 04:44:11 -07:00
Compare commits
4 Commits
827eb80d6e
...
ceed149350
Author | SHA1 | Date | |
---|---|---|---|
ceed149350 | |||
f08997fb5e | |||
0118e4969c | |||
42d1f7f7d6 |
@ -11,7 +11,7 @@ A Lua script that replicates and extends the YouTube "Add to Queue" feature for
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Interactive Queue Management:** A menu-driven interface for adding, removing, and rearranging videos in your queue
|
- **Interactive Queue Management:** A menu-driven interface for adding, removing, and rearranging videos in your queue
|
||||||
- **yt-dlp Integration:** Works with any link supported by [yt-dlp](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md "yd-dlp supported sites page") and supports downloading a supported video in the queue
|
- **yt-dlp Integration:** Gathers video info and allows downloading with any link supported by [yt-dlp](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md "yd-dlp supported sites page")
|
||||||
- **Internal Playlist Integration:** Seamlessly integrates with mpv's internal playlist for a unified playback experience
|
- **Internal Playlist Integration:** Seamlessly integrates with mpv's internal playlist for a unified playback experience
|
||||||
- **Customizable Keybindings:** Assign your preferred hotkeys to interact with the currently playing video and queue
|
- **Customizable Keybindings:** Assign your preferred hotkeys to interact with the currently playing video and queue
|
||||||
|
|
||||||
@ -43,6 +43,8 @@ This script requires the following software to be installed on the system
|
|||||||
in the queue
|
in the queue
|
||||||
- `move_cursor_down - ctrl+j`: Move the cursor down one row in the queue
|
- `move_cursor_down - ctrl+j`: Move the cursor down one row in the queue
|
||||||
- `move_cursor_up - ctrl+k`- Move the cursor up one row in the queue
|
- `move_cursor_up - ctrl+k`- Move the cursor up one row in the queue
|
||||||
|
- `load_queue - ctrl+l` - Appends the videos from the most recent save point to the
|
||||||
|
queue
|
||||||
- `move_video - ctrl+m`: Mark/move the selected video in the queue
|
- `move_video - ctrl+m`: Mark/move the selected video in the queue
|
||||||
- `play_next_in_queue - ctrl+n`: Play the next video in the queue
|
- `play_next_in_queue - ctrl+n`: Play the next video in the queue
|
||||||
- `open_video_in_browser - ctrl+o`: Open the currently playing video in the browser
|
- `open_video_in_browser - ctrl+o`: Open the currently playing video in the browser
|
||||||
@ -52,6 +54,8 @@ This script requires the following software to be installed on the system
|
|||||||
- `print_current_video - ctrl+P`: Print the name and channel of the currently
|
- `print_current_video - ctrl+P`: Print the name and channel of the currently
|
||||||
playing video to the OSD
|
playing video to the OSD
|
||||||
- `print_queue - ctrl+q`: Print the contents of the queue to the OSD
|
- `print_queue - ctrl+q`: Print the contents of the queue to the OSD
|
||||||
|
- `save_queue - ctrl+s`: Saves the remainder of the queue (excluding the
|
||||||
|
currently playing video) to the database for retrevial at a later time
|
||||||
- `remove_from_queue - ctrl+x`: Remove the currently selected video from the
|
- `remove_from_queue - ctrl+x`: Remove the currently selected video from the
|
||||||
queue
|
queue
|
||||||
- `play_selected_video - ctrl+ENTER`: Play the currently selected video in
|
- `play_selected_video - ctrl+ENTER`: Play the currently selected video in
|
||||||
|
@ -3,6 +3,7 @@ download_current_video=ctrl+d
|
|||||||
download_selected_video=ctrl+D
|
download_selected_video=ctrl+D
|
||||||
move_cursor_down=ctrl+j
|
move_cursor_down=ctrl+j
|
||||||
move_cursor_up=ctrl+k
|
move_cursor_up=ctrl+k
|
||||||
|
load_queue=ctrl+l
|
||||||
move_video=ctrl+m
|
move_video=ctrl+m
|
||||||
play_next_in_queue=ctrl+n
|
play_next_in_queue=ctrl+n
|
||||||
open_video_in_browser=ctrl+o
|
open_video_in_browser=ctrl+o
|
||||||
@ -10,6 +11,7 @@ open_channel_in_browser=ctrl+O
|
|||||||
play_previous_in_queue=ctrl+p
|
play_previous_in_queue=ctrl+p
|
||||||
print_current_video=ctrl+P
|
print_current_video=ctrl+P
|
||||||
print_queue=ctrl+q
|
print_queue=ctrl+q
|
||||||
|
save_queue=ctrl+s
|
||||||
remove_from_queue=ctrl+x
|
remove_from_queue=ctrl+x
|
||||||
play_selected_video=ctrl+ENTER
|
play_selected_video=ctrl+ENTER
|
||||||
browser=firefox
|
browser=firefox
|
||||||
|
@ -315,7 +315,20 @@ function YouTubeQueue.load_queue()
|
|||||||
style.error)
|
style.error)
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
for i in result do YouTubeQueue.add_to_queue(i) end
|
if result.status == 0 then
|
||||||
|
-- split urls based on commas
|
||||||
|
local urls = {}
|
||||||
|
-- Remove the brackets from json list
|
||||||
|
local l = result.stdout:sub(2, -3)
|
||||||
|
local item
|
||||||
|
for turl in l:gmatch('[^,]+') do
|
||||||
|
item = turl:match("^%s*(.-)%s*$"):gsub('"', "'")
|
||||||
|
table.insert(urls, item)
|
||||||
|
end
|
||||||
|
for _, turl in ipairs(urls) do
|
||||||
|
YouTubeQueue.add_to_queue(turl)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user