ShokoAnime / ShokoDesktop

Repository for Shoko Desktop
http://shokoanime.com/shokodesktop/
103 stars 24 forks source link

Possible bug in vlcEnqueueUrl string formatting? #633

Open complex2d opened 7 months ago

complex2d commented 7 months ago

VERSION INFORMATION

Server Version: 4.2.2.0 Desktop Version: 4.2.1.0

LOG FILE

No Shoko server specific log messages, however the VLC log dropped into the Shoko Desktop directory is attached here: vlc-log.txt

DESCRIPTION

If I configure Shoko Desktop to use VLC as its video player, navigating to the Episodes tab of any series and clicking Play on any episode results in the following error from the latest version of VLC:

image

However if I explicitly try to stream the content at that URI (without file:///) by going to "Media" > "Open Network Stream", playback starts and functions normally.

Upon investigation, it looks like Shoko is instructing VLC to open the network location as a file, which is probably incorrect. I could be wrong though. https://github.com/ShokoAnime/ShokoDesktop/blob/master/Shoko.Desktop/VideoPlayers/VLCVideoPlayer.cs#L126

string vlcEnqueueUrl =
    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}";

Description of my setup: Shoko Server 4.2.2.0 is running in a Docker container on my Ubuntu 22.04.3 LTS system. My collection exists on a Synology NAS that both my Ubuntu server and windows desktop mount over the network. Shoko Desktop 4.2.1.0 is running on my Windows 11 system and connects to Shoko Server over the network.

STEPS TO REPRODUCE

  1. Set up a configuration similar to mine, with Shoko Server and Desktop running on different hardware.
  2. Install the latest version of VLC on the Windows 11 system where Shoko Desktop is installed and enable web control within VLC's settings.
  3. Configure Shoko Desktop to use VLC as its default video player.
  4. Navigate to the Episodes tab of any series in your collection and attempt to play any episode. VLC will launch and immediately throw the aforementioned error.
da3dsoul commented 7 months ago

I'll look at it during WAN show tonight

da3dsoul commented 7 months ago

Grab a daily from https://shokoanime.com/files/shoko-desktop/daily/ShokoDesktop.zip I fixed it a while back, but we haven't done a release.

complex2d commented 7 months ago

Thanks very much for taking a look. I'll definitely grab a daily and test it out as soon as I can.

Edit: Yup, the daily addressed the issue.