l mpv: add sponsorblock
This commit is contained in:
parent
e92a58fe0f
commit
41935c401d
@ -76,15 +76,31 @@ let
|
|||||||
mp.add_key_binding('S', "download_subs", download)
|
mp.add_key_binding('S', "download_subs", download)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
mpvInput = pkgs.writeText "mpv.input" ''
|
||||||
|
: script-binding console/enable
|
||||||
|
'';
|
||||||
|
|
||||||
|
mpvConfig = pkgs.writeText "mpv.conf" ''
|
||||||
|
'';
|
||||||
|
|
||||||
mpv = pkgs.symlinkJoin {
|
mpv = pkgs.symlinkJoin {
|
||||||
name = "mpv";
|
name = "mpv";
|
||||||
paths = [
|
paths = [
|
||||||
(pkgs.writeDashBin "mpv" ''
|
(pkgs.writeDashBin "mpv" ''
|
||||||
exec ${pkgs.mpv}/bin/mpv \
|
# we need to disable sponsorblock local database because of
|
||||||
|
# https://github.com/po5/mpv_sponsorblock/issues/31
|
||||||
|
exec ${pkgs.mpv.override {
|
||||||
|
scripts = [
|
||||||
|
pkgs.mpvScripts.sponsorblock
|
||||||
|
];
|
||||||
|
}}/bin/mpv \
|
||||||
-vo=gpu \
|
-vo=gpu \
|
||||||
--no-config \
|
--no-config \
|
||||||
|
--input-conf=${mpvInput} \
|
||||||
|
--include=${mpvConfig} \
|
||||||
--script=${autosub} \
|
--script=${autosub} \
|
||||||
--script-opts=ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp \
|
--script-opts=ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp \
|
||||||
|
--script-opts-append=sponsorblock-local_database=no \
|
||||||
"$@"
|
"$@"
|
||||||
'')
|
'')
|
||||||
pkgs.mpv
|
pkgs.mpv
|
||||||
|
Loading…
Reference in New Issue
Block a user