Improve prioritization of signs/songs and forced subtitle tracks in mpv-sub-select
This commit is contained in:
parent
6c5c7f2b00
commit
92e4ef22bc
49
flake.nix
49
flake.nix
|
@ -58,34 +58,61 @@
|
||||||
home-manager.sharedModules = [ ({ config, ... }: {
|
home-manager.sharedModules = [ ({ config, ... }: {
|
||||||
config = lib.mkIf config.programs.mpv.enable {
|
config = lib.mkIf config.programs.mpv.enable {
|
||||||
xdg.configFile."mpv/script-opts/sub-select.json".text = builtins.toJSON [
|
xdg.configFile."mpv/script-opts/sub-select.json".text = builtins.toJSON [
|
||||||
{
|
# English audio:
|
||||||
alang = "j[ap]n?";
|
# 1. English signs/songs subs
|
||||||
slang = [ "eng?" "und" ];
|
# 2. Forced subs
|
||||||
blacklist = [ "sign" ];
|
# 3. No subs
|
||||||
condition = "not sub.forced";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
alang = "eng?";
|
|
||||||
slang = "forced";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
alang = "eng?";
|
alang = "eng?";
|
||||||
slang = "eng?";
|
slang = "eng?";
|
||||||
whitelist = [ "sign" "song" ];
|
whitelist = [ "sign" "song" ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
alang = "eng?";
|
||||||
|
slang = "forced";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
alang = [ "eng?" "no" ];
|
alang = [ "eng?" "no" ];
|
||||||
slang = "no";
|
slang = "no";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Non-English audio:
|
||||||
|
# 1. English non-signs non-forced subs
|
||||||
|
# 2. English non-signs forced subs
|
||||||
|
# 3. Undefined non-signs non-forced subs
|
||||||
|
# 4. Undefined non-signs forced subs
|
||||||
|
# 5. English signs/songs subs, I guess
|
||||||
|
# 6. Undefined signs/songs subs, I guess
|
||||||
|
# 7. Forced subs in other languages, I guess
|
||||||
|
{
|
||||||
|
alang = "*";
|
||||||
|
slang = "eng?";
|
||||||
|
blacklist = [ "sign" "song" ];
|
||||||
|
condition = "not sub.forced";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
alang = "*";
|
alang = "*";
|
||||||
slang = "eng?";
|
slang = "eng?";
|
||||||
|
blacklist = [ "sign" "song" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
alang = "*";
|
||||||
|
slang = "und";
|
||||||
|
blacklist = [ "sign" "song" ];
|
||||||
condition = "not sub.forced";
|
condition = "not sub.forced";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
alang = "*";
|
alang = "*";
|
||||||
slang = "und";
|
slang = "und";
|
||||||
condition = "not sub.forced";
|
blacklist = [ "sign" "song" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
alang = "*";
|
||||||
|
slang = "eng?";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
alang = "*";
|
||||||
|
slang = "und";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
alang = "*";
|
alang = "*";
|
||||||
|
|
Loading…
Reference in a new issue