mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-02 08:23:04 +00:00
improve smb support
This commit is contained in:
@@ -70,7 +70,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
.CreateJob(options, EncodingHelper, IsVideoEncoder, progress, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
encodingJob.OutputFilePath = GetOutputFilePath(encodingJob);
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(encodingJob.OutputFilePath));
|
||||
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(encodingJob.OutputFilePath));
|
||||
|
||||
encodingJob.ReadInputAtNativeFramerate = options.ReadInputAtNativeFramerate;
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
Logger.Info(commandLineLogMessage);
|
||||
|
||||
var logFilePath = Path.Combine(ConfigurationManager.CommonApplicationPaths.LogDirectoryPath, "transcode-" + Guid.NewGuid() + ".txt");
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(logFilePath));
|
||||
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(logFilePath));
|
||||
|
||||
// FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory.
|
||||
encodingJob.LogFileStream = FileSystem.GetFileStream(logFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true);
|
||||
|
||||
@@ -45,6 +45,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
/// <returns>System.String.</returns>
|
||||
private static string GetFileInputArgument(string path)
|
||||
{
|
||||
if (path.IndexOf("://") != -1)
|
||||
{
|
||||
return string.Format("\"{0}\"", path);
|
||||
}
|
||||
|
||||
// Quotes are valid path characters in linux and they need to be escaped here with a leading \
|
||||
path = NormalizePath(path);
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
|
||||
if (EnableEncoderFontFile)
|
||||
{
|
||||
var directory = Path.GetDirectoryName(FFMpegPath);
|
||||
var directory = FileSystem.GetDirectoryName(FFMpegPath);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(directory) && FileSystem.ContainsSubPath(ConfigurationManager.ApplicationPaths.ProgramDataPath, directory))
|
||||
{
|
||||
@@ -415,7 +415,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
|
||||
private string GetProbePathFromEncoderPath(string appPath)
|
||||
{
|
||||
return FileSystem.GetFilePaths(Path.GetDirectoryName(appPath))
|
||||
return FileSystem.GetFilePaths(FileSystem.GetDirectoryName(appPath))
|
||||
.FirstOrDefault(i => string.Equals(Path.GetFileNameWithoutExtension(i), "ffprobe", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
}
|
||||
|
||||
var tempExtractPath = Path.Combine(ConfigurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + ".jpg");
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(tempExtractPath));
|
||||
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(tempExtractPath));
|
||||
|
||||
// apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600.
|
||||
// This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff ar
|
||||
|
||||
Reference in New Issue
Block a user