Skip to content

Commit a2222cb

Browse files
author
RandomEngy
committed
Fix problems playing DVDs in VLC 2.0 .
1 parent 472ee70 commit a2222cb

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

VidCoder/Model/Players/VlcPlayer.cs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,33 @@ public bool Installed
2020
public void PlayTitle(string discPath, int title)
2121
{
2222
string vlcExePath = RegKey.GetValue(string.Empty) as string;
23+
string version = RegKey.GetValue("Version") as string;
24+
25+
if (!discPath.EndsWith(@"\"))
26+
{
27+
discPath += @"\";
28+
}
29+
30+
string arguments;
31+
if (version.StartsWith("1"))
32+
{
33+
arguments = "DVD://\"" + discPath + "\\\"@" + title;
34+
}
35+
else
36+
{
37+
arguments = "dvd:///\"" + discPath + "\\\"#" + title;
38+
}
2339

2440
var process = new Process();
2541
process.StartInfo =
2642
new ProcessStartInfo
27-
{
43+
{
2844
FileName = vlcExePath,
29-
Arguments = "DVD://\"" + discPath + "\"@" + title
30-
};
45+
Arguments = arguments
46+
};
3147

3248
process.Start();
49+
3350
}
3451

3552
public string Id

0 commit comments

Comments
 (0)