Skip to content

Commit

Permalink
脚本更新
Browse files Browse the repository at this point in the history
  • Loading branch information
dyphire committed Dec 4, 2024
1 parent 0f89980 commit 5bae61c
Show file tree
Hide file tree
Showing 9 changed files with 1,359 additions and 1,220 deletions.
2 changes: 1 addition & 1 deletion manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"git":"https://github.com/stax76/mpv-scripts",
"branch":"main",
"whitelist":"command_palette%.lua$|delete_current_file%.lua$",
"whitelist":"delete_current_file%.lua$",
"dest":"~~/scripts"
},
{
Expand Down
31 changes: 16 additions & 15 deletions script-opts/playlistmanager.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ filename_replace=[{"protocol":{"all":true},"rules":[{"%%(%x%x)":"hex_to_char"}]}
#在启动时加载 1 个或多个文件到播放列表。注:此项与 autoload.lua 脚本功能重复
loadfiles_on_start=no

#允许播放列表管理器在文件之间导航时编写稍后观看配置
allow_write_watch_later_config=no

#空闲启动时从工作目录加载文件
loadfiles_on_idle_start=no

Expand All @@ -67,18 +64,25 @@ system=auto
#Use ~ 用于主目录。留空以使用 mpv/playlists
playlist_savepath=

#指定文件加载时显示的内容。2 显示播放列表,1 显示当前文件(文件名条已应用),0 不显示任何内容
show_playlist_on_fileload=0

#播放列表打开时同步当前播放文件所在位置(pos)
sync_cursor_on_load=yes

#当播放列表不可见时重置光标导航
reset_cursor_on_close=yes
#每次加载新文件时显示文件标题
show_title_on_file_load=no
#每次加载新文件时显示播放列表
show_playlist_on_file_load=no
#选择播放文件后关闭播放列表
close_playlist_on_playfile=no

##是否光标移动到末尾自动切换到首位条目
loop_cursor=yes

#当播放列表不可见时重置光标导航
reset_cursor_on_close=yes

#允许播放列表管理器在文件之间导航时编写稍后观看配置
allow_write_watch_later_config=no

#在保存、随机播放、反转播放列表时向 OSD 输出视觉反馈
display_osd_feedback=no

Expand All @@ -101,24 +105,21 @@ concurrent_title_resolve_limit=10
##播放列表在 OSD 显示的时长,默认值:5s
playlist_display_timeout=5

##截断后显示的列表条目数
##播放列表将呈现的最大行数。特殊值 -1 将自动计算,默认值:-1
showamount=13

##是否随窗口缩放
scale_playlist_by_window=yes

##播放列表的字体样式
#example {\fnUbuntu\fs10\b0\bord1} equals: font=Ubuntu, size=10, bold=no, border=1
#read http://docs.aegisub.org/3.2/ASS_Tags/ for reference of tags
#no 值默认为 mpv.conf 中的 OSD 设置
style_ass_tags={\fnNoto Sans CJK SC\fs10\b1\bord0.5}
style_ass_tags={\fnNoto Sans CJK SC\fs26\b1\bord0.5}

##左上方的边距
text_padding_x=10
text_padding_y=15

#菜指定单打开时屏幕的不透明度,值:0.0 - 1.0(0 表示透明(默认),1 表示不透明)
curtain_opacity=0.7
curtain_opacity=0.0

##是否修改 MPV 的窗口标题
set_title_stripped=no
Expand All @@ -127,7 +128,7 @@ title_suffix= - mpv

##是否切断长文件名,最大显示字符数
slice_longfilenames=yes
slice_longfilenames_amount=135
slice_longfilenames_amount=100

##播放列表标题
#%mediatitle or %filename = 播放文件的标题或名称
Expand Down
4 changes: 3 additions & 1 deletion scripts/delete-current-file.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

--[[
https://github.com/stax76/mpv-scripts
Expand All @@ -7,6 +8,7 @@
removed from the playlist.
On Linux the app trash-cli must be installed first.
On Ubuntu: sudo apt install trash-cli
Usage:
Add bindings to input.conf:
Expand Down Expand Up @@ -164,4 +166,4 @@ function client_message(event)
end
end

mp.register_event("client-message", client_message)
mp.register_event("client-message", client_message)
Loading

0 comments on commit 5bae61c

Please sign in to comment.