mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-08 23:00:51 +02:00
update GetChildCount
This commit is contained in:
parent
fd3ff632d4
commit
bcfe86dd16
|
@ -79,6 +79,15 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
}
|
||||
}
|
||||
|
||||
public override int GetChildCount(User user)
|
||||
{
|
||||
if (IsAccessedByName)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return base.GetChildCount(user);
|
||||
}
|
||||
|
||||
public override bool IsSaveLocalMetadataEnabled()
|
||||
{
|
||||
if (IsAccessedByName)
|
||||
|
|
|
@ -8,7 +8,6 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
|||
public string FFProbeFilename { get; set; }
|
||||
public string ArchiveType { get; set; }
|
||||
public string[] DownloadUrls { get; set; }
|
||||
public bool IsEmbedded { get; set; }
|
||||
|
||||
public FFMpegInstallInfo()
|
||||
{
|
||||
|
|
|
@ -197,22 +197,6 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
|||
|
||||
private async Task DownloadFFMpeg(FFMpegInstallInfo downloadinfo, string directory, IProgress<double> progress)
|
||||
{
|
||||
if (downloadinfo.IsEmbedded)
|
||||
{
|
||||
var tempFile = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid().ToString());
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(tempFile));
|
||||
|
||||
using (var stream = _ownerAssembly.GetManifestResourceStream(downloadinfo.DownloadUrls[0]))
|
||||
{
|
||||
using (var fs = _fileSystem.GetFileStream(tempFile, FileMode.Create, FileAccess.Write, FileShare.Read, true))
|
||||
{
|
||||
await stream.CopyToAsync(fs).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
ExtractFFMpeg(downloadinfo, tempFile, directory);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var url in downloadinfo.DownloadUrls)
|
||||
{
|
||||
progress.Report(0);
|
||||
|
|
|
@ -160,7 +160,6 @@ namespace MediaBrowser.ServerApplication.Native
|
|||
info.FFProbeFilename = "ffprobe.exe";
|
||||
info.Version = "20160410";
|
||||
info.ArchiveType = "7z";
|
||||
info.IsEmbedded = false;
|
||||
info.DownloadUrls = GetDownloadUrls();
|
||||
|
||||
return info;
|
||||
|
|
Loading…
Reference in a new issue