mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 09:34:44 +01:00
update components
This commit is contained in:
@@ -1254,7 +1254,7 @@ namespace Emby.Server.Implementations
|
||||
{
|
||||
switch (EnvironmentInfo.SystemArchitecture)
|
||||
{
|
||||
case Architecture.X64:
|
||||
case MediaBrowser.Model.System.Architecture.X64:
|
||||
return new[]
|
||||
{
|
||||
"https://embydata.com/downloads/ffmpeg/osx/ffmpeg-x64-20170308.7z"
|
||||
@@ -1268,12 +1268,12 @@ namespace Emby.Server.Implementations
|
||||
{
|
||||
switch (EnvironmentInfo.SystemArchitecture)
|
||||
{
|
||||
case Architecture.X64:
|
||||
case MediaBrowser.Model.System.Architecture.X64:
|
||||
return new[]
|
||||
{
|
||||
"https://embydata.com/downloads/ffmpeg/windows/ffmpeg-20170308-win64.7z"
|
||||
};
|
||||
case Architecture.X86:
|
||||
case MediaBrowser.Model.System.Architecture.X86:
|
||||
return new[]
|
||||
{
|
||||
"https://embydata.com/downloads/ffmpeg/windows/ffmpeg-20170308-win32.7z"
|
||||
@@ -1287,12 +1287,12 @@ namespace Emby.Server.Implementations
|
||||
{
|
||||
switch (EnvironmentInfo.SystemArchitecture)
|
||||
{
|
||||
case Architecture.X64:
|
||||
case MediaBrowser.Model.System.Architecture.X64:
|
||||
return new[]
|
||||
{
|
||||
"https://embydata.com/downloads/ffmpeg/linux/ffmpeg-git-20170301-64bit-static.7z"
|
||||
};
|
||||
case Architecture.X86:
|
||||
case MediaBrowser.Model.System.Architecture.X86:
|
||||
return new[]
|
||||
{
|
||||
"https://embydata.com/downloads/ffmpeg/linux/ffmpeg-git-20170301-32bit-static.7z"
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
|
||||
namespace Emby.Server.Implementations
|
||||
{
|
||||
public static class ApplicationPathHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the path to the application's ProgramDataFolder
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string GetProgramDataPath(string applicationPath)
|
||||
{
|
||||
var useDebugPath = false;
|
||||
|
||||
#if DEBUG
|
||||
useDebugPath = true;
|
||||
#endif
|
||||
|
||||
var programDataPath = useDebugPath ?
|
||||
ConfigurationManager.AppSettings["DebugProgramDataPath"] :
|
||||
ConfigurationManager.AppSettings["ReleaseProgramDataPath"];
|
||||
|
||||
programDataPath = programDataPath.Replace("%ApplicationData%", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
|
||||
|
||||
programDataPath = programDataPath
|
||||
.Replace('/', Path.DirectorySeparatorChar)
|
||||
.Replace('\\', Path.DirectorySeparatorChar);
|
||||
|
||||
// If it's a relative path, e.g. "..\"
|
||||
if (!Path.IsPathRooted(programDataPath))
|
||||
{
|
||||
var path = Path.GetDirectoryName(applicationPath);
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
throw new ApplicationException("Unable to determine running assembly location");
|
||||
}
|
||||
|
||||
programDataPath = Path.Combine(path, programDataPath);
|
||||
|
||||
programDataPath = Path.GetFullPath(programDataPath);
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(programDataPath);
|
||||
|
||||
return programDataPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Server.Implementations.Devices;
|
||||
using Emby.Server.Implementations.Playlists;
|
||||
using MediaBrowser.Controller.Channels;
|
||||
using MediaBrowser.Controller.Collections;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
@@ -25,8 +27,6 @@ using MediaBrowser.Model.LiveTv;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Server.Implementations.Devices;
|
||||
using MediaBrowser.Server.Implementations.Playlists;
|
||||
using MediaBrowser.Model.Reflection;
|
||||
using SQLitePCL.pretty;
|
||||
using MediaBrowser.Model.System;
|
||||
|
||||
@@ -10,7 +10,6 @@ using MediaBrowser.Controller.IO;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Server.Implementations.Devices;
|
||||
|
||||
namespace Emby.Server.Implementations.Devices
|
||||
{
|
||||
|
||||
71
Emby.Server.Implementations/Devices/CameraUploadsFolder.cs
Normal file
71
Emby.Server.Implementations/Devices/CameraUploadsFolder.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
|
||||
namespace Emby.Server.Implementations.Devices
|
||||
{
|
||||
public class CameraUploadsFolder : BasePluginFolder, ISupportsUserSpecificView
|
||||
{
|
||||
public CameraUploadsFolder()
|
||||
{
|
||||
Name = "Camera Uploads";
|
||||
}
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
if (!user.Policy.EnableAllFolders && !user.Policy.EnabledFolders.Contains(Id.ToString("N"), StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.IsVisible(user) && HasChildren();
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override string CollectionType
|
||||
{
|
||||
get { return MediaBrowser.Model.Entities.CollectionType.Photos; }
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsInheritedParentImages
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetClientTypeName()
|
||||
{
|
||||
return typeof(CollectionFolder).Name;
|
||||
}
|
||||
|
||||
private bool? _hasChildren;
|
||||
private bool HasChildren()
|
||||
{
|
||||
if (!_hasChildren.HasValue)
|
||||
{
|
||||
_hasChildren = LibraryManager.GetItemIds(new InternalItemsQuery { Parent = this }).Count > 0;
|
||||
}
|
||||
|
||||
return _hasChildren.Value;
|
||||
}
|
||||
|
||||
protected override Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
||||
{
|
||||
_hasChildren = null;
|
||||
return base.ValidateChildrenInternal(progress, cancellationToken, recursive, refreshChildMetadata, refreshOptions, directoryService);
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool EnableUserSpecificView
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,6 @@
|
||||
<Compile Include="AppBase\BaseConfigurationManager.cs" />
|
||||
<Compile Include="AppBase\ConfigurationHelper.cs" />
|
||||
<Compile Include="ApplicationHost.cs" />
|
||||
<Compile Include="ApplicationPathHelper.cs" />
|
||||
<Compile Include="Archiving\ZipClient.cs" />
|
||||
<Compile Include="Branding\BrandingConfigurationFactory.cs" />
|
||||
<Compile Include="Browser\BrowserLauncher.cs" />
|
||||
@@ -83,6 +82,7 @@
|
||||
<Compile Include="Data\SqliteUserRepository.cs" />
|
||||
<Compile Include="Data\TypeMapper.cs" />
|
||||
<Compile Include="Devices\CameraUploadsDynamicFolder.cs" />
|
||||
<Compile Include="Devices\CameraUploadsFolder.cs" />
|
||||
<Compile Include="Devices\DeviceId.cs" />
|
||||
<Compile Include="Devices\DeviceManager.cs" />
|
||||
<Compile Include="Devices\DeviceRepository.cs" />
|
||||
@@ -458,6 +458,7 @@
|
||||
<Compile Include="Data\CleanDatabaseScheduledTask.cs" />
|
||||
<Compile Include="Data\SqliteExtensions.cs" />
|
||||
<Compile Include="Photos\PhotoAlbumImageProvider.cs" />
|
||||
<Compile Include="Playlists\ManualPlaylistsFolder.cs" />
|
||||
<Compile Include="Playlists\PlaylistImageProvider.cs" />
|
||||
<Compile Include="Playlists\PlaylistManager.cs" />
|
||||
<Compile Include="Playlists\PlaylistsDynamicFolder.cs" />
|
||||
@@ -635,10 +636,6 @@
|
||||
<Project>{442b5058-dcaf-4263-bb6a-f21e31120a1b}</Project>
|
||||
<Name>MediaBrowser.Providers</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MediaBrowser.Server.Implementations\MediaBrowser.Server.Implementations.csproj">
|
||||
<Project>{2e781478-814d-4a48-9d80-bff206441a65}</Project>
|
||||
<Name>MediaBrowser.Server.Implementations</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MediaBrowser.WebDashboard\MediaBrowser.WebDashboard.csproj">
|
||||
<Project>{5624b7b5-b5a7-41d8-9f10-cc5611109619}</Project>
|
||||
<Name>MediaBrowser.WebDashboard</Name>
|
||||
@@ -663,12 +660,10 @@
|
||||
<HintPath>..\ThirdParty\emby\Emby.Server.MediaEncoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Emby.XmlTv, Version=1.0.6387.29335, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Emby.XmlTv.1.0.9\lib\portable-net45+win8\Emby.XmlTv.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Emby.XmlTv.1.0.10\lib\portable-net45+netstandard2.0+win8\Emby.XmlTv.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MediaBrowser.Naming, Version=1.0.6279.25941, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MediaBrowser.Naming.1.0.5\lib\portable-net45+win8\MediaBrowser.Naming.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="MediaBrowser.Naming, Version=1.0.6437.24226, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MediaBrowser.Naming.1.0.6\lib\portable-net45+netstandard2.0+win8\MediaBrowser.Naming.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Emby.Server.Implementations.IO
|
||||
RestartTimer();
|
||||
}
|
||||
|
||||
private async void OnTimerCallback(object state)
|
||||
private void OnTimerCallback(object state)
|
||||
{
|
||||
List<string> paths;
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace Emby.Server.Implementations.IO
|
||||
|
||||
try
|
||||
{
|
||||
await ProcessPathChanges(paths.ToList()).ConfigureAwait(false);
|
||||
ProcessPathChanges(paths.ToList());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ namespace Emby.Server.Implementations.IO
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ProcessPathChanges(List<string> paths)
|
||||
private void ProcessPathChanges(List<string> paths)
|
||||
{
|
||||
var itemsToRefresh = paths
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Playlists;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
|
||||
namespace Emby.Server.Implementations.Playlists
|
||||
{
|
||||
public class PlaylistsFolder : BasePluginFolder
|
||||
{
|
||||
public PlaylistsFolder()
|
||||
{
|
||||
Name = "Playlists";
|
||||
}
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
return base.IsVisible(user) && GetChildren(user, true).Any();
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
|
||||
{
|
||||
return base.GetEligibleChildrenForRecursiveChildren(user).OfType<Playlist>();
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool IsHidden
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsInheritedParentImages
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override string CollectionType
|
||||
{
|
||||
get { return MediaBrowser.Model.Entities.CollectionType.Playlists; }
|
||||
}
|
||||
|
||||
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
||||
{
|
||||
query.Recursive = false;
|
||||
return base.GetItemsInternal(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Server.Implementations.Playlists;
|
||||
|
||||
namespace Emby.Server.Implementations.Playlists
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Emby.XmlTv" version="1.0.9" targetFramework="net46" />
|
||||
<package id="MediaBrowser.Naming" version="1.0.5" targetFramework="portable45-net45+win8" />
|
||||
<package id="Emby.XmlTv" version="1.0.10" targetFramework="net46" />
|
||||
<package id="MediaBrowser.Naming" version="1.0.6" targetFramework="net46" />
|
||||
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net46" />
|
||||
<package id="SharpCompress" version="0.14.0" targetFramework="net46" />
|
||||
<package id="SimpleInjector" version="4.0.8" targetFramework="net46" />
|
||||
|
||||
Reference in New Issue
Block a user