mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
update GetChildCount
This commit is contained in:
parent
fd3ff632d4
commit
bcfe86dd16
4 changed files with 9 additions and 18 deletions
|
@ -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()
|
public override bool IsSaveLocalMetadataEnabled()
|
||||||
{
|
{
|
||||||
if (IsAccessedByName)
|
if (IsAccessedByName)
|
||||||
|
|
|
@ -8,7 +8,6 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
||||||
public string FFProbeFilename { get; set; }
|
public string FFProbeFilename { get; set; }
|
||||||
public string ArchiveType { get; set; }
|
public string ArchiveType { get; set; }
|
||||||
public string[] DownloadUrls { get; set; }
|
public string[] DownloadUrls { get; set; }
|
||||||
public bool IsEmbedded { get; set; }
|
|
||||||
|
|
||||||
public FFMpegInstallInfo()
|
public FFMpegInstallInfo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -197,22 +197,6 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
||||||
|
|
||||||
private async Task DownloadFFMpeg(FFMpegInstallInfo downloadinfo, string directory, IProgress<double> progress)
|
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)
|
foreach (var url in downloadinfo.DownloadUrls)
|
||||||
{
|
{
|
||||||
progress.Report(0);
|
progress.Report(0);
|
||||||
|
|
|
@ -160,7 +160,6 @@ namespace MediaBrowser.ServerApplication.Native
|
||||||
info.FFProbeFilename = "ffprobe.exe";
|
info.FFProbeFilename = "ffprobe.exe";
|
||||||
info.Version = "20160410";
|
info.Version = "20160410";
|
||||||
info.ArchiveType = "7z";
|
info.ArchiveType = "7z";
|
||||||
info.IsEmbedded = false;
|
|
||||||
info.DownloadUrls = GetDownloadUrls();
|
info.DownloadUrls = GetDownloadUrls();
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
|
Loading…
Reference in a new issue