Cycle audio was not working for BluRay
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
which was difficult to choose and extremely slow.
|
which was difficult to choose and extremely slow.
|
||||||
- BluRay folder paths are auto detected when received
|
- BluRay folder paths are auto detected when received
|
||||||
from drag & drop and command line.
|
from drag & drop and command line.
|
||||||
|
- Cycle audio was not working for BluRay.
|
||||||
|
|
||||||
|
|
||||||
5.4.8.3 Beta
|
5.4.8.3 Beta
|
||||||
|
|||||||
@@ -288,27 +288,19 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void CycleAudio()
|
public static void CycleAudio()
|
||||||
{
|
{
|
||||||
string path = core.get_property_string("path");
|
MediaTrack[] audTracks = core.MediaTracks.Where(track => track.Type == "a").ToArray();
|
||||||
|
|
||||||
if (!File.Exists(path))
|
if (audTracks.Length < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
using (MediaInfo mi = new MediaInfo(path))
|
int aid = core.get_property_int("aid");
|
||||||
{
|
aid += 1;
|
||||||
MediaTrack[] audTracks = core.MediaTracks.Where(track => track.Type == "a").ToArray();
|
|
||||||
|
|
||||||
if (audTracks.Length < 2)
|
if (aid > audTracks.Length)
|
||||||
return;
|
aid = 1;
|
||||||
|
|
||||||
int aid = core.get_property_int("aid");
|
core.commandv("set", "aid", aid.ToString());
|
||||||
aid += 1;
|
core.commandv("show-text", audTracks[aid - 1].Text.Substring(3), "5000");
|
||||||
|
|
||||||
if (aid > audTracks.Length)
|
|
||||||
aid = 1;
|
|
||||||
|
|
||||||
core.commandv("set", "aid", aid.ToString());
|
|
||||||
core.commandv("show-text", audTracks[aid - 1].Text.Substring(3), "5000");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ShowProfiles()
|
static void ShowProfiles()
|
||||||
|
|||||||
Reference in New Issue
Block a user