Skip to content

Commit

Permalink
脚本更新
Browse files Browse the repository at this point in the history
  • Loading branch information
dyphire committed Jul 13, 2022
1 parent 3b29643 commit a79506d
Show file tree
Hide file tree
Showing 16 changed files with 358 additions and 228 deletions.
7 changes: 4 additions & 3 deletions manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@
{
"git":"https://github.com/christoph-heinrich/mpv-quality-menu",
"whitelist":"qualityu%-menu%.lua$",
"dest":"~~/scripts"
"dest":"~~/scripts",
"branch":"get_json_from_ytdl_hook"
},
{
"git":"https://github.com/cvzi/mpv-youtube-download",
"git":"https://github.com/dyphire/mpv-youtube-download",
"whitelist":"%.lua$",
"dest":"~~/scripts",
"branch":"main"
"branch":"dev"
},
{
"git":"https://github.com/jonniek/mpv-playlistmanager",
Expand Down
4 changes: 2 additions & 2 deletions script-opts/autoload.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ audio=no
##是否掠过隐藏文件,默认:yes
#ignore_hidden=yes

##基于当前文件在当前路径中的序列,前后各追加的条目数上限,必须是大于0的整数,默认为500
#max_entries=500
##基于当前文件在当前路径中的序列,前后各追加的条目数上限,必须是大于0的整数,默认为5000
#max_entries=5000
4 changes: 4 additions & 0 deletions script-opts/file_browser.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ subtitle_extensions=etf,etf8,utf-8,idx,sub,srt,rt,ssa,ass,mks,vtt,sup,scc,smi,lr
filter_dot_dirs=no
filter_dot_files=no

#将本地文件追加到播放列表时,用正斜杠代替反斜杠
#在Windows系统上可能有用,默认值:no
substitute_backslash=yes

#这个选项可反转 alt+ENTER 键绑定的行为
#当禁用密钥绑定,则需要为文件启用自动加载
#当启用键绑定将禁用文件的自动加载
Expand Down
3 changes: 2 additions & 1 deletion script-opts/history_bookmark.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ enabled=yes
## 保存记录延迟时间,毫秒
#save_period=30
## 视频目录播放记录文件的保存路径
## 改为'~~/'以指定portable_config目录,或者使用'/:var'指定环境变量,比如'/:var%APPDATA%'或'/:var%HOME%',也可以直接使用绝对路径
## 使用'/:dir%mpvconf%'或'~~/'以指定portable_config目录,或者使用'/:dir%script%'指定脚本所在目录
## 或者使用'/:var'指定环境变量,比如'/:var%APPDATA%'或'/:var%HOME%',也可以直接使用绝对路径
history_dir=/:var%APPDATA%/mpv/files/historybookmarks
## 目录播放记录文件的后缀名称
bookmark_ext=.mpv.history
Expand Down
9 changes: 0 additions & 9 deletions script-opts/quality-menu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ select_binding=ENTER MBTN_LEFT
close_menu_binding=ESC MBTN_RIGHT CTRL+F ALT+F
###### 键绑定 ######

#使用ytdl加载网络文件后自动获取音视频格式,默认:yes
fetch_on_start=no

#打开网络视频后显示视频格式菜单,默认:yes
start_with_menu=no

Expand All @@ -24,9 +21,6 @@ unselected_and_inactive=○ -
# 字体大小按窗口缩放,如果为否需要更大的字体和填充大小
scale_playlist_by_window=yes

# 指定要使用的youtube-dl程序,默认yt-dlp(可能是 youtube-dl 或 yt-dlp,或者其他什么)
#ytdl_ver=yt-dlp

# 播放列表屁股样式覆盖大括号内。\keyvalue 是一个字段,额外 \ 用于 lua 中的转义
# example {\\fnUbuntu\\fs10\\b0\\bord1} equals: font=Ubuntu, size=10, bold=no, border=1
# 标签参考 http://docs.aegisub.org/3.2/ASS_Tags/
Expand All @@ -43,9 +37,6 @@ text_padding_y=5
# 质量菜单超时的秒数
menu_timeout=6

#use youtube-dl 获取可用格式的列表(覆盖quality_strings)
fetch_formats=yes

# 可供选择的 ytdl 格式字符串列表。和上面的选项不能共存
quality_strings=[ {"4320p" : "bestvideo[height<=?4320p]+bestaudio/best"}, {"2160p" : "bestvideo[height<=?2160]+bestaudio/best"}, {"1440p" : "bestvideo[height<=?1440]+bestaudio/best"}, {"1080p" : "bestvideo[height<=?1080]+bestaudio/best"}, {"720p" : "bestvideo[height<=?720]+bestaudio/best"}, {"480p" : "bestvideo[height<=?480]+bestaudio/best"}, {"360p" : "bestvideo[height<=?360]+bestaudio/best"}, {"240p" : "bestvideo[height<=?240]+bestaudio/best"}, {"144p" : "bestvideo[height<=?144]+bestaudio/best"} ]

Expand Down
2 changes: 1 addition & 1 deletion script-opts/simplebookmark.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bookmark_loads_last_idle=yes
bookmark_fileonly_loads_last_idle=yes

#--yes is for marking the bookmarked time as a chapter. no disables mark as chapter behavior.
mark_bookmark_as_chapter=no
mark_bookmark_as_chapter=yes

#--Keybind that will be used to save the video and its time to log file
bookmark_save_keybind=[""]
Expand Down
18 changes: 13 additions & 5 deletions script-opts/youtube-download.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
# * 使用$PLAYLIST为每个播放列表创建一个存档,例如 download_archive="/home/user/archives/$PLAYLIST.txt"
#download_archive="$PLAYLIST.txt"

# 文件名或完整路径
# 类似 youtube-dl -o
# 见 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template
#filename=C:\Users\username\Downloads\%(title)s.%(ext)s
filename=ytdl/%(title)s.%(ext)s
# 指定文件下载路径
## 使用'/:dir%mpvconf%'或'~~/'以指定portable_config目录,或者使用'/:dir%script%'指定脚本所在目录
## 或者使用'/:var'指定环境变量,比如'/:var%APPDATA%'或'/:var%HOME%',也可以直接使用绝对路径
download_path=~~/files/ytdl/download
# 文件名格式
filename=%(title)s.%(ext)s

# 使用 Cookie 文件进行 youtube-dl
# 与 youtube-dl --cookies 相同
Expand All @@ -58,3 +59,10 @@ youtube_dl_exe=yt-dlp
#download_audio_config_file=C:\Users\username\audio_config.txt
#download_subtitle_config_file=C:\Users\username\subtitle_config.txt
#download_video_embed_subtitle_config_file=C:\Users\username\embeded_config.txt

# 打开一个新的 "Windows Terminal" 窗口/标签页进行下载
# 这允许监控下载进度
# 目前仅适用于 Windows 和新的 wt.exe 终端
open_new_terminal=no
# 如果open_new_terminal_autoclose为yes,则终端窗口下载后将关闭,即使存在错误
open_new_terminal_autoclose=no
2 changes: 1 addition & 1 deletion scripts/autoload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ o = {
videos = true,
audio = true,
sameseries = false,
max_entries = 500,
max_entries = 5000,
ignore_hidden = true
}
options.read_options(o)
Expand Down
Loading

0 comments on commit a79506d

Please sign in to comment.