Skip to content

Commit

Permalink
Fix Feeding VLC File with Reserved Names
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Oct 6, 2023
1 parent 5b0bfdf commit f7721a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Shoko.Desktop/VideoPlayers/VLCVideoPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
Expand Down Expand Up @@ -119,10 +120,10 @@ internal override void FileChangeEvent(string filePath)

private async void AddFileToQueue(VideoInfo video)
{
string videoPath = video.Uri;
string videoPath = WebUtility.UrlEncode(video.Uri);
int startTime = (int) video.ResumePosition;
string vlcEnqueueUrl =
$"http://localhost:{webUIPort}/requests/status.xml?command=in_enqueue&input=file:///{videoPath}";
videoPath.StartsWith("http") ? $"http://localhost:{webUIPort}/requests/status.xml?command=in_enqueue&input={videoPath}" : $"http://localhost:{webUIPort}/requests/status.xml?command=in_enqueue&input=file:///{videoPath}";
try
{
// Make HTTP request to Web UI
Expand Down

0 comments on commit f7721a6

Please sign in to comment.