Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b300a4e8d4 | |||
| b3fc995977 | |||
| 7f5a070406 | |||
| 7ccef6068b | |||
| 06aac98996 | |||
| 0f18482ba6 | |||
| ffd7835ab5 | |||
| fb6b103164 | |||
| 2de763eef9 | |||
| 46ab046c34 |
+1
-1
@@ -2,7 +2,7 @@ ARG DOTNET_VERSION=2.2
|
|||||||
ARG FFMPEG_VERSION=latest
|
ARG FFMPEG_VERSION=latest
|
||||||
|
|
||||||
FROM node:alpine as web-builder
|
FROM node:alpine as web-builder
|
||||||
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
ARG JELLYFIN_WEB_VERSION=v10.4.2
|
||||||
RUN apk add curl \
|
RUN apk add curl \
|
||||||
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
||||||
&& cd jellyfin-web-* \
|
&& cd jellyfin-web-* \
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ ARG DOTNET_VERSION=3.0
|
|||||||
|
|
||||||
|
|
||||||
FROM node:alpine as web-builder
|
FROM node:alpine as web-builder
|
||||||
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
ARG JELLYFIN_WEB_VERSION=v10.4.2
|
||||||
RUN apk add curl \
|
RUN apk add curl \
|
||||||
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
||||||
&& cd jellyfin-web-* \
|
&& cd jellyfin-web-* \
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ ARG DOTNET_VERSION=3.0
|
|||||||
|
|
||||||
|
|
||||||
FROM node:alpine as web-builder
|
FROM node:alpine as web-builder
|
||||||
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
ARG JELLYFIN_WEB_VERSION=v10.4.2
|
||||||
RUN apk add curl \
|
RUN apk add curl \
|
||||||
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
||||||
&& cd jellyfin-web-* \
|
&& cd jellyfin-web-* \
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Emby.Dlna.Main;
|
using Emby.Dlna.Main;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Dlna;
|
using MediaBrowser.Controller.Dlna;
|
||||||
using MediaBrowser.Controller.Net;
|
using MediaBrowser.Controller.Net;
|
||||||
using MediaBrowser.Model.Services;
|
using MediaBrowser.Model.Services;
|
||||||
@@ -108,12 +109,13 @@ namespace Emby.Dlna.Api
|
|||||||
|
|
||||||
public class DlnaServerService : IService, IRequiresRequest
|
public class DlnaServerService : IService, IRequiresRequest
|
||||||
{
|
{
|
||||||
private readonly IDlnaManager _dlnaManager;
|
|
||||||
|
|
||||||
private const string XMLContentType = "text/xml; charset=UTF-8";
|
private const string XMLContentType = "text/xml; charset=UTF-8";
|
||||||
|
|
||||||
|
private readonly IDlnaManager _dlnaManager;
|
||||||
|
private readonly IHttpResultFactory _resultFactory;
|
||||||
|
private readonly IServerConfigurationManager _configurationManager;
|
||||||
|
|
||||||
public IRequest Request { get; set; }
|
public IRequest Request { get; set; }
|
||||||
private IHttpResultFactory _resultFactory;
|
|
||||||
|
|
||||||
private IContentDirectory ContentDirectory => DlnaEntryPoint.Current.ContentDirectory;
|
private IContentDirectory ContentDirectory => DlnaEntryPoint.Current.ContentDirectory;
|
||||||
|
|
||||||
@@ -121,10 +123,14 @@ namespace Emby.Dlna.Api
|
|||||||
|
|
||||||
private IMediaReceiverRegistrar MediaReceiverRegistrar => DlnaEntryPoint.Current.MediaReceiverRegistrar;
|
private IMediaReceiverRegistrar MediaReceiverRegistrar => DlnaEntryPoint.Current.MediaReceiverRegistrar;
|
||||||
|
|
||||||
public DlnaServerService(IDlnaManager dlnaManager, IHttpResultFactory httpResultFactory)
|
public DlnaServerService(
|
||||||
|
IDlnaManager dlnaManager,
|
||||||
|
IHttpResultFactory httpResultFactory,
|
||||||
|
IServerConfigurationManager configurationManager)
|
||||||
{
|
{
|
||||||
_dlnaManager = dlnaManager;
|
_dlnaManager = dlnaManager;
|
||||||
_resultFactory = httpResultFactory;
|
_resultFactory = httpResultFactory;
|
||||||
|
_configurationManager = configurationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetHeader(string name)
|
private string GetHeader(string name)
|
||||||
@@ -205,14 +211,25 @@ namespace Emby.Dlna.Api
|
|||||||
var pathInfo = Parse(Request.PathInfo);
|
var pathInfo = Parse(Request.PathInfo);
|
||||||
var first = pathInfo[0];
|
var first = pathInfo[0];
|
||||||
|
|
||||||
|
string baseUrl = _configurationManager.Configuration.BaseUrl;
|
||||||
|
|
||||||
// backwards compatibility
|
// backwards compatibility
|
||||||
// TODO: Work out what this is doing.
|
if (baseUrl.Length == 0
|
||||||
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase) ||
|
&& (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|
||||||
string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase) ||
|
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase)))
|
||||||
string.Equals(first, "jellyfin", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
else if (string.Equals(first, baseUrl.Remove(0, 1)))
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
var second = pathInfo[1];
|
||||||
|
if (string.Equals(second, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| string.Equals(second, "emby", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return pathInfo[index];
|
return pathInfo[index];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,6 +311,14 @@ namespace Emby.Naming.Common
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// This isn't a Kodi naming rule, but the expression below causes false positives,
|
||||||
|
// so we make sure this one gets tested first.
|
||||||
|
// "Foo Bar 889"
|
||||||
|
new EpisodeExpression(@".*[\\\/](?![Ee]pisode)(?<seriesname>(\w+\s*?)*)\s(?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*[^\\\/]*$")
|
||||||
|
{
|
||||||
|
IsNamed = true
|
||||||
|
},
|
||||||
|
|
||||||
new EpisodeExpression("[\\\\/\\._ \\[\\(-]([0-9]+)x([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)([^\\\\/]*)$")
|
new EpisodeExpression("[\\\\/\\._ \\[\\(-]([0-9]+)x([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)([^\\\\/]*)$")
|
||||||
{
|
{
|
||||||
SupportsAbsoluteEpisodeNumbers = true
|
SupportsAbsoluteEpisodeNumbers = true
|
||||||
@@ -328,28 +336,33 @@ namespace Emby.Naming.Common
|
|||||||
|
|
||||||
// *** End Kodi Standard Naming
|
// *** End Kodi Standard Naming
|
||||||
|
|
||||||
new EpisodeExpression(@".*(\\|\/)[sS]?(?<seasonnumber>\d{1,4})[xX](?<epnumber>\d{1,3})[^\\\/]*$")
|
// [bar] Foo - 1 [baz]
|
||||||
|
new EpisodeExpression(@".*?(\[.*?\])+.*?(?<seriesname>(\w+\s*?)+?)[-\s_]+(?<epnumber>\d+).*$")
|
||||||
|
{
|
||||||
|
IsNamed = true
|
||||||
|
},
|
||||||
|
new EpisodeExpression(@".*(\\|\/)[sS]?(?<seasonnumber>\d+)[xX](?<epnumber>\d+)[^\\\/]*$")
|
||||||
{
|
{
|
||||||
IsNamed = true
|
IsNamed = true
|
||||||
},
|
},
|
||||||
|
|
||||||
new EpisodeExpression(@".*(\\|\/)[sS](?<seasonnumber>\d{1,4})[x,X]?[eE](?<epnumber>\d{1,3})[^\\\/]*$")
|
new EpisodeExpression(@".*(\\|\/)[sS](?<seasonnumber>\d+)[x,X]?[eE](?<epnumber>\d+)[^\\\/]*$")
|
||||||
{
|
{
|
||||||
IsNamed = true
|
IsNamed = true
|
||||||
},
|
},
|
||||||
|
|
||||||
new EpisodeExpression(@".*(\\|\/)(?<seriesname>((?![sS]?\d{1,4}[xX]\d{1,3})[^\\\/])*)?([sS]?(?<seasonnumber>\d{1,4})[xX](?<epnumber>\d{1,3}))[^\\\/]*$")
|
new EpisodeExpression(@".*(\\|\/)(?<seriesname>((?![sS]?\d{1,4}[xX]\d{1,3})[^\\\/])*)?([sS]?(?<seasonnumber>\d{1,4})[xX](?<epnumber>\d+))[^\\\/]*$")
|
||||||
{
|
{
|
||||||
IsNamed = true
|
IsNamed = true
|
||||||
},
|
},
|
||||||
|
|
||||||
new EpisodeExpression(@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})[^\\\/]*$")
|
new EpisodeExpression(@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d+)[^\\\/]*$")
|
||||||
{
|
{
|
||||||
IsNamed = true
|
IsNamed = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// "01.avi"
|
// "01.avi"
|
||||||
new EpisodeExpression(@".*[\\\/](?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*\.\w+$")
|
new EpisodeExpression(@".*[\\\/](?<epnumber>\d+)(-(?<endingepnumber>\d+))*\.\w+$")
|
||||||
{
|
{
|
||||||
IsOptimistic = true,
|
IsOptimistic = true,
|
||||||
IsNamed = true
|
IsNamed = true
|
||||||
@@ -654,9 +667,9 @@ namespace Emby.Naming.Common
|
|||||||
@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})((-| - )?[xXeE](?<endingepnumber>\d{1,3}))+[^\\\/]*$",
|
@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})((-| - )?[xXeE](?<endingepnumber>\d{1,3}))+[^\\\/]*$",
|
||||||
@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})(-[xX]?[eE]?(?<endingepnumber>\d{1,3}))+[^\\\/]*$"
|
@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})(-[xX]?[eE]?(?<endingepnumber>\d{1,3}))+[^\\\/]*$"
|
||||||
}.Select(i => new EpisodeExpression(i)
|
}.Select(i => new EpisodeExpression(i)
|
||||||
{
|
{
|
||||||
IsNamed = true
|
IsNamed = true
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
|
|
||||||
VideoFileExtensions = extensions
|
VideoFileExtensions = extensions
|
||||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
|
|
||||||
<!-- Code analysers-->
|
<!-- Code analysers-->
|
||||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" />
|
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" PrivateAssets="All" />
|
||||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
|
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
|
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
|
||||||
|
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
|
|||||||
@@ -746,7 +746,8 @@ namespace Emby.Server.Implementations
|
|||||||
|
|
||||||
serviceCollection.AddSingleton(typeof(IStreamHelper), typeof(StreamHelper));
|
serviceCollection.AddSingleton(typeof(IStreamHelper), typeof(StreamHelper));
|
||||||
|
|
||||||
serviceCollection.AddSingleton(typeof(ICryptoProvider), typeof(CryptographyProvider));
|
var cryptoProvider = new CryptographyProvider();
|
||||||
|
serviceCollection.AddSingleton<ICryptoProvider>(cryptoProvider);
|
||||||
|
|
||||||
SocketFactory = new SocketFactory();
|
SocketFactory = new SocketFactory();
|
||||||
serviceCollection.AddSingleton(SocketFactory);
|
serviceCollection.AddSingleton(SocketFactory);
|
||||||
@@ -786,7 +787,17 @@ namespace Emby.Server.Implementations
|
|||||||
|
|
||||||
_userRepository = GetUserRepository();
|
_userRepository = GetUserRepository();
|
||||||
|
|
||||||
UserManager = new UserManager(LoggerFactory.CreateLogger<UserManager>(), _userRepository, XmlSerializer, NetworkManager, () => ImageProcessor, () => DtoService, this, JsonSerializer, FileSystemManager);
|
UserManager = new UserManager(
|
||||||
|
LoggerFactory.CreateLogger<UserManager>(),
|
||||||
|
_userRepository,
|
||||||
|
XmlSerializer,
|
||||||
|
NetworkManager,
|
||||||
|
() => ImageProcessor,
|
||||||
|
() => DtoService,
|
||||||
|
this,
|
||||||
|
JsonSerializer,
|
||||||
|
FileSystemManager,
|
||||||
|
cryptoProvider);
|
||||||
|
|
||||||
serviceCollection.AddSingleton(UserManager);
|
serviceCollection.AddSingleton(UserManager);
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using System.Net.Sockets;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Emby.Server.Implementations.Configuration;
|
|
||||||
using Emby.Server.Implementations.Net;
|
using Emby.Server.Implementations.Net;
|
||||||
using Emby.Server.Implementations.Services;
|
using Emby.Server.Implementations.Services;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
|
|||||||
@@ -1899,7 +1899,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
public void UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
|
public void UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
UpdateItems(new [] { item }, parent, updateReason, cancellationToken);
|
UpdateItems(new[] { item }, parent, updateReason, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -2487,6 +2487,15 @@ namespace Emby.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
episode.ParentIndexNumber = season.IndexNumber;
|
episode.ParentIndexNumber = season.IndexNumber;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Anime series don't generally have a season in their file name, however,
|
||||||
|
tvdb needs a season to correctly get the metadata.
|
||||||
|
Hence, a null season needs to be filled with something. */
|
||||||
|
//FIXME perhaps this would be better for tvdb parser to ask for season 1 if no season is specified
|
||||||
|
episode.ParentIndexNumber = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (episode.ParentIndexNumber.HasValue)
|
if (episode.ParentIndexNumber.HasValue)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ using MediaBrowser.Controller.Providers;
|
|||||||
using MediaBrowser.Controller.Security;
|
using MediaBrowser.Controller.Security;
|
||||||
using MediaBrowser.Controller.Session;
|
using MediaBrowser.Controller.Session;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
|
using MediaBrowser.Model.Cryptography;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Model.Events;
|
||||||
@@ -60,6 +61,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
private readonly Func<IDtoService> _dtoServiceFactory;
|
private readonly Func<IDtoService> _dtoServiceFactory;
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
|
private readonly ICryptoProvider _cryptoProvider;
|
||||||
|
|
||||||
private ConcurrentDictionary<Guid, User> _users;
|
private ConcurrentDictionary<Guid, User> _users;
|
||||||
|
|
||||||
@@ -80,7 +82,8 @@ namespace Emby.Server.Implementations.Library
|
|||||||
Func<IDtoService> dtoServiceFactory,
|
Func<IDtoService> dtoServiceFactory,
|
||||||
IServerApplicationHost appHost,
|
IServerApplicationHost appHost,
|
||||||
IJsonSerializer jsonSerializer,
|
IJsonSerializer jsonSerializer,
|
||||||
IFileSystem fileSystem)
|
IFileSystem fileSystem,
|
||||||
|
ICryptoProvider cryptoProvider)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_userRepository = userRepository;
|
_userRepository = userRepository;
|
||||||
@@ -91,6 +94,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
|
_cryptoProvider = cryptoProvider;
|
||||||
_users = null;
|
_users = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,24 +479,21 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
if (!success
|
if (!success
|
||||||
&& _networkManager.IsInLocalNetwork(remoteEndPoint)
|
&& _networkManager.IsInLocalNetwork(remoteEndPoint)
|
||||||
&& user.Configuration.EnableLocalPassword)
|
&& user.Configuration.EnableLocalPassword
|
||||||
|
&& !string.IsNullOrEmpty(user.EasyPassword))
|
||||||
{
|
{
|
||||||
success = string.Equals(
|
// Check easy password
|
||||||
GetLocalPasswordHash(user),
|
var passwordHash = PasswordHash.Parse(user.EasyPassword);
|
||||||
_defaultAuthenticationProvider.GetHashedString(user, password),
|
var hash = _cryptoProvider.ComputeHash(
|
||||||
StringComparison.OrdinalIgnoreCase);
|
passwordHash.Id,
|
||||||
|
Encoding.UTF8.GetBytes(password),
|
||||||
|
passwordHash.Salt);
|
||||||
|
success = passwordHash.Hash.SequenceEqual(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (authenticationProvider, username, success);
|
return (authenticationProvider, username, success);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetLocalPasswordHash(User user)
|
|
||||||
{
|
|
||||||
return string.IsNullOrEmpty(user.EasyPassword)
|
|
||||||
? null
|
|
||||||
: ToHexString(PasswordHash.Parse(user.EasyPassword).Hash);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ResetInvalidLoginAttemptCount(User user)
|
private void ResetInvalidLoginAttemptCount(User user)
|
||||||
{
|
{
|
||||||
user.Policy.InvalidLoginAttemptCount = 0;
|
user.Policy.InvalidLoginAttemptCount = 0;
|
||||||
|
|||||||
@@ -40,14 +40,13 @@ namespace MediaBrowser.Api
|
|||||||
internal IHttpResultFactory ResultFactory { get; private set; }
|
internal IHttpResultFactory ResultFactory { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The application paths
|
/// Gets the configuration manager.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly IServerConfigurationManager _config;
|
internal IServerConfigurationManager ConfigurationManager { get; }
|
||||||
|
|
||||||
private readonly ISessionManager _sessionManager;
|
private readonly ISessionManager _sessionManager;
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly IMediaSourceManager _mediaSourceManager;
|
private readonly IMediaSourceManager _mediaSourceManager;
|
||||||
public readonly IProcessFactory ProcessFactory;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The active transcoding jobs
|
/// The active transcoding jobs
|
||||||
@@ -73,15 +72,13 @@ namespace MediaBrowser.Api
|
|||||||
IServerConfigurationManager config,
|
IServerConfigurationManager config,
|
||||||
IFileSystem fileSystem,
|
IFileSystem fileSystem,
|
||||||
IMediaSourceManager mediaSourceManager,
|
IMediaSourceManager mediaSourceManager,
|
||||||
IProcessFactory processFactory,
|
|
||||||
IHttpResultFactory resultFactory)
|
IHttpResultFactory resultFactory)
|
||||||
{
|
{
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
_sessionManager = sessionManager;
|
_sessionManager = sessionManager;
|
||||||
_config = config;
|
ConfigurationManager = config;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_mediaSourceManager = mediaSourceManager;
|
_mediaSourceManager = mediaSourceManager;
|
||||||
ProcessFactory = processFactory;
|
|
||||||
ResultFactory = resultFactory;
|
ResultFactory = resultFactory;
|
||||||
|
|
||||||
_sessionManager.PlaybackProgress += _sessionManager_PlaybackProgress;
|
_sessionManager.PlaybackProgress += _sessionManager_PlaybackProgress;
|
||||||
@@ -162,7 +159,7 @@ namespace MediaBrowser.Api
|
|||||||
|
|
||||||
public EncodingOptions GetEncodingOptions()
|
public EncodingOptions GetEncodingOptions()
|
||||||
{
|
{
|
||||||
return ConfigurationManagerExtensions.GetConfiguration<EncodingOptions>(_config, "encoding");
|
return ConfigurationManagerExtensions.GetConfiguration<EncodingOptions>(ConfigurationManager, "encoding");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -170,7 +167,7 @@ namespace MediaBrowser.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void DeleteEncodedMediaCache()
|
private void DeleteEncodedMediaCache()
|
||||||
{
|
{
|
||||||
var path = _config.ApplicationPaths.GetTranscodingTempPath();
|
var path = ConfigurationManager.ApplicationPaths.GetTranscodingTempPath();
|
||||||
|
|
||||||
if (!Directory.Exists(path))
|
if (!Directory.Exists(path))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
@@ -298,11 +297,26 @@ namespace MediaBrowser.Api
|
|||||||
var pathInfo = Parse(Request.PathInfo);
|
var pathInfo = Parse(Request.PathInfo);
|
||||||
var first = pathInfo[0];
|
var first = pathInfo[0];
|
||||||
|
|
||||||
|
string baseUrl = ApiEntryPoint.Instance.ConfigurationManager.Configuration.BaseUrl;
|
||||||
|
|
||||||
// backwards compatibility
|
// backwards compatibility
|
||||||
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase) ||
|
if (baseUrl.Length == 0)
|
||||||
string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase))
|
{
|
||||||
|
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (string.Equals(first, baseUrl.Remove(0, 1)))
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
|
var second = pathInfo[1];
|
||||||
|
if (string.Equals(second, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| string.Equals(second, "emby", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pathInfo[index];
|
return pathInfo[index];
|
||||||
|
|||||||
@@ -109,6 +109,11 @@ namespace MediaBrowser.Api.UserLibrary
|
|||||||
NameContains = query.NameContains ?? query.SearchTerm
|
NameContains = query.NameContains ?? query.SearchTerm
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ((query.IsFavorite ?? false) && query.User != null)
|
||||||
|
{
|
||||||
|
items = items.Where(i => UserDataRepository.GetUserData(query.User, i).IsFavorite).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
return new QueryResult<(BaseItem, ItemCounts)>
|
return new QueryResult<(BaseItem, ItemCounts)>
|
||||||
{
|
{
|
||||||
TotalRecordCount = items.Count,
|
TotalRecordCount = items.Count,
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Common.Tests", "te
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.MediaEncoding.Tests", "tests\Jellyfin.MediaEncoding.Tests\Jellyfin.MediaEncoding.Tests.csproj", "{28464062-0939-4AA7-9F7B-24DDDA61A7C0}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.MediaEncoding.Tests", "tests\Jellyfin.MediaEncoding.Tests\Jellyfin.MediaEncoding.Tests.csproj", "{28464062-0939-4AA7-9F7B-24DDDA61A7C0}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Naming.Tests", "tests\Jellyfin.Naming.Tests\Jellyfin.Naming.Tests.csproj", "{3998657B-1CCC-49DD-A19F-275DC8495F57}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -165,6 +167,10 @@ Global
|
|||||||
{28464062-0939-4AA7-9F7B-24DDDA61A7C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{28464062-0939-4AA7-9F7B-24DDDA61A7C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{28464062-0939-4AA7-9F7B-24DDDA61A7C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{28464062-0939-4AA7-9F7B-24DDDA61A7C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{28464062-0939-4AA7-9F7B-24DDDA61A7C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
{28464062-0939-4AA7-9F7B-24DDDA61A7C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3998657B-1CCC-49DD-A19F-275DC8495F57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3998657B-1CCC-49DD-A19F-275DC8495F57}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3998657B-1CCC-49DD-A19F-275DC8495F57}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3998657B-1CCC-49DD-A19F-275DC8495F57}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -193,5 +199,6 @@ Global
|
|||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{DF194677-DFD3-42AF-9F75-D44D5A416478} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6}
|
{DF194677-DFD3-42AF-9F75-D44D5A416478} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6}
|
||||||
{28464062-0939-4AA7-9F7B-24DDDA61A7C0} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6}
|
{28464062-0939-4AA7-9F7B-24DDDA61A7C0} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6}
|
||||||
|
{3998657B-1CCC-49DD-A19F-275DC8495F57} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("10.4.1")]
|
[assembly: AssemblyVersion("10.4.2")]
|
||||||
[assembly: AssemblyFileVersion("10.4.1")]
|
[assembly: AssemblyFileVersion("10.4.2")]
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
# We just wrap `build` so this is really it
|
# We just wrap `build` so this is really it
|
||||||
name: "jellyfin"
|
name: "jellyfin"
|
||||||
version: "10.4.1"
|
version: "10.4.2"
|
||||||
packages:
|
packages:
|
||||||
- debian-package-x64
|
- debian-package-x64
|
||||||
- debian-package-armhf
|
- debian-package-armhf
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=arm64
|
ENV ARCH=arm64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=armhf
|
ENV ARCH=armhf
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
jellyfin (10.4.2-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version 10.4.2; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.2
|
||||||
|
|
||||||
|
-- Jellyfin Packaging Team <packaging@jellyfin.org> Sun, 24 Nov 2019 13:45:29 -0500
|
||||||
|
|
||||||
jellyfin (10.4.1-1) unstable; urgency=medium
|
jellyfin (10.4.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
* New upstream version 10.4.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.1
|
* New upstream version 10.4.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.1
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: jellyfin
|
Name: jellyfin
|
||||||
Version: 10.4.1
|
Version: 10.4.2
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Free Software Media Browser
|
Summary: The Free Software Media Browser
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@@ -159,6 +159,8 @@ fi
|
|||||||
%systemd_postun_with_restart jellyfin.service
|
%systemd_postun_with_restart jellyfin.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Nov 24 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
||||||
|
- New upstream version 10.4.2; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.2
|
||||||
* Sun Nov 03 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
* Sun Nov 03 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
||||||
- New upstream version 10.4.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.1
|
- New upstream version 10.4.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.1
|
||||||
* Sat Aug 31 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
* Sat Aug 31 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=arm64
|
ENV ARCH=arm64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=armhf
|
ENV ARCH=armhf
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ ARG ARTIFACT_DIR=/dist
|
|||||||
ENV SOURCE_DIR=/jellyfin
|
ENV SOURCE_DIR=/jellyfin
|
||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Ubuntu build environment
|
# Prepare Ubuntu build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
|||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
ENV ARCH=amd64
|
ENV ARCH=amd64
|
||||||
|
ENV web_branch=release-10.4.z
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
pushd ${web_build_dir}
|
pushd ${web_build_dir}
|
||||||
if [[ -n ${web_branch} ]]; then
|
if [[ -n ${web_branch} ]]; then
|
||||||
checkout -b origin/${web_branch}
|
git checkout origin/${web_branch}
|
||||||
fi
|
fi
|
||||||
yarn install
|
yarn install
|
||||||
mkdir -p ${web_target}
|
mkdir -p ${web_target}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||||
<PackageReference Include="coverlet.collector" Version="1.1.0" />
|
<PackageReference Include="coverlet.collector" Version="1.1.0" />
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
using Emby.Naming.Common;
|
||||||
|
using Emby.Naming.TV;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Jellyfin.Naming.Tests
|
||||||
|
{
|
||||||
|
public class EpisodePathParserTest
|
||||||
|
{
|
||||||
|
[Theory]
|
||||||
|
[InlineData("/media/Foo/Foo-S01E01", "Foo", 1, 1)]
|
||||||
|
[InlineData("/media/Foo - S04E011", "Foo", 4, 11)]
|
||||||
|
[InlineData("/media/Foo/Foo s01x01", "Foo", 1, 1)]
|
||||||
|
[InlineData("/media/Foo (2019)/Season 4/Foo (2019).S04E03", "Foo (2019)", 4, 3)]
|
||||||
|
public void ParseEpisodesCorrectly(string path, string name, int season, int episode)
|
||||||
|
{
|
||||||
|
NamingOptions o = new NamingOptions();
|
||||||
|
EpisodePathParser p = new EpisodePathParser(o);
|
||||||
|
var res = p.Parse(path, false);
|
||||||
|
|
||||||
|
Assert.True(res.Success);
|
||||||
|
Assert.Equal(name, res.SeriesName);
|
||||||
|
Assert.Equal(season, res.SeasonNumber);
|
||||||
|
Assert.Equal(episode, res.EpisodeNumber);
|
||||||
|
|
||||||
|
// testing other paths delimeter
|
||||||
|
var res2 = p.Parse(path.Replace('/', '\\'), false);
|
||||||
|
Assert.True(res2.Success);
|
||||||
|
Assert.Equal(name, res2.SeriesName);
|
||||||
|
Assert.Equal(season, res2.SeasonNumber);
|
||||||
|
Assert.Equal(episode, res2.EpisodeNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[InlineData("/media/Foo/Foo 889", "Foo", 889)]
|
||||||
|
[InlineData("/media/Foo/[Bar] Foo Baz - 11 [1080p]", "Foo Baz", 11)]
|
||||||
|
public void ParseEpisodeWithoutSeason(string path, string name, int episode)
|
||||||
|
{
|
||||||
|
NamingOptions o = new NamingOptions();
|
||||||
|
EpisodePathParser p = new EpisodePathParser(o);
|
||||||
|
var res = p.Parse(path, true, fillExtendedInfo: true);
|
||||||
|
|
||||||
|
Assert.True(res.Success);
|
||||||
|
Assert.Equal(name, res.SeriesName);
|
||||||
|
Assert.Null(res.SeasonNumber);
|
||||||
|
Assert.Equal(episode, res.EpisodeNumber);
|
||||||
|
|
||||||
|
// testing other paths delimeter
|
||||||
|
var res2 = p.Parse(path.Replace('/', '\\'), false, fillExtendedInfo: false);
|
||||||
|
Assert.True(res2.Success);
|
||||||
|
Assert.Equal(name, res2.SeriesName);
|
||||||
|
Assert.Null(res2.SeasonNumber);
|
||||||
|
Assert.Equal(episode, res2.EpisodeNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
|
||||||
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||||
|
<PackageReference Include="coverlet.collector" Version="1.1.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Emby.Naming\Emby.Naming.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user