update GetChildCount

This commit is contained in:
Luke Pulverenti 2016-06-16 14:18:38 -04:00
parent fd3ff632d4
commit bcfe86dd16
4 changed files with 9 additions and 18 deletions

View File

@ -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)

View File

@ -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()
{

View File

@ -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);

View File

@ -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;