Improve prioritization of signs/songs and forced subtitle tracks in mpv-sub-select

This commit is contained in:
xenofem 2023-07-21 21:19:59 -04:00
parent 6c5c7f2b00
commit 92e4ef22bc

View file

@ -58,34 +58,61 @@
home-manager.sharedModules = [ ({ config, ... }: {
config = lib.mkIf config.programs.mpv.enable {
xdg.configFile."mpv/script-opts/sub-select.json".text = builtins.toJSON [
{
alang = "j[ap]n?";
slang = [ "eng?" "und" ];
blacklist = [ "sign" ];
condition = "not sub.forced";
}
{
alang = "eng?";
slang = "forced";
}
# English audio:
# 1. English signs/songs subs
# 2. Forced subs
# 3. No subs
{
alang = "eng?";
slang = "eng?";
whitelist = [ "sign" "song" ];
}
{
alang = "eng?";
slang = "forced";
}
{
alang = [ "eng?" "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 = "*";
slang = "eng?";
blacklist = [ "sign" "song" ];
}
{
alang = "*";
slang = "und";
blacklist = [ "sign" "song" ];
condition = "not sub.forced";
}
{
alang = "*";
slang = "und";
condition = "not sub.forced";
blacklist = [ "sign" "song" ];
}
{
alang = "*";
slang = "eng?";
}
{
alang = "*";
slang = "und";
}
{
alang = "*";