mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-16 08:08:16 +00:00
Compare commits
14 Commits
v10.4.1
...
release-10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76b4ba3c5e | ||
|
|
292d4b585b | ||
|
|
0dd08bbbb4 | ||
|
|
ac8572fd2d | ||
|
|
b300a4e8d4 | ||
|
|
b3fc995977 | ||
|
|
7f5a070406 | ||
|
|
7ccef6068b | ||
|
|
06aac98996 | ||
|
|
0f18482ba6 | ||
|
|
ffd7835ab5 | ||
|
|
fb6b103164 | ||
|
|
2de763eef9 | ||
|
|
46ab046c34 |
@@ -2,7 +2,7 @@ ARG DOTNET_VERSION=2.2
|
||||
ARG FFMPEG_VERSION=latest
|
||||
|
||||
FROM node:alpine as web-builder
|
||||
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
||||
ARG JELLYFIN_WEB_VERSION=v10.4.3
|
||||
RUN apk add curl \
|
||||
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
||||
&& cd jellyfin-web-* \
|
||||
|
||||
@@ -4,7 +4,7 @@ ARG DOTNET_VERSION=3.0
|
||||
|
||||
|
||||
FROM node:alpine as web-builder
|
||||
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
||||
ARG JELLYFIN_WEB_VERSION=v10.4.3
|
||||
RUN apk add curl \
|
||||
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
||||
&& cd jellyfin-web-* \
|
||||
|
||||
@@ -4,7 +4,7 @@ ARG DOTNET_VERSION=3.0
|
||||
|
||||
|
||||
FROM node:alpine as web-builder
|
||||
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
||||
ARG JELLYFIN_WEB_VERSION=v10.4.3
|
||||
RUN apk add curl \
|
||||
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
|
||||
&& cd jellyfin-web-* \
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Dlna.Main;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
@@ -108,12 +109,13 @@ namespace Emby.Dlna.Api
|
||||
|
||||
public class DlnaServerService : IService, IRequiresRequest
|
||||
{
|
||||
private readonly IDlnaManager _dlnaManager;
|
||||
|
||||
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; }
|
||||
private IHttpResultFactory _resultFactory;
|
||||
|
||||
private IContentDirectory ContentDirectory => DlnaEntryPoint.Current.ContentDirectory;
|
||||
|
||||
@@ -121,10 +123,14 @@ namespace Emby.Dlna.Api
|
||||
|
||||
private IMediaReceiverRegistrar MediaReceiverRegistrar => DlnaEntryPoint.Current.MediaReceiverRegistrar;
|
||||
|
||||
public DlnaServerService(IDlnaManager dlnaManager, IHttpResultFactory httpResultFactory)
|
||||
public DlnaServerService(
|
||||
IDlnaManager dlnaManager,
|
||||
IHttpResultFactory httpResultFactory,
|
||||
IServerConfigurationManager configurationManager)
|
||||
{
|
||||
_dlnaManager = dlnaManager;
|
||||
_resultFactory = httpResultFactory;
|
||||
_configurationManager = configurationManager;
|
||||
}
|
||||
|
||||
private string GetHeader(string name)
|
||||
@@ -205,19 +211,32 @@ namespace Emby.Dlna.Api
|
||||
var pathInfo = Parse(Request.PathInfo);
|
||||
var first = pathInfo[0];
|
||||
|
||||
string baseUrl = _configurationManager.Configuration.BaseUrl;
|
||||
|
||||
// backwards compatibility
|
||||
// TODO: Work out what this is doing.
|
||||
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(first, "jellyfin", StringComparison.OrdinalIgnoreCase))
|
||||
if (baseUrl.Length == 0)
|
||||
{
|
||||
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
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];
|
||||
}
|
||||
|
||||
private List<string> Parse(string pathUri)
|
||||
private static string[] Parse(string pathUri)
|
||||
{
|
||||
var actionParts = pathUri.Split(new[] { "://" }, StringSplitOptions.None);
|
||||
|
||||
@@ -231,7 +250,7 @@ namespace Emby.Dlna.Api
|
||||
|
||||
var args = pathInfo.Split('/');
|
||||
|
||||
return args.Skip(1).ToList();
|
||||
return args.Skip(1).ToArray();
|
||||
}
|
||||
|
||||
public object Get(GetIcon request)
|
||||
|
||||
@@ -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]))?)([^\\\\/]*)$")
|
||||
{
|
||||
SupportsAbsoluteEpisodeNumbers = true
|
||||
@@ -328,28 +336,33 @@ namespace Emby.Naming.Common
|
||||
|
||||
// *** 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
|
||||
},
|
||||
|
||||
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
|
||||
},
|
||||
|
||||
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
|
||||
},
|
||||
|
||||
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
|
||||
},
|
||||
|
||||
// "01.avi"
|
||||
new EpisodeExpression(@".*[\\\/](?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*\.\w+$")
|
||||
new EpisodeExpression(@".*[\\\/](?<epnumber>\d+)(-(?<endingepnumber>\d+))*\.\w+$")
|
||||
{
|
||||
IsOptimistic = 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})(-[xX]?[eE]?(?<endingepnumber>\d{1,3}))+[^\\\/]*$"
|
||||
}.Select(i => new EpisodeExpression(i)
|
||||
{
|
||||
IsNamed = true
|
||||
}).ToArray();
|
||||
{
|
||||
IsNamed = true
|
||||
}).ToArray();
|
||||
|
||||
VideoFileExtensions = extensions
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
|
||||
<!-- Code analysers-->
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
|
||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" PrivateAssets="All" />
|
||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
|
||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
|
||||
@@ -746,7 +746,8 @@ namespace Emby.Server.Implementations
|
||||
|
||||
serviceCollection.AddSingleton(typeof(IStreamHelper), typeof(StreamHelper));
|
||||
|
||||
serviceCollection.AddSingleton(typeof(ICryptoProvider), typeof(CryptographyProvider));
|
||||
var cryptoProvider = new CryptographyProvider();
|
||||
serviceCollection.AddSingleton<ICryptoProvider>(cryptoProvider);
|
||||
|
||||
SocketFactory = new SocketFactory();
|
||||
serviceCollection.AddSingleton(SocketFactory);
|
||||
@@ -786,7 +787,17 @@ namespace Emby.Server.Implementations
|
||||
|
||||
_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);
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Server.Implementations.Configuration;
|
||||
using Emby.Server.Implementations.Net;
|
||||
using Emby.Server.Implementations.Services;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
|
||||
@@ -1899,7 +1899,7 @@ namespace Emby.Server.Implementations.Library
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
public void UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
|
||||
{
|
||||
UpdateItems(new [] { item }, parent, updateReason, cancellationToken);
|
||||
UpdateItems(new[] { item }, parent, updateReason, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2487,6 +2487,15 @@ namespace Emby.Server.Implementations.Library
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Controller.Security;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Events;
|
||||
@@ -60,6 +61,7 @@ namespace Emby.Server.Implementations.Library
|
||||
private readonly Func<IDtoService> _dtoServiceFactory;
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ICryptoProvider _cryptoProvider;
|
||||
|
||||
private ConcurrentDictionary<Guid, User> _users;
|
||||
|
||||
@@ -80,7 +82,8 @@ namespace Emby.Server.Implementations.Library
|
||||
Func<IDtoService> dtoServiceFactory,
|
||||
IServerApplicationHost appHost,
|
||||
IJsonSerializer jsonSerializer,
|
||||
IFileSystem fileSystem)
|
||||
IFileSystem fileSystem,
|
||||
ICryptoProvider cryptoProvider)
|
||||
{
|
||||
_logger = logger;
|
||||
_userRepository = userRepository;
|
||||
@@ -91,6 +94,7 @@ namespace Emby.Server.Implementations.Library
|
||||
_appHost = appHost;
|
||||
_jsonSerializer = jsonSerializer;
|
||||
_fileSystem = fileSystem;
|
||||
_cryptoProvider = cryptoProvider;
|
||||
_users = null;
|
||||
}
|
||||
|
||||
@@ -475,24 +479,21 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
if (!success
|
||||
&& _networkManager.IsInLocalNetwork(remoteEndPoint)
|
||||
&& user.Configuration.EnableLocalPassword)
|
||||
&& user.Configuration.EnableLocalPassword
|
||||
&& !string.IsNullOrEmpty(user.EasyPassword))
|
||||
{
|
||||
success = string.Equals(
|
||||
GetLocalPasswordHash(user),
|
||||
_defaultAuthenticationProvider.GetHashedString(user, password),
|
||||
StringComparison.OrdinalIgnoreCase);
|
||||
// Check easy password
|
||||
var passwordHash = PasswordHash.Parse(user.EasyPassword);
|
||||
var hash = _cryptoProvider.ComputeHash(
|
||||
passwordHash.Id,
|
||||
Encoding.UTF8.GetBytes(password),
|
||||
passwordHash.Salt);
|
||||
success = passwordHash.Hash.SequenceEqual(hash);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
user.Policy.InvalidLoginAttemptCount = 0;
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
"Args": {
|
||||
"path": "%JELLYFIN_LOG_DIR%//log_.log",
|
||||
"rollingInterval": "Day",
|
||||
"retainedFileCountLimit": 3,
|
||||
"rollOnFileSizeLimit": true,
|
||||
"fileSizeLimitBytes": 100000000,
|
||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] {Message}{NewLine}{Exception}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,14 +40,13 @@ namespace MediaBrowser.Api
|
||||
internal IHttpResultFactory ResultFactory { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The application paths
|
||||
/// Gets the configuration manager.
|
||||
/// </summary>
|
||||
private readonly IServerConfigurationManager _config;
|
||||
internal IServerConfigurationManager ConfigurationManager { get; }
|
||||
|
||||
private readonly ISessionManager _sessionManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IMediaSourceManager _mediaSourceManager;
|
||||
public readonly IProcessFactory ProcessFactory;
|
||||
|
||||
/// <summary>
|
||||
/// The active transcoding jobs
|
||||
@@ -73,15 +72,13 @@ namespace MediaBrowser.Api
|
||||
IServerConfigurationManager config,
|
||||
IFileSystem fileSystem,
|
||||
IMediaSourceManager mediaSourceManager,
|
||||
IProcessFactory processFactory,
|
||||
IHttpResultFactory resultFactory)
|
||||
{
|
||||
Logger = logger;
|
||||
_sessionManager = sessionManager;
|
||||
_config = config;
|
||||
ConfigurationManager = config;
|
||||
_fileSystem = fileSystem;
|
||||
_mediaSourceManager = mediaSourceManager;
|
||||
ProcessFactory = processFactory;
|
||||
ResultFactory = resultFactory;
|
||||
|
||||
_sessionManager.PlaybackProgress += _sessionManager_PlaybackProgress;
|
||||
@@ -162,7 +159,7 @@ namespace MediaBrowser.Api
|
||||
|
||||
public EncodingOptions GetEncodingOptions()
|
||||
{
|
||||
return ConfigurationManagerExtensions.GetConfiguration<EncodingOptions>(_config, "encoding");
|
||||
return ConfigurationManagerExtensions.GetConfiguration<EncodingOptions>(ConfigurationManager, "encoding");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -170,7 +167,7 @@ namespace MediaBrowser.Api
|
||||
/// </summary>
|
||||
private void DeleteEncodedMediaCache()
|
||||
{
|
||||
var path = _config.ApplicationPaths.GetTranscodingTempPath();
|
||||
var path = ConfigurationManager.ApplicationPaths.GetTranscodingTempPath();
|
||||
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
@@ -298,11 +297,26 @@ namespace MediaBrowser.Api
|
||||
var pathInfo = Parse(Request.PathInfo);
|
||||
var first = pathInfo[0];
|
||||
|
||||
string baseUrl = ApiEntryPoint.Instance.ConfigurationManager.Configuration.BaseUrl;
|
||||
|
||||
// backwards compatibility
|
||||
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase))
|
||||
if (baseUrl.Length == 0)
|
||||
{
|
||||
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
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];
|
||||
|
||||
@@ -109,6 +109,11 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
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)>
|
||||
{
|
||||
TotalRecordCount = items.Count,
|
||||
|
||||
@@ -59,6 +59,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Common.Tests", "te
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.MediaEncoding.Tests", "tests\Jellyfin.MediaEncoding.Tests\Jellyfin.MediaEncoding.Tests.csproj", "{28464062-0939-4AA7-9F7B-24DDDA61A7C0}"
|
||||
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
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
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}.Release|Any CPU.ActiveCfg = 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
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -193,5 +199,6 @@ Global
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{DF194677-DFD3-42AF-9F75-D44D5A416478} = {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
|
||||
EndGlobal
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("10.4.1")]
|
||||
[assembly: AssemblyFileVersion("10.4.1")]
|
||||
[assembly: AssemblyVersion("10.4.3")]
|
||||
[assembly: AssemblyFileVersion("10.4.3")]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# We just wrap `build` so this is really it
|
||||
name: "jellyfin"
|
||||
version: "10.4.1"
|
||||
version: "10.4.3"
|
||||
packages:
|
||||
- debian-package-x64
|
||||
- debian-package-armhf
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
RUN apt-get update \
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=arm64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
RUN apt-get update \
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=armhf
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
jellyfin (10.4.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version 10.4.3; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.3
|
||||
|
||||
-- Jellyfin Packaging Team <packaging@jellyfin.org> Fri, 06 Dec 2019 15:16:18 -0500
|
||||
|
||||
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
|
||||
|
||||
* New upstream version 10.4.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.1
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
%endif
|
||||
|
||||
Name: jellyfin
|
||||
Version: 10.4.1
|
||||
Version: 10.4.3
|
||||
Release: 1%{?dist}
|
||||
Summary: The Free Software Media Browser
|
||||
License: GPLv2
|
||||
@@ -159,6 +159,10 @@ fi
|
||||
%systemd_postun_with_restart jellyfin.service
|
||||
|
||||
%changelog
|
||||
* Fri Dec 06 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
||||
- New upstream version 10.4.3; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.3
|
||||
* 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>
|
||||
- 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>
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
RUN apt-get update \
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=arm64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
RUN apt-get update \
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=armhf
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -7,6 +7,7 @@ ARG ARTIFACT_DIR=/dist
|
||||
ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Ubuntu build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -9,6 +9,7 @@ ENV SOURCE_DIR=/jellyfin
|
||||
ENV ARTIFACT_DIR=/dist
|
||||
ENV DEB_BUILD_OPTIONS=noddebs
|
||||
ENV ARCH=amd64
|
||||
ENV web_branch=release-10.4.z
|
||||
|
||||
# Prepare Debian build environment
|
||||
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}/
|
||||
pushd ${web_build_dir}
|
||||
if [[ -n ${web_branch} ]]; then
|
||||
checkout -b origin/${web_branch}
|
||||
git checkout origin/${web_branch}
|
||||
fi
|
||||
yarn install
|
||||
mkdir -p ${web_target}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<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.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.1.0" />
|
||||
|
||||
55
tests/Jellyfin.Naming.Tests/EpisodePathParserTest.cs
Normal file
55
tests/Jellyfin.Naming.Tests/EpisodePathParserTest.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj
Normal file
19
tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj
Normal file
@@ -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