Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Jellyfin.Plugin.FinTube/Api/FinTubeActivityController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ public ActionResult<Dictionary<string, object>> FinTubeDownload([FromBody] FinTu

status += $"Filename: {targetFilename}<br>";

String args;
// Use built-in ffmpeg
String args = "--ffmpeg-location /usr/lib/jellyfin-ffmpeg/ffmpeg";
if(data.audioonly)
{
args = "-x";
args += " -x";
if(data.preferfreeformat)
args += " --prefer-free-format";
else
Expand All @@ -123,9 +124,9 @@ public ActionResult<Dictionary<string, object>> FinTubeDownload([FromBody] FinTu
else
{
if(data.preferfreeformat)
args = "--prefer-free-format";
args += " --prefer-free-format";
else
args = "-f mp4";
args += " -f mp4";
if(!string.IsNullOrEmpty(data.videoresolution))
args += $" -S res:{data.videoresolution}";
args += $" -o \"{targetFilename}-%(title)s.%(ext)s\" {data.ytid}";
Expand Down Expand Up @@ -185,4 +186,4 @@ private static Process createProcess(String exe, String args)
ProcessStartInfo startInfo = new ProcessStartInfo() { FileName = exe, Arguments = args };
return new Process() { StartInfo = startInfo };
}
}
}