summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-05-27 10:22:11 +0200
committerlassulus <lassulus@lassul.us>2022-05-27 10:22:11 +0200
commit41935c401d35328054e179455a4de9732c8bbe7c (patch)
tree4879bc23aadcca08493786c56a9fd0a78f36d8b3 /lass/2configs
parente92a58fe0f4edbf047ff4dd89866ae0991d37350 (diff)
l mpv: add sponsorblock
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/mpv.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/lass/2configs/mpv.nix b/lass/2configs/mpv.nix
index 854af3eb5..1061ea64c 100644
--- a/lass/2configs/mpv.nix
+++ b/lass/2configs/mpv.nix
@@ -76,15 +76,31 @@ let
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 {
name = "mpv";
paths = [
(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 \
--no-config \
+ --input-conf=${mpvInput} \
+ --include=${mpvConfig} \
--script=${autosub} \
--script-opts=ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp \
+ --script-opts-append=sponsorblock-local_database=no \
"$@"
'')
pkgs.mpv