mirror of
https://github.com/ksyasuda/mpv-youtube-queue.git
synced 2025-12-05 02:53:38 -08:00
Compare commits
23 Commits
use-mpv-ut
...
3f7a5fb183
| Author | SHA1 | Date | |
|---|---|---|---|
|
3f7a5fb183
|
|||
|
68875120c5
|
|||
| 725ef8db36 | |||
| f89f852201 | |||
| 6abfe30d44 | |||
| 4fda62f588 | |||
|
|
3bbbcae0b8 | ||
|
|
0739b93e3a | ||
|
|
870f7473cf | ||
|
|
84a860f596 | ||
|
|
392b39c7fc | ||
|
|
fa2014acd6 | ||
|
|
7b9a061118 | ||
|
|
cfc4f94464 | ||
|
|
554dfd3b67 | ||
|
|
f0d6143fd2 | ||
|
|
e35aeac422 | ||
|
|
3a47cb0d0b | ||
|
|
3814459024 | ||
|
|
a1c2bfd9a7 | ||
|
|
e88e7f7f1c | ||
|
|
cdc797f55c | ||
|
|
b636e0534d |
4
.github/workflows/luackeck.yml
vendored
4
.github/workflows/luackeck.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Luacheck
|
||||
on: [push, pull_request]
|
||||
on: push
|
||||
jobs:
|
||||
sile:
|
||||
luacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
test.sh
|
||||
.git/*
|
||||
.luarc.json
|
||||
66
README.md
66
README.md
@@ -2,7 +2,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
A Lua script that implements the YouTube 'Add to Queue' functionality for mpv
|
||||
A Lua script that replicates and extends the YouTube "Add to Queue" feature for mpv
|
||||
|
||||
</div>
|
||||
|
||||
@@ -10,36 +10,28 @@ A Lua script that implements the YouTube 'Add to Queue' functionality for mpv
|
||||
|
||||
## Features
|
||||
|
||||
- Add YouTube videos to a queue from the clipboard
|
||||
- Fetch and display the video and channel names of the videos in the queue
|
||||
- Select a video to play from the queue with an interactive menu,
|
||||
or navigate through the queue with keyboard shortcuts
|
||||
- Edit the order of videos in the queue
|
||||
- Open the URL or channel page of the currently playing video in a new browser tab
|
||||
- Download the currently playing video
|
||||
- Download a video in the queue
|
||||
|
||||
## Notes
|
||||
|
||||
- This script uses the Linux `xclip` utility to read from the clipboard.
|
||||
If you're on macOS or Windows, you'll need to adjust the `clipboard_command`
|
||||
config variable in [mpv-youtube-queue.conf](./mpv-youtube-queue.conf)
|
||||
- When adding videos to the queue, the script fetches the video name using
|
||||
`yt-dlp`. Ensure you have `yt-dlp` installed and in your PATH.
|
||||
- **Interactive Queue Management:** A menu-driven interface for adding, removing, and rearranging videos in your 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
|
||||
- **Customizable Keybindings:** Assign your preferred hotkeys to interact with the currently playing video and queue
|
||||
|
||||
## Requirements
|
||||
|
||||
This script requires the following software to be installed on the system
|
||||
|
||||
- [xclip](https://github.com/astrand/xclip)
|
||||
- One of [xclip](https://github.com/astrand/xclip), [wl-clipboard](https://github.com/bugaevc/wl-clipboard), or any command-line utility that can paste from the system clipboard
|
||||
- Windows users can utilize `Get-Clipboard` from powershell by setting the `clipboard_command` in `mpv-youtube-queue.conf` file to the following: `clipboard_command=powershell -command Get-Clipboard`
|
||||
- [yt-dlp](https://github.com/yt-dlp/yt-dlp)
|
||||
|
||||
## Installation
|
||||
|
||||
- Copy the `mpv-youtube-queue.lua` script to your `~~/scripts` directory
|
||||
(`~/.config/mpv` on Linux)
|
||||
- Optionally copy the `mpv-youtube-queue.conf` to the `~~/script-opts` directory
|
||||
to customize the script configuration as described in the next section
|
||||
- Copy `mpv-youtube-queue.lua` script to your `~~/scripts` directory
|
||||
- `~/.config/mpv/scripts` on Linux
|
||||
- `%APPDATA%\mpv\scripts` on Windows
|
||||
- Optionally copy `mpv-youtube-queue.conf` to the `~~/script-opts` directory
|
||||
- `~/.config/mpv/script-opts` on Linux
|
||||
- `%APPDATA%\mpv\script-opts` on Windows
|
||||
to customize the script configuration as described in the next section
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -51,6 +43,8 @@ This script requires the following software to be installed on the system
|
||||
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
|
||||
- `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
|
||||
- `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
|
||||
@@ -60,31 +54,39 @@ 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
|
||||
playing video to the OSD
|
||||
- `print_queue - ctrl+q`: Print the contents of the queue to the OSD
|
||||
- `save_queue - ctrl+s`: Saves the queue using the chosen method in
|
||||
`default_save_method`
|
||||
- `save_queue_alt - ctrl+S`: Saves the queue using the method not chosen in
|
||||
`default_save_method`
|
||||
- `remove_from_queue - ctrl+x`: Remove the currently selected video from the
|
||||
queue
|
||||
- `play_selected_video - ctrl+ENTER`: Play the currently selected video in
|
||||
the queue
|
||||
|
||||
### Default Option
|
||||
### Default Options
|
||||
|
||||
- `default_save_method - unwatched`: The default method to use when saving the
|
||||
queue. Valid options are `unwatched` or `all`. Defaults to `unwatched`
|
||||
- Whichever option is chosen is the default method for the `save_queue`
|
||||
binding, and the other method will be bound to `save_queue_alt`
|
||||
- `browser - firefox`: The browser to use when opening a video or channel page
|
||||
- `clipboard_command - xclip -o`: The command to use to get the contents of the clipboard
|
||||
- `cursor_icon - ➤`: The icon to use for the cursor
|
||||
- `display_limit - 6`: The maximum amount of videos to show on the OSD at once
|
||||
- `download_directory - ~/videos/YouTube`: The directory to use when
|
||||
downloading a video
|
||||
- `display_limit - 10`: The maximum amount of videos to show on the OSD at once
|
||||
- `download_directory - ~/videos/YouTube`: The directory to use when downloading a video
|
||||
- `download_quality 720p`: The maximum download quality
|
||||
- `downloader - curl`: The name of the program to use to download the video
|
||||
- `font_name - JetBrains Mono`: The name of the font to use
|
||||
- `font_size - 12`: Size of the font
|
||||
- `marked_icon - ⇅`: The icon to use to mark a video as ready to be moved in
|
||||
the queue
|
||||
- `marked_icon - ⇅`: The icon to use to mark a video as ready to be moved in the queue
|
||||
- `menu_timeout - 5`: The number of seconds until the menu times out
|
||||
- `show_errors - yes`: Show error messages on the OSD
|
||||
- `ytdlp_file_format - mp4`: The preferred file format for downloaded videos
|
||||
- `ytdlp_output_template - %(uploader)s/%(title)s.%(ext)s`: The [yt-dlp output
|
||||
template string](https://github.com/yt-dlp/yt-dlp#output-template)
|
||||
- Full path with the default `download_directory`
|
||||
is: `~/videos/YouTube/<uploader>/<title>.<ext>`
|
||||
- `ytdlp_output_template - %(uploader)s/%(title)s.%(ext)s`: The [yt-dlp output template string](https://github.com/yt-dlp/yt-dlp#output-template)
|
||||
- Full path with the default `download_directory` is: `~/videos/YouTube/<uploader>/<title>.<ext>`
|
||||
- `use_history_db - no`: Enable watch history tracking through integration with [mpv-youtube-queue-server](https://gitea.suda.codes/sudacode/mpv-youtube-queue-server)
|
||||
- `backend_host`: ip or hostname of the backend server
|
||||
- `backend_port`: port to connect to for the backend server
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
add_to_queue=ctrl+a
|
||||
default_save_method=unwatched
|
||||
download_current_video=ctrl+d
|
||||
download_selected_video=ctrl+D
|
||||
move_cursor_down=ctrl+j
|
||||
move_cursor_up=ctrl+k
|
||||
load_queue=ctrl+l
|
||||
move_video=ctrl+m
|
||||
play_next_in_queue=ctrl+n
|
||||
open_video_in_browser=ctrl+o
|
||||
@@ -10,18 +12,24 @@ open_channel_in_browser=ctrl+O
|
||||
play_previous_in_queue=ctrl+p
|
||||
print_current_video=ctrl+P
|
||||
print_queue=ctrl+q
|
||||
save_queue=ctrl+s
|
||||
save_full_queue=ctrl+S
|
||||
remove_from_queue=ctrl+x
|
||||
play_selected_video=ctrl+ENTER
|
||||
browser=firefox
|
||||
clipboard_command=xclip -o
|
||||
cursor_icon=➤
|
||||
display_limit=6
|
||||
display_limit=10
|
||||
download_directory=~/videos/YouTube
|
||||
download_quality=720p
|
||||
downloader=curl
|
||||
font_name=JetBrains Mono
|
||||
font_name=JetBrainsMono
|
||||
font_size=12
|
||||
marked_icon=⇅
|
||||
menu_timeout=5
|
||||
show_errors=yes
|
||||
ytdlp_file_format=mp4
|
||||
ytdlp_output_template=%(uploader)s/%(title)s.%(ext)s
|
||||
use_history_db=no
|
||||
backend_host=http://localhost
|
||||
backend_port=42069
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user