environment variables and more

This commit is contained in:
stax76
2023-10-31 09:44:20 +01:00
parent ea8944c1cc
commit 4c4088b28a
10 changed files with 140 additions and 119 deletions

View File

@@ -25,7 +25,8 @@ public class Command
["cycle-audio"] = args => CycleAudio(), // deprecated
["cycle-subtitles"] = args => CycleSubtitles(), // deprecated
["playlist-first"] = args => PlaylistFirst(), // deprecated
["playlist-last"] = args => PlaylistLast(), // deprecated
["playlist-last"] = args => PlaylistLast(), // deprecated
["playlist-random"] = args => PlaylistRandom(), // deprecated
};
public string FormatTime(double value) => ((int)value).ToString("00");
@@ -175,4 +176,11 @@ public class Command
if (Player.PlaylistPos < count - 1)
Player.SetPropertyInt("playlist-pos", count - 1);
}
// deprecated
public static void PlaylistRandom()
{
int count = Player.GetPropertyInt("playlist-count");
Player.SetPropertyInt("playlist-pos", new Random().Next(count));
}
}