mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-19 01:28:02 +00:00
Compare commits
14 Commits
openapi-ca
...
v10.4.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf54a0e8be | ||
|
|
e73cf46e14 | ||
|
|
39c3b2f044 | ||
|
|
7a592a0f15 | ||
|
|
1fad64cd59 | ||
|
|
86e5dc4607 | ||
|
|
e98e4766f7 | ||
|
|
6e59671cf6 | ||
|
|
86a50367b2 | ||
|
|
0212c0b85f | ||
|
|
89d365122c | ||
|
|
9c0a8350d6 | ||
|
|
818d21718c | ||
|
|
0b551c0cd4 |
@@ -245,7 +245,7 @@ jobs:
|
|||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath' # Optional. Options: filePath, inline
|
targetType: 'filePath' # Optional. Options: filePath, inline
|
||||||
filePath: ./deployment/windows/build-jellyfin.ps1 # Required when targetType == FilePath
|
filePath: ./deployment/windows/build-jellyfin.ps1 # Required when targetType == FilePath
|
||||||
arguments: -InstallFFMPEG -InstallNSSM -MakeNSIS -UXLocation $(Agent.TempDirectory)\jellyfin-ux -InstallLocation $(build.artifactstagingdirectory)
|
arguments: -InstallFFMPEG -InstallNSSM -MakeNSIS -InstallTrayApp -UXLocation $(Agent.TempDirectory)\jellyfin-ux -InstallLocation $(build.artifactstagingdirectory)
|
||||||
#script: '# Write your PowerShell commands here.Write-Host Hello World' # Required when targetType == Inline
|
#script: '# Write your PowerShell commands here.Write-Host Hello World' # Required when targetType == Inline
|
||||||
errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
|
errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
|
||||||
#failOnStderr: false # Optional
|
#failOnStderr: false # Optional
|
||||||
|
|||||||
@@ -1,8 +1,59 @@
|
|||||||
srpm:
|
VERSION := $(shell sed -ne '/^Version:/s/.* *//p' \
|
||||||
dnf -y install git
|
deployment/fedora-package-x64/pkg-src/jellyfin.spec)
|
||||||
git submodule update --init --recursive
|
|
||||||
cd deployment/fedora-package-x64; \
|
deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz:
|
||||||
./create_tarball.sh; \
|
curl -f -L -o deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz \
|
||||||
rpmbuild -bs pkg-src/jellyfin.spec \
|
https://github.com/jellyfin/jellyfin-web/archive/v$(VERSION).tar.gz \
|
||||||
--define "_sourcedir $$PWD/pkg-src/" \
|
|| curl -f -L -o deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz \
|
||||||
--define "_srcrpmdir $(outdir)"
|
https://github.com/jellyfin/jellyfin-web/archive/master.tar.gz \
|
||||||
|
|
||||||
|
srpm: deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz
|
||||||
|
cd deployment/fedora-package-x64; \
|
||||||
|
SOURCE_DIR=../.. \
|
||||||
|
WORKDIR="$${PWD}"; \
|
||||||
|
package_temporary_dir="$${WORKDIR}/pkg-dist-tmp"; \
|
||||||
|
pkg_src_dir="$${WORKDIR}/pkg-src"; \
|
||||||
|
GNU_TAR=1; \
|
||||||
|
tar \
|
||||||
|
--transform "s,^\.,jellyfin-$(VERSION)," \
|
||||||
|
--exclude='.git*' \
|
||||||
|
--exclude='**/.git' \
|
||||||
|
--exclude='**/.hg' \
|
||||||
|
--exclude='**/.vs' \
|
||||||
|
--exclude='**/.vscode' \
|
||||||
|
--exclude='deployment' \
|
||||||
|
--exclude='**/bin' \
|
||||||
|
--exclude='**/obj' \
|
||||||
|
--exclude='**/.nuget' \
|
||||||
|
--exclude='*.deb' \
|
||||||
|
--exclude='*.rpm' \
|
||||||
|
-czf "pkg-src/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C $${SOURCE_DIR} ./ || GNU_TAR=0; \
|
||||||
|
if [ $${GNU_TAR} -eq 0 ]; then \
|
||||||
|
package_temporary_dir="$$(mktemp -d)"; \
|
||||||
|
mkdir -p "$${package_temporary_dir}/jellyfin"; \
|
||||||
|
tar \
|
||||||
|
--exclude='.git*' \
|
||||||
|
--exclude='**/.git' \
|
||||||
|
--exclude='**/.hg' \
|
||||||
|
--exclude='**/.vs' \
|
||||||
|
--exclude='**/.vscode' \
|
||||||
|
--exclude='deployment' \
|
||||||
|
--exclude='**/bin' \
|
||||||
|
--exclude='**/obj' \
|
||||||
|
--exclude='**/.nuget' \
|
||||||
|
--exclude='*.deb' \
|
||||||
|
--exclude='*.rpm' \
|
||||||
|
-czf "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C $${SOURCE_DIR} ./; \
|
||||||
|
mkdir -p "$${package_temporary_dir}/jellyfin-$(VERSION)"; \
|
||||||
|
tar -xzf "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C "$${package_temporary_dir}/jellyfin-$(VERSION); \
|
||||||
|
rm -f "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz"; \
|
||||||
|
tar -czf "$${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C "$${package_temporary_dir}" "jellyfin-$(VERSION); \
|
||||||
|
rm -rf $${package_temporary_dir}; \
|
||||||
|
fi; \
|
||||||
|
rpmbuild -bs pkg-src/jellyfin.spec \
|
||||||
|
--define "_sourcedir $$PWD/pkg-src/" \
|
||||||
|
--define "_srcrpmdir $(outdir)"
|
||||||
|
|||||||
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,3 +1,5 @@
|
|||||||
* text=auto eol=lf
|
* text=auto eol=lf
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
|
||||||
CONTRIBUTORS.md merge=union
|
CONTRIBUTORS.md merge=union
|
||||||
|
|||||||
@@ -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.0
|
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
||||||
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-* \
|
||||||
|
|||||||
@@ -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.0
|
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
||||||
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-* \
|
||||||
|
|||||||
@@ -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.0
|
ARG JELLYFIN_WEB_VERSION=v10.4.1
|
||||||
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-* \
|
||||||
|
|||||||
@@ -2724,7 +2724,7 @@ namespace Emby.Server.Implementations.Data
|
|||||||
|
|
||||||
if (elapsed >= SlowThreshold)
|
if (elapsed >= SlowThreshold)
|
||||||
{
|
{
|
||||||
Logger.LogWarning(
|
Logger.LogDebug(
|
||||||
"{Method} query time (slow): {ElapsedMs}ms. Query: {Query}",
|
"{Method} query time (slow): {ElapsedMs}ms. Query: {Query}",
|
||||||
methodName,
|
methodName,
|
||||||
elapsed,
|
elapsed,
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
private readonly IHttpListener _socketListener;
|
private readonly IHttpListener _socketListener;
|
||||||
private readonly Func<Type, Func<string, object>> _funcParseFn;
|
private readonly Func<Type, Func<string, object>> _funcParseFn;
|
||||||
private readonly string _defaultRedirectPath;
|
private readonly string _defaultRedirectPath;
|
||||||
|
private readonly string _baseUrlPrefix;
|
||||||
private readonly Dictionary<Type, Type> ServiceOperationsMap = new Dictionary<Type, Type>();
|
private readonly Dictionary<Type, Type> ServiceOperationsMap = new Dictionary<Type, Type>();
|
||||||
private IWebSocketListener[] _webSocketListeners = Array.Empty<IWebSocketListener>();
|
private IWebSocketListener[] _webSocketListeners = Array.Empty<IWebSocketListener>();
|
||||||
private readonly List<IWebSocketConnection> _webSocketConnections = new List<IWebSocketConnection>();
|
private readonly List<IWebSocketConnection> _webSocketConnections = new List<IWebSocketConnection>();
|
||||||
@@ -58,6 +59,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
_config = config;
|
_config = config;
|
||||||
_defaultRedirectPath = configuration["HttpListenerHost:DefaultRedirectPath"];
|
_defaultRedirectPath = configuration["HttpListenerHost:DefaultRedirectPath"];
|
||||||
|
_baseUrlPrefix = _config.Configuration.BaseUrl;
|
||||||
_networkManager = networkManager;
|
_networkManager = networkManager;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
_xmlSerializer = xmlSerializer;
|
_xmlSerializer = xmlSerializer;
|
||||||
@@ -87,6 +89,20 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
return _appHost.CreateInstance(type);
|
return _appHost.CreateInstance(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string NormalizeUrlPath(string path)
|
||||||
|
{
|
||||||
|
if (path.StartsWith("/"))
|
||||||
|
{
|
||||||
|
// If the path begins with a leading slash, just return it as-is
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If the path does not begin with a leading slash, append one for consistency
|
||||||
|
return "/" + path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies the request filters. Returns whether or not the request has been handled
|
/// Applies the request filters. Returns whether or not the request has been handled
|
||||||
/// and no more processing should be done.
|
/// and no more processing should be done.
|
||||||
@@ -208,7 +224,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ErrorHandler(Exception ex, IRequest httpReq, bool logExceptionStackTrace, bool logExceptionMessage)
|
private async Task ErrorHandler(Exception ex, IRequest httpReq, bool logExceptionStackTrace)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -218,9 +234,9 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
{
|
{
|
||||||
_logger.LogError(ex, "Error processing request");
|
_logger.LogError(ex, "Error processing request");
|
||||||
}
|
}
|
||||||
else if (logExceptionMessage)
|
else
|
||||||
{
|
{
|
||||||
_logger.LogError(ex.Message);
|
_logger.LogError("Error processing request: {Message}", ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
var httpRes = httpReq.Response;
|
var httpRes = httpReq.Response;
|
||||||
@@ -233,8 +249,10 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
var statusCode = GetStatusCode(ex);
|
var statusCode = GetStatusCode(ex);
|
||||||
httpRes.StatusCode = statusCode;
|
httpRes.StatusCode = statusCode;
|
||||||
|
|
||||||
httpRes.ContentType = "text/html";
|
var errContent = NormalizeExceptionMessage(ex.Message);
|
||||||
await httpRes.WriteAsync(NormalizeExceptionMessage(ex.Message)).ConfigureAwait(false);
|
httpRes.ContentType = "text/plain";
|
||||||
|
httpRes.ContentLength = errContent.Length;
|
||||||
|
await httpRes.WriteAsync(errContent).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception errorEx)
|
catch (Exception errorEx)
|
||||||
{
|
{
|
||||||
@@ -471,22 +489,15 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
|
|
||||||
urlToLog = GetUrlToLog(urlString);
|
urlToLog = GetUrlToLog(urlString);
|
||||||
|
|
||||||
if (string.Equals(localPath, "/" + _config.Configuration.BaseUrl + "/", StringComparison.OrdinalIgnoreCase)
|
if (string.Equals(localPath, _baseUrlPrefix + "/", StringComparison.OrdinalIgnoreCase)
|
||||||
|| string.Equals(localPath, "/" + _config.Configuration.BaseUrl, StringComparison.OrdinalIgnoreCase))
|
|| string.Equals(localPath, _baseUrlPrefix, StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| string.IsNullOrEmpty(localPath)
|
||||||
|
|| !localPath.StartsWith(_baseUrlPrefix))
|
||||||
{
|
{
|
||||||
httpRes.Redirect("/" + _config.Configuration.BaseUrl + "/" + _defaultRedirectPath);
|
// Always redirect back to the default path if the base prefix is invalid or missing
|
||||||
return;
|
_logger.LogDebug("Normalizing a URL at {0}", localPath);
|
||||||
}
|
httpRes.Redirect(_baseUrlPrefix + "/" + _defaultRedirectPath);
|
||||||
|
|
||||||
if (string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
httpRes.Redirect(_defaultRedirectPath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(localPath))
|
|
||||||
{
|
|
||||||
httpRes.Redirect("/" + _defaultRedirectPath);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -509,25 +520,30 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await ErrorHandler(new FileNotFoundException(), httpReq, false, false).ConfigureAwait(false);
|
await ErrorHandler(new FileNotFoundException(), httpReq, false).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex) when (ex is SocketException || ex is IOException || ex is OperationCanceledException)
|
catch (Exception ex) when (ex is SocketException || ex is IOException || ex is OperationCanceledException)
|
||||||
{
|
{
|
||||||
await ErrorHandler(ex, httpReq, false, false).ConfigureAwait(false);
|
await ErrorHandler(ex, httpReq, false).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (SecurityException ex)
|
catch (SecurityException ex)
|
||||||
{
|
{
|
||||||
await ErrorHandler(ex, httpReq, false, true).ConfigureAwait(false);
|
await ErrorHandler(ex, httpReq, false).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
var logException = !string.Equals(ex.GetType().Name, "SocketException", StringComparison.OrdinalIgnoreCase);
|
var logException = !string.Equals(ex.GetType().Name, "SocketException", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
await ErrorHandler(ex, httpReq, logException, false).ConfigureAwait(false);
|
await ErrorHandler(ex, httpReq, logException).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
if (httpRes.StatusCode >= 500)
|
||||||
|
{
|
||||||
|
_logger.LogDebug("Sending HTTP Response 500 in response to {Url}", urlToLog);
|
||||||
|
}
|
||||||
|
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
var elapsed = stopWatch.Elapsed;
|
var elapsed = stopWatch.Elapsed;
|
||||||
if (elapsed.TotalMilliseconds > 500)
|
if (elapsed.TotalMilliseconds > 500)
|
||||||
@@ -596,7 +612,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
|
|
||||||
foreach (var route in clone)
|
foreach (var route in clone)
|
||||||
{
|
{
|
||||||
routes.Add(new RouteAttribute(NormalizeCustomRoutePath(_config.Configuration.BaseUrl, route.Path), route.Verbs)
|
routes.Add(new RouteAttribute(NormalizeCustomRoutePath(route.Path), route.Verbs)
|
||||||
{
|
{
|
||||||
Notes = route.Notes,
|
Notes = route.Notes,
|
||||||
Priority = route.Priority,
|
Priority = route.Priority,
|
||||||
@@ -651,36 +667,22 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
return _socketListener.ProcessWebSocketRequest(context);
|
return _socketListener.ProcessWebSocketRequest(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this method was left for compatibility with third party clients
|
private string NormalizeEmbyRoutePath(string path)
|
||||||
private static string NormalizeEmbyRoutePath(string path)
|
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
_logger.LogDebug("Normalizing /emby route");
|
||||||
{
|
return _baseUrlPrefix + "/emby" + NormalizeUrlPath(path);
|
||||||
return "/emby" + path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "emby/" + path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// this method was left for compatibility with third party clients
|
private string NormalizeMediaBrowserRoutePath(string path)
|
||||||
private static string NormalizeMediaBrowserRoutePath(string path)
|
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
_logger.LogDebug("Normalizing /mediabrowser route");
|
||||||
{
|
return _baseUrlPrefix + "/mediabrowser" + NormalizeUrlPath(path);
|
||||||
return "/mediabrowser" + path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "mediabrowser/" + path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string NormalizeCustomRoutePath(string baseUrl, string path)
|
private string NormalizeCustomRoutePath(string path)
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
_logger.LogDebug("Normalizing custom route {0}", path);
|
||||||
{
|
return _baseUrlPrefix + NormalizeUrlPath(path);
|
||||||
return "/" + baseUrl + path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return baseUrl + "/" + path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Playlists;
|
using MediaBrowser.Controller.Playlists;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Playlists
|
namespace Emby.Server.Implementations.Playlists
|
||||||
{
|
{
|
||||||
@@ -24,13 +24,13 @@ namespace Emby.Server.Implementations.Playlists
|
|||||||
return base.GetEligibleChildrenForRecursiveChildren(user).OfType<Playlist>();
|
return base.GetEligibleChildrenForRecursiveChildren(user).OfType<Playlist>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsHidden => true;
|
public override bool IsHidden => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string CollectionType => MediaBrowser.Model.Entities.CollectionType.Playlists;
|
public override string CollectionType => MediaBrowser.Model.Entities.CollectionType.Playlists;
|
||||||
|
|
||||||
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Services
|
namespace Emby.Server.Implementations.Services
|
||||||
{
|
{
|
||||||
@@ -28,6 +29,13 @@ namespace Emby.Server.Implementations.Services
|
|||||||
private readonly bool[] isWildcard;
|
private readonly bool[] isWildcard;
|
||||||
private readonly int wildcardCount = 0;
|
private readonly int wildcardCount = 0;
|
||||||
|
|
||||||
|
internal static string[] IgnoreAttributesNamed = new[]
|
||||||
|
{
|
||||||
|
nameof(JsonIgnoreAttribute)
|
||||||
|
};
|
||||||
|
|
||||||
|
private static Type _excludeType = typeof(Stream);
|
||||||
|
|
||||||
public int VariableArgsCount { get; set; }
|
public int VariableArgsCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -190,21 +198,12 @@ namespace Emby.Server.Implementations.Services
|
|||||||
StringComparer.OrdinalIgnoreCase);
|
StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string[] IgnoreAttributesNamed = new[]
|
|
||||||
{
|
|
||||||
"IgnoreDataMemberAttribute",
|
|
||||||
"JsonIgnoreAttribute"
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
private static Type excludeType = typeof(Stream);
|
|
||||||
|
|
||||||
internal static IEnumerable<PropertyInfo> GetSerializableProperties(Type type)
|
internal static IEnumerable<PropertyInfo> GetSerializableProperties(Type type)
|
||||||
{
|
{
|
||||||
foreach (var prop in GetPublicProperties(type))
|
foreach (var prop in GetPublicProperties(type))
|
||||||
{
|
{
|
||||||
if (prop.GetMethod == null
|
if (prop.GetMethod == null
|
||||||
|| excludeType == prop.PropertyType)
|
|| _excludeType == prop.PropertyType)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ namespace Jellyfin.Server
|
|||||||
|
|
||||||
return new ConfigurationBuilder()
|
return new ConfigurationBuilder()
|
||||||
.SetBasePath(appPaths.ConfigurationDirectoryPath)
|
.SetBasePath(appPaths.ConfigurationDirectoryPath)
|
||||||
.AddJsonFile("logging.json")
|
.AddJsonFile("logging.json", false, true)
|
||||||
.AddEnvironmentVariables("JELLYFIN_")
|
.AddEnvironmentVariables("JELLYFIN_")
|
||||||
.AddInMemoryCollection(ConfigurationOptions.Configuration)
|
.AddInMemoryCollection(ConfigurationOptions.Configuration)
|
||||||
.Build();
|
.Build();
|
||||||
|
|||||||
@@ -289,17 +289,22 @@ namespace MediaBrowser.Api.Playback
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.LogDebug("Launched ffmpeg process");
|
||||||
state.TranscodingJob = transcodingJob;
|
state.TranscodingJob = transcodingJob;
|
||||||
|
|
||||||
// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback
|
// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback
|
||||||
_ = new JobLogger(Logger).StartStreamingLog(state, process.StandardError.BaseStream, logStream);
|
_ = new JobLogger(Logger).StartStreamingLog(state, process.StandardError.BaseStream, logStream);
|
||||||
|
|
||||||
// Wait for the file to exist before proceeeding
|
// Wait for the file to exist before proceeeding
|
||||||
while (!File.Exists(state.WaitForPath ?? outputPath) && !transcodingJob.HasExited)
|
var ffmpegTargetFile = state.WaitForPath ?? outputPath;
|
||||||
|
Logger.LogDebug("Waiting for the creation of {0}", ffmpegTargetFile);
|
||||||
|
while (!File.Exists(ffmpegTargetFile) && !transcodingJob.HasExited)
|
||||||
{
|
{
|
||||||
await Task.Delay(100, cancellationTokenSource.Token).ConfigureAwait(false);
|
await Task.Delay(100, cancellationTokenSource.Token).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.LogDebug("File {0} created or transcoding has finished", ffmpegTargetFile);
|
||||||
|
|
||||||
if (state.IsInputVideo && transcodingJob.Type == TranscodingJobType.Progressive && !transcodingJob.HasExited)
|
if (state.IsInputVideo && transcodingJob.Type == TranscodingJobType.Progressive && !transcodingJob.HasExited)
|
||||||
{
|
{
|
||||||
await Task.Delay(1000, cancellationTokenSource.Token).ConfigureAwait(false);
|
await Task.Delay(1000, cancellationTokenSource.Token).ConfigureAwait(false);
|
||||||
@@ -314,6 +319,7 @@ namespace MediaBrowser.Api.Playback
|
|||||||
{
|
{
|
||||||
StartThrottler(state, transcodingJob);
|
StartThrottler(state, transcodingJob);
|
||||||
}
|
}
|
||||||
|
Logger.LogDebug("StartFfMpeg() finished successfully");
|
||||||
|
|
||||||
return transcodingJob;
|
return transcodingJob;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
if (File.Exists(segmentPath))
|
if (File.Exists(segmentPath))
|
||||||
{
|
{
|
||||||
job = ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType);
|
job = ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType);
|
||||||
|
Logger.LogDebug("returning {0} [it exists, try 1]", segmentPath);
|
||||||
return await GetSegmentResult(state, playlistPath, segmentPath, segmentExtension, requestedIndex, job, cancellationToken).ConfigureAwait(false);
|
return await GetSegmentResult(state, playlistPath, segmentPath, segmentExtension, requestedIndex, job, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,6 +208,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
job = ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType);
|
job = ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType);
|
||||||
transcodingLock.Release();
|
transcodingLock.Release();
|
||||||
released = true;
|
released = true;
|
||||||
|
Logger.LogDebug("returning {0} [it exists, try 2]", segmentPath);
|
||||||
return await GetSegmentResult(state, playlistPath, segmentPath, segmentExtension, requestedIndex, job, cancellationToken).ConfigureAwait(false);
|
return await GetSegmentResult(state, playlistPath, segmentPath, segmentExtension, requestedIndex, job, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -243,6 +245,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
|
|
||||||
request.StartTimeTicks = GetStartPositionTicks(state, requestedIndex);
|
request.StartTimeTicks = GetStartPositionTicks(state, requestedIndex);
|
||||||
|
|
||||||
|
state.WaitForPath = segmentPath;
|
||||||
job = await StartFfMpeg(state, playlistPath, cancellationTokenSource).ConfigureAwait(false);
|
job = await StartFfMpeg(state, playlistPath, cancellationTokenSource).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@@ -277,7 +280,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
// await Task.Delay(50, cancellationToken).ConfigureAwait(false);
|
// await Task.Delay(50, cancellationToken).ConfigureAwait(false);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
Logger.LogInformation("returning {0}", segmentPath);
|
Logger.LogDebug("returning {0} [general case]", segmentPath);
|
||||||
job = job ?? ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType);
|
job = job ?? ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType);
|
||||||
return await GetSegmentResult(state, playlistPath, segmentPath, segmentExtension, requestedIndex, job, cancellationToken).ConfigureAwait(false);
|
return await GetSegmentResult(state, playlistPath, segmentPath, segmentExtension, requestedIndex, job, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
@@ -458,56 +461,68 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
TranscodingJob transcodingJob,
|
TranscodingJob transcodingJob,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var segmentFileExists = File.Exists(segmentPath);
|
var segmentExists = File.Exists(segmentPath);
|
||||||
|
if (segmentExists)
|
||||||
// If all transcoding has completed, just return immediately
|
|
||||||
if (transcodingJob != null && transcodingJob.HasExited && segmentFileExists)
|
|
||||||
{
|
{
|
||||||
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
if (transcodingJob != null && transcodingJob.HasExited)
|
||||||
}
|
{
|
||||||
|
// Transcoding job is over, so assume all existing files are ready
|
||||||
|
Logger.LogDebug("serving up {0} as transcode is over", segmentPath);
|
||||||
|
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (segmentFileExists)
|
|
||||||
{
|
|
||||||
var currentTranscodingIndex = GetCurrentTranscodingIndex(playlistPath, segmentExtension);
|
var currentTranscodingIndex = GetCurrentTranscodingIndex(playlistPath, segmentExtension);
|
||||||
|
|
||||||
// If requested segment is less than transcoding position, we can't transcode backwards, so assume it's ready
|
// If requested segment is less than transcoding position, we can't transcode backwards, so assume it's ready
|
||||||
if (segmentIndex < currentTranscodingIndex)
|
if (segmentIndex < currentTranscodingIndex)
|
||||||
{
|
{
|
||||||
|
Logger.LogDebug("serving up {0} as transcode index {1} is past requested point {2}", segmentPath, currentTranscodingIndex, segmentIndex);
|
||||||
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var segmentFilename = Path.GetFileName(segmentPath);
|
var nextSegmentPath = GetSegmentPath(state, playlistPath, segmentIndex + 1);
|
||||||
|
if (transcodingJob != null)
|
||||||
while (!cancellationToken.IsCancellationRequested)
|
|
||||||
{
|
{
|
||||||
try
|
while (!cancellationToken.IsCancellationRequested && !transcodingJob.HasExited)
|
||||||
{
|
{
|
||||||
var text = File.ReadAllText(playlistPath, Encoding.UTF8);
|
// To be considered ready, the segment file has to exist AND
|
||||||
|
// either the transcoding job should be done or next segment should also exist
|
||||||
// If it appears in the playlist, it's done
|
if (segmentExists)
|
||||||
if (text.IndexOf(segmentFilename, StringComparison.OrdinalIgnoreCase) != -1)
|
|
||||||
{
|
{
|
||||||
if (!segmentFileExists)
|
if (transcodingJob.HasExited || File.Exists(nextSegmentPath))
|
||||||
{
|
|
||||||
segmentFileExists = File.Exists(segmentPath);
|
|
||||||
}
|
|
||||||
if (segmentFileExists)
|
|
||||||
{
|
{
|
||||||
|
Logger.LogDebug("serving up {0} as it deemed ready", segmentPath);
|
||||||
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
//break;
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
catch (IOException)
|
{
|
||||||
{
|
segmentExists = File.Exists(segmentPath);
|
||||||
// May get an error if the file is locked
|
if (segmentExists)
|
||||||
|
{
|
||||||
|
continue; // avoid unnecessary waiting if segment just became available
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await Task.Delay(100, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
await Task.Delay(100, cancellationToken).ConfigureAwait(false);
|
if (!File.Exists(segmentPath))
|
||||||
|
{
|
||||||
|
Logger.LogWarning("cannot serve {0} as transcoding quit before we got there", segmentPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.LogDebug("serving {0} as it's on disk and transcoding stopped", segmentPath);
|
||||||
|
}
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.LogWarning("cannot serve {0} as it doesn't exist and no transcode is running", segmentPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
return await GetSegmentResult(state, segmentPath, segmentIndex, transcodingJob).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,6 +536,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
FileShare = FileShareMode.ReadWrite,
|
FileShare = FileShareMode.ReadWrite,
|
||||||
OnComplete = () =>
|
OnComplete = () =>
|
||||||
{
|
{
|
||||||
|
Logger.LogDebug("finished serving {0}", segmentPath);
|
||||||
if (transcodingJob != null)
|
if (transcodingJob != null)
|
||||||
{
|
{
|
||||||
transcodingJob.DownloadPositionTicks = Math.Max(transcodingJob.DownloadPositionTicks ?? segmentEndingPositionTicks, segmentEndingPositionTicks);
|
transcodingJob.DownloadPositionTicks = Math.Max(transcodingJob.DownloadPositionTicks ?? segmentEndingPositionTicks, segmentEndingPositionTicks);
|
||||||
@@ -909,9 +925,23 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var keyFrameArg = string.Format(
|
var keyFrameArg = string.Format(
|
||||||
|
CultureInfo.InvariantCulture,
|
||||||
" -force_key_frames:0 \"expr:gte(t,{0}+n_forced*{1})\"",
|
" -force_key_frames:0 \"expr:gte(t,{0}+n_forced*{1})\"",
|
||||||
GetStartNumber(state) * state.SegmentLength,
|
GetStartNumber(state) * state.SegmentLength,
|
||||||
state.SegmentLength.ToString(CultureInfo.InvariantCulture));
|
state.SegmentLength);
|
||||||
|
if (state.TargetFramerate.HasValue)
|
||||||
|
{
|
||||||
|
// This is to make sure keyframe interval is limited to our segment,
|
||||||
|
// as forcing keyframes is not enough.
|
||||||
|
// Example: we encoded half of desired length, then codec detected
|
||||||
|
// scene cut and inserted a keyframe; next forced keyframe would
|
||||||
|
// be created outside of segment, which breaks seeking.
|
||||||
|
keyFrameArg += string.Format(
|
||||||
|
CultureInfo.InvariantCulture,
|
||||||
|
" -g {0} -keyint_min {0}",
|
||||||
|
(int)(state.SegmentLength * state.TargetFramerate)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
|
var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
|
||||||
|
|
||||||
@@ -955,6 +985,15 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
|
|
||||||
var threads = EncodingHelper.GetNumberOfThreads(state, encodingOptions, videoCodec);
|
var threads = EncodingHelper.GetNumberOfThreads(state, encodingOptions, videoCodec);
|
||||||
|
|
||||||
|
if (state.BaseRequest.BreakOnNonKeyFrames)
|
||||||
|
{
|
||||||
|
// FIXME: this is actually a workaround, as ideally it really should be the client which decides whether non-keyframe
|
||||||
|
// breakpoints are supported; but current implementation always uses "ffmpeg input seeking" which is liable
|
||||||
|
// to produce a missing part of video stream before first keyframe is encountered, which may lead to
|
||||||
|
// awkward cases like a few starting HLS segments having no video whatsoever, which breaks hls.js
|
||||||
|
Logger.LogInformation("Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request");
|
||||||
|
state.BaseRequest.BreakOnNonKeyFrames = false;
|
||||||
|
}
|
||||||
var inputModifier = EncodingHelper.GetInputModifier(state, encodingOptions);
|
var inputModifier = EncodingHelper.GetInputModifier(state, encodingOptions);
|
||||||
|
|
||||||
// If isEncoding is true we're actually starting ffmpeg
|
// If isEncoding is true we're actually starting ffmpeg
|
||||||
@@ -965,14 +1004,6 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
|
|
||||||
var outputTsArg = Path.Combine(Path.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d" + GetSegmentFileExtension(state.Request);
|
var outputTsArg = Path.Combine(Path.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d" + GetSegmentFileExtension(state.Request);
|
||||||
|
|
||||||
var timeDeltaParam = string.Empty;
|
|
||||||
|
|
||||||
if (isEncoding && state.TargetFramerate > 0)
|
|
||||||
{
|
|
||||||
float startTime = 1 / (state.TargetFramerate.Value * 2);
|
|
||||||
timeDeltaParam = string.Format(CultureInfo.InvariantCulture, "-segment_time_delta {0:F3}", startTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
var segmentFormat = GetSegmentFileExtension(state.Request).TrimStart('.');
|
var segmentFormat = GetSegmentFileExtension(state.Request).TrimStart('.');
|
||||||
if (string.Equals(segmentFormat, "ts", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(segmentFormat, "ts", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
@@ -980,7 +1011,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
}
|
}
|
||||||
|
|
||||||
return string.Format(
|
return string.Format(
|
||||||
"{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time {6} {10} -individual_header_trailer 0 -segment_format {11} -segment_list_type m3u8 -segment_start_number {7} -segment_list \"{8}\" -y \"{9}\"",
|
"{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -f hls -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -hls_time {6} -individual_header_trailer 0 -hls_segment_type {7} -start_number {8} -hls_segment_filename \"{9}\" -hls_playlist_type vod -hls_list_size 0 -y \"{10}\"",
|
||||||
inputModifier,
|
inputModifier,
|
||||||
EncodingHelper.GetInputArgument(state, encodingOptions),
|
EncodingHelper.GetInputArgument(state, encodingOptions),
|
||||||
threads,
|
threads,
|
||||||
@@ -988,11 +1019,10 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
GetVideoArguments(state, encodingOptions),
|
GetVideoArguments(state, encodingOptions),
|
||||||
GetAudioArguments(state, encodingOptions),
|
GetAudioArguments(state, encodingOptions),
|
||||||
state.SegmentLength.ToString(CultureInfo.InvariantCulture),
|
state.SegmentLength.ToString(CultureInfo.InvariantCulture),
|
||||||
|
segmentFormat,
|
||||||
startNumberParam,
|
startNumberParam,
|
||||||
outputPath,
|
|
||||||
outputTsArg,
|
outputTsArg,
|
||||||
timeDeltaParam,
|
outputPath
|
||||||
segmentFormat
|
|
||||||
).Trim();
|
).Trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MediaBrowser.Common.Progress;
|
using MediaBrowser.Common.Progress;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Channels
|
namespace MediaBrowser.Controller.Channels
|
||||||
{
|
{
|
||||||
@@ -31,10 +31,10 @@ namespace MediaBrowser.Controller.Channels
|
|||||||
return base.IsVisible(user);
|
return base.IsVisible(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override SourceType SourceType => SourceType.Channel;
|
public override SourceType SourceType => SourceType.Channel;
|
||||||
|
|
||||||
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ using System;
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -23,7 +23,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
PhysicalLocationsList = Array.Empty<string>();
|
PhysicalLocationsList = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsPhysicalRoot => true;
|
public override bool IsPhysicalRoot => true;
|
||||||
|
|
||||||
public override bool CanDelete()
|
public override bool CanDelete()
|
||||||
@@ -31,7 +31,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => false;
|
public override bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -45,7 +45,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// <value>The virtual children.</value>
|
/// <value>The virtual children.</value>
|
||||||
public ConcurrentBag<BaseItem> VirtualChildren => _virtualChildren;
|
public ConcurrentBag<BaseItem> VirtualChildren => _virtualChildren;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string[] PhysicalLocations => PhysicalLocationsList;
|
public override string[] PhysicalLocations => PhysicalLocationsList;
|
||||||
|
|
||||||
public string[] PhysicalLocationsList { get; set; }
|
public string[] PhysicalLocationsList { get; set; }
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.Audio
|
namespace MediaBrowser.Controller.Entities.Audio
|
||||||
{
|
{
|
||||||
@@ -21,11 +21,11 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
IHasMediaSources
|
IHasMediaSources
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public IReadOnlyList<string> Artists { get; set; }
|
public IReadOnlyList<string> Artists { get; set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public IReadOnlyList<string> AlbumArtists { get; set; }
|
public IReadOnlyList<string> AlbumArtists { get; set; }
|
||||||
|
|
||||||
public Audio()
|
public Audio()
|
||||||
@@ -39,22 +39,22 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => true;
|
public override bool SupportsPlayedStatus => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAddingToPlaylist => true;
|
public override bool SupportsAddingToPlaylist => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => true;
|
public override bool SupportsInheritedParentImages => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected override bool SupportsOwnedItems => false;
|
protected override bool SupportsOwnedItems => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override Folder LatestItemsIndexContainer => AlbumEntity;
|
public override Folder LatestItemsIndexContainer => AlbumEntity;
|
||||||
|
|
||||||
public override bool CanDownload()
|
public override bool CanDownload()
|
||||||
@@ -62,14 +62,14 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
return IsFileProtocol;
|
return IsFileProtocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public MusicAlbum AlbumEntity => FindParent<MusicAlbum>();
|
public MusicAlbum AlbumEntity => FindParent<MusicAlbum>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the media.
|
/// Gets the type of the media.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The type of the media.</value>
|
/// <value>The type of the media.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string MediaType => Model.Entities.MediaType.Audio;
|
public override string MediaType => Model.Entities.MediaType.Audio;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
@@ -8,7 +9,6 @@ using MediaBrowser.Controller.Library;
|
|||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.Audio
|
namespace MediaBrowser.Controller.Entities.Audio
|
||||||
@@ -30,13 +30,13 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
AlbumArtists = Array.Empty<string>();
|
AlbumArtists = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAddingToPlaylist => true;
|
public override bool SupportsAddingToPlaylist => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => true;
|
public override bool SupportsInheritedParentImages => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public MusicArtist MusicArtist => GetMusicArtist(new DtoOptions(true));
|
public MusicArtist MusicArtist => GetMusicArtist(new DtoOptions(true));
|
||||||
|
|
||||||
public MusicArtist GetMusicArtist(DtoOptions options)
|
public MusicArtist GetMusicArtist(DtoOptions options)
|
||||||
@@ -58,23 +58,23 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => false;
|
public override bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsCumulativeRunTimeTicks => true;
|
public override bool SupportsCumulativeRunTimeTicks => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string AlbumArtist => AlbumArtists.FirstOrDefault();
|
public string AlbumArtist => AlbumArtists.FirstOrDefault();
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the tracks.
|
/// Gets the tracks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The tracks.</value>
|
/// <value>The tracks.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public IEnumerable<Audio> Tracks => GetRecursiveChildren(i => i is Audio).Cast<Audio>();
|
public IEnumerable<Audio> Tracks => GetRecursiveChildren(i => i is Audio).Cast<Audio>();
|
||||||
|
|
||||||
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
|
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Extensions;
|
using MediaBrowser.Controller.Extensions;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
@@ -18,25 +18,25 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class MusicArtist : Folder, IItemByName, IHasMusicGenres, IHasDualAccess, IHasLookupInfo<ArtistInfo>
|
public class MusicArtist : Folder, IItemByName, IHasMusicGenres, IHasDualAccess, IHasLookupInfo<ArtistInfo>
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsAccessedByName => ParentId.Equals(Guid.Empty);
|
public bool IsAccessedByName => ParentId.Equals(Guid.Empty);
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsFolder => !IsAccessedByName;
|
public override bool IsFolder => !IsAccessedByName;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsCumulativeRunTimeTicks => true;
|
public override bool SupportsCumulativeRunTimeTicks => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsDisplayedAsFolder => true;
|
public override bool IsDisplayedAsFolder => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAddingToPlaylist => true;
|
public override bool SupportsAddingToPlaylist => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => false;
|
public override bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -60,7 +60,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
return LibraryManager.GetItemList(query);
|
return LibraryManager.GetItemList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override IEnumerable<BaseItem> Children
|
public override IEnumerable<BaseItem> Children
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -117,7 +117,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -164,7 +164,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
public static string GetPath(string name)
|
public static string GetPath(string name)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Extensions;
|
using MediaBrowser.Controller.Extensions;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.Audio
|
namespace MediaBrowser.Controller.Entities.Audio
|
||||||
@@ -23,13 +23,13 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
return GetUserDataKeys()[0];
|
return GetUserDataKeys()[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAddingToPlaylist => true;
|
public override bool SupportsAddingToPlaylist => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAncestors => false;
|
public override bool SupportsAncestors => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsDisplayedAsFolder => true;
|
public override bool IsDisplayedAsFolder => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -37,7 +37,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -55,7 +55,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
public IList<BaseItem> GetTaggedItems(InternalItemsQuery query)
|
public IList<BaseItem> GetTaggedItems(InternalItemsQuery query)
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public class AudioBook : Audio.Audio, IHasSeries, IHasLookupInfo<SongInfo>
|
public class AudioBook : Audio.Audio, IHasSeries, IHasLookupInfo<SongInfo>
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPositionTicksResume => true;
|
public override bool SupportsPositionTicksResume => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => true;
|
public override bool SupportsPlayedStatus => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesPresentationUniqueKey { get; set; }
|
public string SeriesPresentationUniqueKey { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesName { get; set; }
|
public string SeriesName { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid SeriesId { get; set; }
|
public Guid SeriesId { get; set; }
|
||||||
|
|
||||||
public string FindSeriesSortName()
|
public string FindSeriesSortName()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
@@ -25,7 +26,6 @@ using MediaBrowser.Model.Library;
|
|||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// The supported image extensions
|
/// The supported image extensions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string[] SupportedImageExtensions
|
public static readonly string[] SupportedImageExtensions
|
||||||
= new [] { ".png", ".jpg", ".jpeg", ".tbn", ".gif" };
|
= new[] { ".png", ".jpg", ".jpeg", ".tbn", ".gif" };
|
||||||
|
|
||||||
private static readonly List<string> _supportedExtensions = new List<string>(SupportedImageExtensions)
|
private static readonly List<string> _supportedExtensions = new List<string>(SupportedImageExtensions)
|
||||||
{
|
{
|
||||||
@@ -98,62 +98,62 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
SampleFolderName
|
SampleFolderName
|
||||||
};
|
};
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid[] ThemeSongIds { get; set; }
|
public Guid[] ThemeSongIds { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid[] ThemeVideoIds { get; set; }
|
public Guid[] ThemeVideoIds { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string PreferredMetadataCountryCode { get; set; }
|
public string PreferredMetadataCountryCode { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string PreferredMetadataLanguage { get; set; }
|
public string PreferredMetadataLanguage { get; set; }
|
||||||
|
|
||||||
public long? Size { get; set; }
|
public long? Size { get; set; }
|
||||||
public string Container { get; set; }
|
public string Container { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string Tagline { get; set; }
|
public string Tagline { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual ItemImageInfo[] ImageInfos { get; set; }
|
public virtual ItemImageInfo[] ImageInfos { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsVirtualItem { get; set; }
|
public bool IsVirtualItem { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the album.
|
/// Gets or sets the album.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The album.</value>
|
/// <value>The album.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string Album { get; set; }
|
public string Album { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the channel identifier.
|
/// Gets or sets the channel identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The channel identifier.</value>
|
/// <value>The channel identifier.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid ChannelId { get; set; }
|
public Guid ChannelId { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsAddingToPlaylist => false;
|
public virtual bool SupportsAddingToPlaylist => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool AlwaysScanInternalMetadataPath => false;
|
public virtual bool AlwaysScanInternalMetadataPath => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this instance is in mixed folder.
|
/// Gets a value indicating whether this instance is in mixed folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is in mixed folder; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is in mixed folder; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsInMixedFolder { get; set; }
|
public bool IsInMixedFolder { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsPlayedStatus => false;
|
public virtual bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsPositionTicksResume => false;
|
public virtual bool SupportsPositionTicksResume => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsRemoteImageDownloading => true;
|
public virtual bool SupportsRemoteImageDownloading => true;
|
||||||
|
|
||||||
private string _name;
|
private string _name;
|
||||||
@@ -161,7 +161,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the name.
|
/// Gets or sets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name.</value>
|
/// <value>The name.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual string Name
|
public virtual string Name
|
||||||
{
|
{
|
||||||
get => _name;
|
get => _name;
|
||||||
@@ -174,35 +174,35 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsUnaired => PremiereDate.HasValue && PremiereDate.Value.ToLocalTime().Date >= DateTime.Now.Date;
|
public bool IsUnaired => PremiereDate.HasValue && PremiereDate.Value.ToLocalTime().Date >= DateTime.Now.Date;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public int? TotalBitrate { get; set; }
|
public int? TotalBitrate { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public ExtraType? ExtraType { get; set; }
|
public ExtraType? ExtraType { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsThemeMedia => ExtraType.HasValue && (ExtraType.Value == Model.Entities.ExtraType.ThemeSong || ExtraType.Value == Model.Entities.ExtraType.ThemeVideo);
|
public bool IsThemeMedia => ExtraType.HasValue && (ExtraType.Value == Model.Entities.ExtraType.ThemeSong || ExtraType.Value == Model.Entities.ExtraType.ThemeVideo);
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string OriginalTitle { get; set; }
|
public string OriginalTitle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the id.
|
/// Gets or sets the id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The id.</value>
|
/// <value>The id.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid OwnerId { get; set; }
|
public Guid OwnerId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the audio.
|
/// Gets or sets the audio.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The audio.</value>
|
/// <value>The audio.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public ProgramAudio? Audio { get; set; }
|
public ProgramAudio? Audio { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -210,7 +210,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Default is based on the type for everything except actual generic folders.
|
/// Default is based on the type for everything except actual generic folders.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The display prefs id.</value>
|
/// <value>The display prefs id.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual Guid DisplayPreferencesId
|
public virtual Guid DisplayPreferencesId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -224,10 +224,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the path.
|
/// Gets or sets the path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The path.</value>
|
/// <value>The path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual string Path { get; set; }
|
public virtual string Path { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual SourceType SourceType
|
public virtual SourceType SourceType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -245,7 +245,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Returns the folder containing the item.
|
/// Returns the folder containing the item.
|
||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual string ContainingFolderPath
|
public virtual string ContainingFolderPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -263,26 +263,26 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the name of the service.
|
/// Gets or sets the name of the service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name of the service.</value>
|
/// <value>The name of the service.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string ServiceName { get; set; }
|
public string ServiceName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this content came from an external service, the id of the content on that service
|
/// If this content came from an external service, the id of the content on that service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string ExternalId { get; set; }
|
public string ExternalId { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string ExternalSeriesId { get; set; }
|
public string ExternalSeriesId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the etag.
|
/// Gets or sets the etag.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The etag.</value>
|
/// <value>The etag.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string ExternalEtag { get; set; }
|
public string ExternalEtag { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool IsHidden => false;
|
public virtual bool IsHidden => false;
|
||||||
|
|
||||||
public BaseItem GetOwner()
|
public BaseItem GetOwner()
|
||||||
@@ -295,7 +295,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the type of the location.
|
/// Gets or sets the type of the location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The type of the location.</value>
|
/// <value>The type of the location.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual LocationType LocationType
|
public virtual LocationType LocationType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -320,7 +320,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public MediaProtocol? PathProtocol
|
public MediaProtocol? PathProtocol
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -343,13 +343,13 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return current.HasValue && current.Value == protocol;
|
return current.HasValue && current.Value == protocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsFileProtocol => IsPathProtocol(MediaProtocol.File);
|
public bool IsFileProtocol => IsPathProtocol(MediaProtocol.File);
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool HasPathProtocol => PathProtocol.HasValue;
|
public bool HasPathProtocol => PathProtocol.HasValue;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsLocalMetadata
|
public virtual bool SupportsLocalMetadata
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -363,7 +363,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual string FileNameWithoutExtension
|
public virtual string FileNameWithoutExtension
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -377,7 +377,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool EnableAlphaNumericSorting => true;
|
public virtual bool EnableAlphaNumericSorting => true;
|
||||||
|
|
||||||
private List<Tuple<StringBuilder, bool>> GetSortChunks(string s1)
|
private List<Tuple<StringBuilder, bool>> GetSortChunks(string s1)
|
||||||
@@ -418,7 +418,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// This is just a helper for convenience
|
/// This is just a helper for convenience
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The primary image path.</value>
|
/// <value>The primary image path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string PrimaryImagePath => this.GetImagePath(ImageType.Primary);
|
public string PrimaryImagePath => this.GetImagePath(ImageType.Primary);
|
||||||
|
|
||||||
public bool IsMetadataFetcherEnabled(LibraryOptions libraryOptions, string name)
|
public bool IsMetadataFetcherEnabled(LibraryOptions libraryOptions, string name)
|
||||||
@@ -544,20 +544,20 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the date created.
|
/// Gets or sets the date created.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The date created.</value>
|
/// <value>The date created.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime DateCreated { get; set; }
|
public DateTime DateCreated { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the date modified.
|
/// Gets or sets the date modified.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The date modified.</value>
|
/// <value>The date modified.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime DateModified { get; set; }
|
public DateTime DateModified { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime DateLastSaved { get; set; }
|
public DateTime DateLastSaved { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime DateLastRefreshed { get; set; }
|
public DateTime DateLastRefreshed { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -583,24 +583,24 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return Name;
|
return Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsLocked { get; set; }
|
public bool IsLocked { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the locked fields.
|
/// Gets or sets the locked fields.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The locked fields.</value>
|
/// <value>The locked fields.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public MetadataFields[] LockedFields { get; set; }
|
public MetadataFields[] LockedFields { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the media.
|
/// Gets the type of the media.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The type of the media.</value>
|
/// <value>The type of the media.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual string MediaType => null;
|
public virtual string MediaType => null;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual string[] PhysicalLocations
|
public virtual string[] PhysicalLocations
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -619,7 +619,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the name of the forced sort.
|
/// Gets or sets the name of the forced sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name of the forced sort.</value>
|
/// <value>The name of the forced sort.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string ForcedSortName
|
public string ForcedSortName
|
||||||
{
|
{
|
||||||
get => _forcedSortName;
|
get => _forcedSortName;
|
||||||
@@ -631,7 +631,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets the name of the sort.
|
/// Gets the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name of the sort.</value>
|
/// <value>The name of the sort.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SortName
|
public string SortName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -744,7 +744,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return builder.ToString().RemoveDiacritics();
|
return builder.ToString().RemoveDiacritics();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool EnableMediaSourceDisplay
|
public bool EnableMediaSourceDisplay
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -758,14 +758,14 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid ParentId { get; set; }
|
public Guid ParentId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the parent.
|
/// Gets or sets the parent.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The parent.</value>
|
/// <value>The parent.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Folder Parent
|
public Folder Parent
|
||||||
{
|
{
|
||||||
get => GetParent() as Folder;
|
get => GetParent() as Folder;
|
||||||
@@ -822,7 +822,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual Guid DisplayParentId
|
public virtual Guid DisplayParentId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -832,7 +832,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public BaseItem DisplayParent
|
public BaseItem DisplayParent
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -850,97 +850,97 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// When the item first debuted. For movies this could be premiere date, episodes would be first aired
|
/// When the item first debuted. For movies this could be premiere date, episodes would be first aired
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The premiere date.</value>
|
/// <value>The premiere date.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime? PremiereDate { get; set; }
|
public DateTime? PremiereDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the end date.
|
/// Gets or sets the end date.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The end date.</value>
|
/// <value>The end date.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime? EndDate { get; set; }
|
public DateTime? EndDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the official rating.
|
/// Gets or sets the official rating.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The official rating.</value>
|
/// <value>The official rating.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string OfficialRating { get; set; }
|
public string OfficialRating { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public int InheritedParentalRatingValue { get; set; }
|
public int InheritedParentalRatingValue { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the critic rating.
|
/// Gets or sets the critic rating.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The critic rating.</value>
|
/// <value>The critic rating.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public float? CriticRating { get; set; }
|
public float? CriticRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the custom rating.
|
/// Gets or sets the custom rating.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The custom rating.</value>
|
/// <value>The custom rating.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string CustomRating { get; set; }
|
public string CustomRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the overview.
|
/// Gets or sets the overview.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The overview.</value>
|
/// <value>The overview.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string Overview { get; set; }
|
public string Overview { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the studios.
|
/// Gets or sets the studios.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The studios.</value>
|
/// <value>The studios.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string[] Studios { get; set; }
|
public string[] Studios { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the genres.
|
/// Gets or sets the genres.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The genres.</value>
|
/// <value>The genres.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string[] Genres { get; set; }
|
public string[] Genres { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the tags.
|
/// Gets or sets the tags.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The tags.</value>
|
/// <value>The tags.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string[] Tags { get; set; }
|
public string[] Tags { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string[] ProductionLocations { get; set; }
|
public string[] ProductionLocations { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the home page URL.
|
/// Gets or sets the home page URL.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The home page URL.</value>
|
/// <value>The home page URL.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string HomePageUrl { get; set; }
|
public string HomePageUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the community rating.
|
/// Gets or sets the community rating.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The community rating.</value>
|
/// <value>The community rating.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public float? CommunityRating { get; set; }
|
public float? CommunityRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the run time ticks.
|
/// Gets or sets the run time ticks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The run time ticks.</value>
|
/// <value>The run time ticks.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public long? RunTimeTicks { get; set; }
|
public long? RunTimeTicks { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the production year.
|
/// Gets or sets the production year.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The production year.</value>
|
/// <value>The production year.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public int? ProductionYear { get; set; }
|
public int? ProductionYear { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -948,20 +948,20 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// This could be episode number, album track number, etc.
|
/// This could be episode number, album track number, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The index number.</value>
|
/// <value>The index number.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public int? IndexNumber { get; set; }
|
public int? IndexNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For an episode this could be the season number, or for a song this could be the disc number.
|
/// For an episode this could be the season number, or for a song this could be the disc number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The parent index number.</value>
|
/// <value>The parent index number.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public int? ParentIndexNumber { get; set; }
|
public int? ParentIndexNumber { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool HasLocalAlternateVersions => false;
|
public virtual bool HasLocalAlternateVersions => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string OfficialRatingForComparison
|
public string OfficialRatingForComparison
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -982,7 +982,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string CustomRatingForComparison
|
public string CustomRatingForComparison
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -1407,13 +1407,13 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected virtual bool SupportsOwnedItems => !ParentId.Equals(Guid.Empty) && IsFileProtocol;
|
protected virtual bool SupportsOwnedItems => !ParentId.Equals(Guid.Empty) && IsFileProtocol;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsPeople => false;
|
public virtual bool SupportsPeople => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsThemeMedia => false;
|
public virtual bool SupportsThemeMedia => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1613,10 +1613,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the provider ids.
|
/// Gets or sets the provider ids.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The provider ids.</value>
|
/// <value>The provider ids.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Dictionary<string, string> ProviderIds { get; set; }
|
public Dictionary<string, string> ProviderIds { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual Folder LatestItemsIndexContainer => null;
|
public virtual Folder LatestItemsIndexContainer => null;
|
||||||
|
|
||||||
public virtual double GetDefaultPrimaryImageAspectRatio()
|
public virtual double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -1629,7 +1629,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return Id.ToString("N", CultureInfo.InvariantCulture);
|
return Id.ToString("N", CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string PresentationUniqueKey { get; set; }
|
public string PresentationUniqueKey { get; set; }
|
||||||
|
|
||||||
public string GetPresentationUniqueKey()
|
public string GetPresentationUniqueKey()
|
||||||
@@ -1934,7 +1934,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return IsVisibleStandaloneInternal(user, true);
|
return IsVisibleStandaloneInternal(user, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsInheritedParentImages => false;
|
public virtual bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
protected bool IsVisibleStandaloneInternal(User user, bool checkFolders)
|
protected bool IsVisibleStandaloneInternal(User user, bool checkFolders)
|
||||||
@@ -1977,10 +1977,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets a value indicating whether this instance is folder.
|
/// Gets a value indicating whether this instance is folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool IsFolder => false;
|
public virtual bool IsFolder => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool IsDisplayedAsFolder => false;
|
public virtual bool IsDisplayedAsFolder => false;
|
||||||
|
|
||||||
public virtual string GetClientTypeName()
|
public virtual string GetClientTypeName()
|
||||||
@@ -2066,7 +2066,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool EnableRememberingTrackSelections => true;
|
public virtual bool EnableRememberingTrackSelections => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -2776,7 +2776,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool IsTopParent
|
public virtual bool IsTopParent
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -2804,10 +2804,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsAncestors => true;
|
public virtual bool SupportsAncestors => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool StopRefreshIfLocalMetadataFound => true;
|
public virtual bool StopRefreshIfLocalMetadataFound => true;
|
||||||
|
|
||||||
public virtual IEnumerable<Guid> GetIdsForAncestorQuery()
|
public virtual IEnumerable<Guid> GetIdsForAncestorQuery()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using MediaBrowser.Model.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class BasePluginFolder : Folder, ICollectionFolder
|
public abstract class BasePluginFolder : Folder, ICollectionFolder
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual string CollectionType => null;
|
public virtual string CollectionType => null;
|
||||||
|
|
||||||
public override bool CanDelete()
|
public override bool CanDelete()
|
||||||
@@ -21,10 +21,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
//public override double? GetDefaultPrimaryImageAspectRatio()
|
//public override double? GetDefaultPrimaryImageAspectRatio()
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public class Book : BaseItem, IHasLookupInfo<BookInfo>, IHasSeries
|
public class Book : BaseItem, IHasLookupInfo<BookInfo>, IHasSeries
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string MediaType => Model.Entities.MediaType.Book;
|
public override string MediaType => Model.Entities.MediaType.Book;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesPresentationUniqueKey { get; set; }
|
public string SeriesPresentationUniqueKey { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesName { get; set; }
|
public string SeriesName { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid SeriesId { get; set; }
|
public Guid SeriesId { get; set; }
|
||||||
|
|
||||||
public string FindSeriesSortName()
|
public string FindSeriesSortName()
|
||||||
|
|||||||
@@ -2,14 +2,13 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Extensions;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
|
||||||
@@ -33,10 +32,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
PhysicalFolderIds = Array.Empty<Guid>();
|
PhysicalFolderIds = Array.Empty<Guid>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => false;
|
public override bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
public override bool CanDelete()
|
public override bool CanDelete()
|
||||||
@@ -144,10 +143,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Allow different display preferences for each collection folder
|
/// Allow different display preferences for each collection folder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The display prefs id.</value>
|
/// <value>The display prefs id.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override Guid DisplayPreferencesId => Id;
|
public override Guid DisplayPreferencesId => Id;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string[] PhysicalLocations => PhysicalLocationsList;
|
public override string[] PhysicalLocations => PhysicalLocationsList;
|
||||||
|
|
||||||
public override bool IsSaveLocalMetadataEnabled()
|
public override bool IsSaveLocalMetadataEnabled()
|
||||||
@@ -311,7 +310,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Our children are actually just references to the ones in the physical root...
|
/// Our children are actually just references to the ones in the physical root...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The actual children.</value>
|
/// <value>The actual children.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override IEnumerable<BaseItem> Children => GetActualChildren();
|
public override IEnumerable<BaseItem> Children => GetActualChildren();
|
||||||
|
|
||||||
public IEnumerable<BaseItem> GetActualChildren()
|
public IEnumerable<BaseItem> GetActualChildren()
|
||||||
@@ -361,7 +360,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Progress;
|
using MediaBrowser.Common.Progress;
|
||||||
@@ -18,7 +19,6 @@ using MediaBrowser.Controller.Providers;
|
|||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
@@ -39,7 +39,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
public LinkedChild[] LinkedChildren { get; set; }
|
public LinkedChild[] LinkedChildren { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime? DateLastMediaAdded { get; set; }
|
public DateTime? DateLastMediaAdded { get; set; }
|
||||||
|
|
||||||
public Folder()
|
public Folder()
|
||||||
@@ -47,35 +47,35 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
LinkedChildren = Array.Empty<LinkedChild>();
|
LinkedChildren = Array.Empty<LinkedChild>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsThemeMedia => true;
|
public override bool SupportsThemeMedia => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool IsPreSorted => false;
|
public virtual bool IsPreSorted => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool IsPhysicalRoot => false;
|
public virtual bool IsPhysicalRoot => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => true;
|
public override bool SupportsInheritedParentImages => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => true;
|
public override bool SupportsPlayedStatus => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this instance is folder.
|
/// Gets a value indicating whether this instance is folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsFolder => true;
|
public override bool IsFolder => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsDisplayedAsFolder => true;
|
public override bool IsDisplayedAsFolder => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsCumulativeRunTimeTicks => false;
|
public virtual bool SupportsCumulativeRunTimeTicks => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsDateLastMediaAdded => false;
|
public virtual bool SupportsDateLastMediaAdded => false;
|
||||||
|
|
||||||
public override bool CanDelete()
|
public override bool CanDelete()
|
||||||
@@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return baseResult;
|
return baseResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string FileNameWithoutExtension
|
public override string FileNameWithoutExtension
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -127,7 +127,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected virtual bool SupportsShortcutChildren => false;
|
protected virtual bool SupportsShortcutChildren => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -162,14 +162,14 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets the actual children.
|
/// Gets the actual children.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The actual children.</value>
|
/// <value>The actual children.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual IEnumerable<BaseItem> Children => LoadChildren();
|
public virtual IEnumerable<BaseItem> Children => LoadChildren();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// thread-safe access to all recursive children of this folder - without regard to user
|
/// thread-safe access to all recursive children of this folder - without regard to user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The recursive children.</value>
|
/// <value>The recursive children.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public IEnumerable<BaseItem> RecursiveChildren => GetRecursiveChildren();
|
public IEnumerable<BaseItem> RecursiveChildren => GetRecursiveChildren();
|
||||||
|
|
||||||
public override bool IsVisible(User user)
|
public override bool IsVisible(User user)
|
||||||
@@ -1428,7 +1428,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
.Where(i => i.Item2 != null);
|
.Where(i => i.Item2 != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected override bool SupportsOwnedItems => base.SupportsOwnedItems || SupportsShortcutChildren;
|
protected override bool SupportsOwnedItems => base.SupportsOwnedItems || SupportsShortcutChildren;
|
||||||
|
|
||||||
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
||||||
@@ -1595,7 +1595,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return !IsPlayed(user);
|
return !IsPlayed(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public virtual bool SupportsUserDataFromChildren
|
public virtual bool SupportsUserDataFromChildren
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Extensions;
|
using MediaBrowser.Controller.Extensions;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
@@ -34,13 +34,13 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsDisplayedAsFolder => true;
|
public override bool IsDisplayedAsFolder => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAncestors => false;
|
public override bool SupportsAncestors => false;
|
||||||
|
|
||||||
public override bool IsSaveLocalMetadataEnabled()
|
public override bool IsSaveLocalMetadataEnabled()
|
||||||
@@ -61,7 +61,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return LibraryManager.GetItemList(query);
|
return LibraryManager.GetItemList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
public static string GetPath(string name)
|
public static string GetPath(string name)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -28,7 +28,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
public int Height { get; set; }
|
public int Height { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsLocalFile => Path == null || !Path.StartsWith("http", StringComparison.OrdinalIgnoreCase);
|
public bool IsLocalFile => Path == null || !Path.StartsWith("http", StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
public LinkedChildType Type { get; set; }
|
public LinkedChildType Type { get; set; }
|
||||||
public string LibraryItemId { get; set; }
|
public string LibraryItemId { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.Movies
|
namespace MediaBrowser.Controller.Entities.Movies
|
||||||
@@ -24,13 +24,13 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
DisplayOrder = ItemSortBy.PremiereDate;
|
DisplayOrder = ItemSortBy.PremiereDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected override bool FilterLinkedChildrenPerUser => true;
|
protected override bool FilterLinkedChildrenPerUser => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => true;
|
public override bool SupportsPeople => true;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -79,7 +79,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
return new List<BaseItem>();
|
return new List<BaseItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
private bool IsLegacyBoxSet
|
private bool IsLegacyBoxSet
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -98,7 +98,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsPreSorted => true;
|
public override bool IsPreSorted => true;
|
||||||
|
|
||||||
public override bool IsAuthorizedToDelete(User user, List<Folder> allCollectionFolders)
|
public override bool IsAuthorizedToDelete(User user, List<Folder> allCollectionFolders)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
@@ -8,7 +9,6 @@ using MediaBrowser.Model.Configuration;
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.Movies
|
namespace MediaBrowser.Controller.Entities.Movies
|
||||||
{
|
{
|
||||||
@@ -39,7 +39,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
/// <value>The name of the TMDB collection.</value>
|
/// <value>The name of the TMDB collection.</value>
|
||||||
public string TmdbCollectionName { get; set; }
|
public string TmdbCollectionName { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string CollectionName
|
public string CollectionName
|
||||||
{
|
{
|
||||||
get => TmdbCollectionName;
|
get => TmdbCollectionName;
|
||||||
@@ -186,7 +186,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool StopRefreshIfLocalMetadataFound => false;
|
public override bool StopRefreshIfLocalMetadataFound => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public class MusicVideo : Video, IHasArtist, IHasMusicGenres, IHasLookupInfo<MusicVideoInfo>
|
public class MusicVideo : Video, IHasArtist, IHasMusicGenres, IHasLookupInfo<MusicVideoInfo>
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public IReadOnlyList<string> Artists { get; set; }
|
public IReadOnlyList<string> Artists { get; set; }
|
||||||
|
|
||||||
public MusicVideo()
|
public MusicVideo()
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Extensions;
|
using MediaBrowser.Controller.Extensions;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
public override bool CanDelete()
|
public override bool CanDelete()
|
||||||
@@ -63,13 +63,13 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool EnableAlphaNumericSorting => false;
|
public override bool EnableAlphaNumericSorting => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAncestors => false;
|
public override bool SupportsAncestors => false;
|
||||||
|
|
||||||
public static string GetPath(string name)
|
public static string GetPath(string name)
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Model.Drawing;
|
using MediaBrowser.Model.Drawing;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public class Photo : BaseItem
|
public class Photo : BaseItem
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsLocalMetadata => false;
|
public override bool SupportsLocalMetadata => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string MediaType => Model.Entities.MediaType.Photo;
|
public override string MediaType => Model.Entities.MediaType.Photo;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override Folder LatestItemsIndexContainer => AlbumEntity;
|
public override Folder LatestItemsIndexContainer => AlbumEntity;
|
||||||
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public PhotoAlbum AlbumEntity
|
public PhotoAlbum AlbumEntity
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
using MediaBrowser.Model.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public class PhotoAlbum : Folder
|
public class PhotoAlbum : Folder
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool AlwaysScanInternalMetadataPath => true;
|
public override bool AlwaysScanInternalMetadataPath => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => false;
|
public override bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Extensions;
|
using MediaBrowser.Controller.Extensions;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
@@ -28,13 +28,13 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsDisplayedAsFolder => true;
|
public override bool IsDisplayedAsFolder => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAncestors => false;
|
public override bool SupportsAncestors => false;
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -62,7 +62,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return LibraryManager.GetItemList(query);
|
return LibraryManager.GetItemList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
public static string GetPath(string name)
|
public static string GetPath(string name)
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.TV
|
namespace MediaBrowser.Controller.Entities.TV
|
||||||
@@ -49,25 +49,25 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
return series == null ? SeriesName : series.SortName;
|
return series == null ? SeriesName : series.SortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected override bool SupportsOwnedItems => IsStacked || MediaSourceCount > 1;
|
protected override bool SupportsOwnedItems => IsStacked || MediaSourceCount > 1;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => true;
|
public override bool SupportsInheritedParentImages => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => true;
|
public override bool SupportsPeople => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public int? AiredSeasonNumber => AirsAfterSeasonNumber ?? AirsBeforeSeasonNumber ?? ParentIndexNumber;
|
public int? AiredSeasonNumber => AirsAfterSeasonNumber ?? AirsBeforeSeasonNumber ?? ParentIndexNumber;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override Folder LatestItemsIndexContainer => Series;
|
public override Folder LatestItemsIndexContainer => Series;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override Guid DisplayParentId => SeasonId;
|
public override Guid DisplayParentId => SeasonId;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected override bool EnableDefaultVideoUserDataKeys => false;
|
protected override bool EnableDefaultVideoUserDataKeys => false;
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -104,7 +104,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
/// This Episode's Series Instance
|
/// This Episode's Series Instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The series.</value>
|
/// <value>The series.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Series Series
|
public Series Series
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -118,7 +118,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Season Season
|
public Season Season
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -132,16 +132,16 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsInSeasonFolder => FindParent<Season>() != null;
|
public bool IsInSeasonFolder => FindParent<Season>() != null;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesPresentationUniqueKey { get; set; }
|
public string SeriesPresentationUniqueKey { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesName { get; set; }
|
public string SeriesName { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeasonName { get; set; }
|
public string SeasonName { get; set; }
|
||||||
|
|
||||||
public string FindSeriesPresentationUniqueKey()
|
public string FindSeriesPresentationUniqueKey()
|
||||||
@@ -224,7 +224,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsRemoteImageDownloading
|
public override bool SupportsRemoteImageDownloading
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -238,12 +238,12 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsMissingEpisode => LocationType == LocationType.Virtual;
|
public bool IsMissingEpisode => LocationType == LocationType.Virtual;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid SeasonId { get; set; }
|
public Guid SeasonId { get; set; }
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid SeriesId { get; set; }
|
public Guid SeriesId { get; set; }
|
||||||
|
|
||||||
public Guid FindSeriesId()
|
public Guid FindSeriesId()
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.TV
|
namespace MediaBrowser.Controller.Entities.TV
|
||||||
@@ -15,22 +15,22 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Season : Folder, IHasSeries, IHasLookupInfo<SeasonInfo>
|
public class Season : Folder, IHasSeries, IHasLookupInfo<SeasonInfo>
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAddingToPlaylist => true;
|
public override bool SupportsAddingToPlaylist => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsPreSorted => true;
|
public override bool IsPreSorted => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsDateLastMediaAdded => false;
|
public override bool SupportsDateLastMediaAdded => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => true;
|
public override bool SupportsPeople => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => true;
|
public override bool SupportsInheritedParentImages => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override Guid DisplayParentId => SeriesId;
|
public override Guid DisplayParentId => SeriesId;
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -71,7 +71,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
/// This Episode's Series Instance
|
/// This Episode's Series Instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The series.</value>
|
/// <value>The series.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Series Series
|
public Series Series
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -85,7 +85,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesPath
|
public string SeriesPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -179,13 +179,13 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
return UnratedItem.Series;
|
return UnratedItem.Series;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesPresentationUniqueKey { get; set; }
|
public string SeriesPresentationUniqueKey { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string SeriesName { get; set; }
|
public string SeriesName { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Guid SeriesId { get; set; }
|
public Guid SeriesId { get; set; }
|
||||||
|
|
||||||
public string FindSeriesPresentationUniqueKey()
|
public string FindSeriesPresentationUniqueKey()
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
@@ -10,7 +11,6 @@ using MediaBrowser.Model.Configuration;
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.TV
|
namespace MediaBrowser.Controller.Entities.TV
|
||||||
@@ -31,19 +31,19 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
public DayOfWeek[] AirDays { get; set; }
|
public DayOfWeek[] AirDays { get; set; }
|
||||||
public string AirTime { get; set; }
|
public string AirTime { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAddingToPlaylist => true;
|
public override bool SupportsAddingToPlaylist => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsPreSorted => true;
|
public override bool IsPreSorted => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsDateLastMediaAdded => true;
|
public override bool SupportsDateLastMediaAdded => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => true;
|
public override bool SupportsPeople => true;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -504,7 +504,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool StopRefreshIfLocalMetadataFound => false;
|
public override bool StopRefreshIfLocalMetadataFound => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool StopRefreshIfLocalMetadataFound => false;
|
public override bool StopRefreshIfLocalMetadataFound => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
@@ -25,7 +25,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
public string EasyPassword { get; set; }
|
public string EasyPassword { get; set; }
|
||||||
|
|
||||||
// Strictly to remove IgnoreDataMember
|
// Strictly to remove JsonIgnore
|
||||||
public override ItemImageInfo[] ImageInfos
|
public override ItemImageInfo[] ImageInfos
|
||||||
{
|
{
|
||||||
get => base.ImageInfos;
|
get => base.ImageInfos;
|
||||||
@@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the path.
|
/// Gets or sets the path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The path.</value>
|
/// <value>The path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string Path
|
public override string Path
|
||||||
{
|
{
|
||||||
get => ConfigurationDirectoryPath;
|
get => ConfigurationDirectoryPath;
|
||||||
@@ -65,14 +65,14 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the root folder.
|
/// Gets the root folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The root folder.</value>
|
/// <value>The root folder.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Folder RootFolder => LibraryManager.GetUserRootFolder();
|
public Folder RootFolder => LibraryManager.GetUserRootFolder();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -88,7 +88,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
private volatile UserConfiguration _config;
|
private volatile UserConfiguration _config;
|
||||||
private readonly object _configSyncLock = new object();
|
private readonly object _configSyncLock = new object();
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public UserConfiguration Configuration
|
public UserConfiguration Configuration
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -111,7 +111,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
private volatile UserPolicy _policy;
|
private volatile UserPolicy _policy;
|
||||||
private readonly object _policySyncLock = new object();
|
private readonly object _policySyncLock = new object();
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public UserPolicy Policy
|
public UserPolicy Policy
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -168,7 +168,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets the path to the user's configuration directory
|
/// Gets the path to the user's configuration directory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The configuration directory path.</value>
|
/// <value>The configuration directory path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string ConfigurationDirectoryPath => GetConfigurationDirectoryPath(Name);
|
public string ConfigurationDirectoryPath => GetConfigurationDirectoryPath(Name);
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -252,7 +252,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
public long InternalId { get; set; }
|
public long InternalId { get; set; }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using MediaBrowser.Model.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// This should never be serialized.
|
/// This should never be serialized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>null</c> if [likes] contains no value, <c>true</c> if [likes]; otherwise, <c>false</c>.</value>
|
/// <value><c>null</c> if [likes] contains no value, <c>true</c> if [likes]; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool? Likes
|
public bool? Likes
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Library;
|
using MediaBrowser.Model.Library;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -33,10 +33,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => false;
|
public override bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
private void ClearCache()
|
private void ClearCache()
|
||||||
@@ -75,10 +75,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return GetChildren(user, true).Count;
|
return GetChildren(user, true).Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected override bool SupportsShortcutChildren => true;
|
protected override bool SupportsShortcutChildren => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsPreSorted => true;
|
public override bool IsPreSorted => true;
|
||||||
|
|
||||||
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
|
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.TV;
|
using MediaBrowser.Controller.TV;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -17,7 +17,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
public static ITVSeriesManager TVSeriesManager;
|
public static ITVSeriesManager TVSeriesManager;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string CollectionType => ViewType;
|
public string CollectionType => ViewType;
|
||||||
|
|
||||||
public override IEnumerable<Guid> GetIdsForAncestorQuery()
|
public override IEnumerable<Guid> GetIdsForAncestorQuery()
|
||||||
@@ -40,10 +40,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => false;
|
public override bool SupportsPlayedStatus => false;
|
||||||
|
|
||||||
public override int GetChildCount(User user)
|
public override int GetChildCount(User user)
|
||||||
@@ -167,7 +167,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
@@ -13,7 +14,6 @@ using MediaBrowser.Model.Dto;
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
@@ -25,23 +25,23 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
ISupportsPlaceHolders,
|
ISupportsPlaceHolders,
|
||||||
IHasMediaSources
|
IHasMediaSources
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string PrimaryVersionId { get; set; }
|
public string PrimaryVersionId { get; set; }
|
||||||
|
|
||||||
public string[] AdditionalParts { get; set; }
|
public string[] AdditionalParts { get; set; }
|
||||||
public string[] LocalAlternateVersions { get; set; }
|
public string[] LocalAlternateVersions { get; set; }
|
||||||
public LinkedChild[] LinkedAlternateVersions { get; set; }
|
public LinkedChild[] LinkedAlternateVersions { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => true;
|
public override bool SupportsPlayedStatus => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => true;
|
public override bool SupportsPeople => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => true;
|
public override bool SupportsInheritedParentImages => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPositionTicksResume
|
public override bool SupportsPositionTicksResume
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -90,7 +90,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return base.CreatePresentationUniqueKey();
|
return base.CreatePresentationUniqueKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsThemeMedia => true;
|
public override bool SupportsThemeMedia => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -180,10 +180,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return IsFileProtocol;
|
return IsFileProtocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAddingToPlaylist => true;
|
public override bool SupportsAddingToPlaylist => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public int MediaSourceCount
|
public int MediaSourceCount
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -200,10 +200,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsStacked => AdditionalParts.Length > 0;
|
public bool IsStacked => AdditionalParts.Length > 0;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool HasLocalAlternateVersions => LocalAlternateVersions.Length > 0;
|
public override bool HasLocalAlternateVersions => LocalAlternateVersions.Length > 0;
|
||||||
|
|
||||||
public IEnumerable<Guid> GetAdditionalPartIds()
|
public IEnumerable<Guid> GetAdditionalPartIds()
|
||||||
@@ -218,7 +218,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
public static ILiveTvManager LiveTvManager { get; set; }
|
public static ILiveTvManager LiveTvManager { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override SourceType SourceType
|
public override SourceType SourceType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -247,7 +247,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return base.CanDelete();
|
return base.CanDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsCompleteMedia
|
public bool IsCompleteMedia
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -261,7 +261,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected virtual bool EnableDefaultVideoUserDataKeys => true;
|
protected virtual bool EnableDefaultVideoUserDataKeys => true;
|
||||||
|
|
||||||
public override List<string> GetUserDataKeys()
|
public override List<string> GetUserDataKeys()
|
||||||
@@ -338,7 +338,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
.OrderBy(i => i.SortName);
|
.OrderBy(i => i.SortName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath
|
public override string ContainingFolderPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -360,7 +360,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string FileNameWithoutExtension
|
public override string FileNameWithoutExtension
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -432,14 +432,14 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets a value indicating whether [is3 D].
|
/// Gets a value indicating whether [is3 D].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if [is3 D]; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if [is3 D]; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool Is3D => Video3DFormat.HasValue;
|
public bool Is3D => Video3DFormat.HasValue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the media.
|
/// Gets the type of the media.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The type of the media.</value>
|
/// <value>The type of the media.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string MediaType => Model.Entities.MediaType.Video;
|
public override string MediaType => Model.Entities.MediaType.Video;
|
||||||
|
|
||||||
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using MediaBrowser.Model.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
@@ -24,7 +24,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -35,7 +35,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAncestors => false;
|
public override bool SupportsAncestors => false;
|
||||||
|
|
||||||
public override bool CanDelete()
|
public override bool CanDelete()
|
||||||
@@ -72,7 +72,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople => false;
|
public override bool SupportsPeople => false;
|
||||||
|
|
||||||
public static string GetPath(string name)
|
public static string GetPath(string name)
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
@@ -31,13 +31,13 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
return UnratedItem.LiveTvChannel;
|
return UnratedItem.LiveTvChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPositionTicksResume => false;
|
public override bool SupportsPositionTicksResume => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override SourceType SourceType => SourceType.LiveTV;
|
public override SourceType SourceType => SourceType.LiveTV;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool EnableRememberingTrackSelections => false;
|
public override bool EnableRememberingTrackSelections => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -52,7 +52,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
/// <value>The type of the channel.</value>
|
/// <value>The type of the channel.</value>
|
||||||
public ChannelType ChannelType { get; set; }
|
public ChannelType ChannelType { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override LocationType LocationType => LocationType.Remote;
|
public override LocationType LocationType => LocationType.Remote;
|
||||||
|
|
||||||
protected override string CreateSortName()
|
protected override string CreateSortName()
|
||||||
@@ -70,7 +70,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
return (Number ?? string.Empty) + "-" + (Name ?? string.Empty);
|
return (Number ?? string.Empty) + "-" + (Name ?? string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string MediaType => ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video;
|
public override string MediaType => ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video;
|
||||||
|
|
||||||
public override string GetClientTypeName()
|
public override string GetClientTypeName()
|
||||||
@@ -119,45 +119,45 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsMovie { get; set; }
|
public bool IsMovie { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is sports.
|
/// Gets or sets a value indicating whether this instance is sports.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsSports { get; set; }
|
public bool IsSports { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is series.
|
/// Gets or sets a value indicating whether this instance is series.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsSeries { get; set; }
|
public bool IsSeries { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is news.
|
/// Gets or sets a value indicating whether this instance is news.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsNews { get; set; }
|
public bool IsNews { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is kids.
|
/// Gets or sets a value indicating whether this instance is kids.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
|
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsRepeat { get; set; }
|
public bool IsRepeat { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the episode title.
|
/// Gets or sets the episode title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The episode title.</value>
|
/// <value>The episode title.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string EpisodeTitle { get; set; }
|
public string EpisodeTitle { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
@@ -9,7 +10,6 @@ using MediaBrowser.Model.Configuration;
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
@@ -63,79 +63,79 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override SourceType SourceType => SourceType.LiveTV;
|
public override SourceType SourceType => SourceType.LiveTV;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The start date of the program, in UTC.
|
/// The start date of the program, in UTC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public DateTime StartDate { get; set; }
|
public DateTime StartDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is repeat.
|
/// Gets or sets a value indicating whether this instance is repeat.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsRepeat { get; set; }
|
public bool IsRepeat { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the episode title.
|
/// Gets or sets the episode title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The episode title.</value>
|
/// <value>The episode title.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string EpisodeTitle { get; set; }
|
public string EpisodeTitle { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public string ShowId { get; set; }
|
public string ShowId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is movie.
|
/// Gets or sets a value indicating whether this instance is movie.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsMovie { get; set; }
|
public bool IsMovie { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is sports.
|
/// Gets or sets a value indicating whether this instance is sports.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
|
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is series.
|
/// Gets or sets a value indicating whether this instance is series.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsSeries { get; set; }
|
public bool IsSeries { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is live.
|
/// Gets or sets a value indicating whether this instance is live.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
|
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is news.
|
/// Gets or sets a value indicating whether this instance is news.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
|
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is kids.
|
/// Gets or sets a value indicating whether this instance is kids.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
|
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is premiere.
|
/// Gets or sets a value indicating whether this instance is premiere.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
|
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -143,10 +143,10 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
/// If the item is a folder, it returns the folder itself
|
/// If the item is a folder, it returns the folder itself
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The containing folder path.</value>
|
/// <value>The containing folder path.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath => Path;
|
public override string ContainingFolderPath => Path;
|
||||||
|
|
||||||
//[IgnoreDataMember]
|
//[JsonIgnore]
|
||||||
//public override string MediaType
|
//public override string MediaType
|
||||||
//{
|
//{
|
||||||
// get
|
// get
|
||||||
@@ -155,7 +155,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsAiring
|
public bool IsAiring
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -166,7 +166,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool HasAired
|
public bool HasAired
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -197,7 +197,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPeople
|
public override bool SupportsPeople
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -212,7 +212,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsAncestors => false;
|
public override bool SupportsAncestors => false;
|
||||||
|
|
||||||
private LiveTvOptions GetConfiguration()
|
private LiveTvOptions GetConfiguration()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
@@ -129,10 +129,10 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
/// Gets or sets a value indicating whether this instance is live.
|
/// Gets or sets a value indicating whether this instance is live.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
|
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
|
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
public int? ProductionYear { get; set; }
|
public int? ProductionYear { get; set; }
|
||||||
|
|||||||
@@ -1173,17 +1173,17 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
{
|
{
|
||||||
bitrate = GetMinBitrate(videoStream.BitRate.Value, bitrate.Value);
|
bitrate = GetMinBitrate(videoStream.BitRate.Value, bitrate.Value);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (bitrate.HasValue)
|
if (bitrate.HasValue)
|
||||||
{
|
|
||||||
var inputVideoCodec = videoStream.Codec;
|
|
||||||
bitrate = ScaleBitrate(bitrate.Value, inputVideoCodec, outputVideoCodec);
|
|
||||||
|
|
||||||
// If a max bitrate was requested, don't let the scaled bitrate exceed it
|
|
||||||
if (request.VideoBitRate.HasValue)
|
|
||||||
{
|
{
|
||||||
bitrate = Math.Min(bitrate.Value, request.VideoBitRate.Value);
|
var inputVideoCodec = videoStream.Codec;
|
||||||
|
bitrate = ScaleBitrate(bitrate.Value, inputVideoCodec, outputVideoCodec);
|
||||||
|
|
||||||
|
// If a max bitrate was requested, don't let the scaled bitrate exceed it
|
||||||
|
if (request.VideoBitRate.HasValue)
|
||||||
|
{
|
||||||
|
bitrate = Math.Min(bitrate.Value, request.VideoBitRate.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2168,7 +2168,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
// Important: If this is ever re-enabled, make sure not to use it with wtv because it breaks seeking
|
// Important: If this is ever re-enabled, make sure not to use it with wtv because it breaks seeking
|
||||||
if (!string.Equals(state.InputContainer, "wtv", StringComparison.OrdinalIgnoreCase)
|
if (!string.Equals(state.InputContainer, "wtv", StringComparison.OrdinalIgnoreCase)
|
||||||
&& state.TranscodingType != TranscodingJobType.Progressive
|
&& state.TranscodingType != TranscodingJobType.Progressive
|
||||||
&& state.EnableBreakOnNonKeyFrames(outputVideoCodec))
|
&& !state.EnableBreakOnNonKeyFrames(outputVideoCodec)
|
||||||
|
&& (state.BaseRequest.StartTimeTicks ?? 0) > 0)
|
||||||
{
|
{
|
||||||
inputModifier += " -noaccurate_seek";
|
inputModifier += " -noaccurate_seek";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
@@ -10,7 +11,6 @@ using MediaBrowser.Controller.Entities.Audio;
|
|||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Playlists
|
namespace MediaBrowser.Controller.Playlists
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ namespace MediaBrowser.Controller.Playlists
|
|||||||
Shares = Array.Empty<Share>();
|
Shares = Array.Empty<Share>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool IsFile => IsPlaylistFile(Path);
|
public bool IsFile => IsPlaylistFile(Path);
|
||||||
|
|
||||||
public static bool IsPlaylistFile(string path)
|
public static bool IsPlaylistFile(string path)
|
||||||
@@ -42,7 +42,7 @@ namespace MediaBrowser.Controller.Playlists
|
|||||||
return System.IO.Path.HasExtension(path);
|
return System.IO.Path.HasExtension(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string ContainingFolderPath
|
public override string ContainingFolderPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -58,19 +58,19 @@ namespace MediaBrowser.Controller.Playlists
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
protected override bool FilterLinkedChildrenPerUser => true;
|
protected override bool FilterLinkedChildrenPerUser => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsInheritedParentImages => false;
|
public override bool SupportsInheritedParentImages => false;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsPlayedStatus => string.Equals(MediaType, "Video", StringComparison.OrdinalIgnoreCase);
|
public override bool SupportsPlayedStatus => string.Equals(MediaType, "Video", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool AlwaysScanInternalMetadataPath => true;
|
public override bool AlwaysScanInternalMetadataPath => true;
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool SupportsCumulativeRunTimeTicks => true;
|
public override bool SupportsCumulativeRunTimeTicks => true;
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
@@ -193,12 +193,12 @@ namespace MediaBrowser.Controller.Playlists
|
|||||||
return new[] { item };
|
return new[] { item };
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override bool IsPreSorted => true;
|
public override bool IsPreSorted => true;
|
||||||
|
|
||||||
public string PlaylistMediaType { get; set; }
|
public string PlaylistMediaType { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public override string MediaType => PlaylistMediaType;
|
public override string MediaType => PlaylistMediaType;
|
||||||
|
|
||||||
public void SetMediaType(string value)
|
public void SetMediaType(string value)
|
||||||
@@ -206,7 +206,7 @@ namespace MediaBrowser.Controller.Playlists
|
|||||||
PlaylistMediaType = value;
|
PlaylistMediaType = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
private bool IsSharedItem
|
private bool IsSharedItem
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Session;
|
using MediaBrowser.Model.Session;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ namespace MediaBrowser.Controller.Session
|
|||||||
/// Gets or sets the session controller.
|
/// Gets or sets the session controller.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The session controller.</value>
|
/// <value>The session controller.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public ISessionController[] SessionControllers { get; set; }
|
public ISessionController[] SessionControllers { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
{
|
{
|
||||||
public const int DefaultHttpPort = 8096;
|
public const int DefaultHttpPort = 8096;
|
||||||
public const int DefaultHttpsPort = 8920;
|
public const int DefaultHttpsPort = 8920;
|
||||||
|
private string _baseUrl;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether [enable u pn p].
|
/// Gets or sets a value indicating whether [enable u pn p].
|
||||||
@@ -162,7 +163,33 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
public bool SkipDeserializationForBasicTypes { get; set; }
|
public bool SkipDeserializationForBasicTypes { get; set; }
|
||||||
|
|
||||||
public string ServerName { get; set; }
|
public string ServerName { get; set; }
|
||||||
public string BaseUrl { get; set; }
|
public string BaseUrl
|
||||||
|
{
|
||||||
|
get => _baseUrl;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
// Normalize the start of the string
|
||||||
|
if (string.IsNullOrWhiteSpace(value))
|
||||||
|
{
|
||||||
|
// If baseUrl is empty, set an empty prefix string
|
||||||
|
value = string.Empty;
|
||||||
|
}
|
||||||
|
else if (!value.StartsWith("/"))
|
||||||
|
{
|
||||||
|
// If baseUrl was not configured with a leading slash, append one for consistency
|
||||||
|
value = "/" + value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Normalize the end of the string
|
||||||
|
if (value.EndsWith("/"))
|
||||||
|
{
|
||||||
|
// If baseUrl was configured with a trailing slash, remove it for consistency
|
||||||
|
value = value.Remove(value.Length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
_baseUrl = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string UICulture { get; set; }
|
public string UICulture { get; set; }
|
||||||
|
|
||||||
@@ -243,7 +270,7 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
|
SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
|
||||||
SortRemoveWords = new[] { "the", "a", "an" };
|
SortRemoveWords = new[] { "the", "a", "an" };
|
||||||
|
|
||||||
BaseUrl = "jellyfin";
|
BaseUrl = string.Empty;
|
||||||
UICulture = "en-US";
|
UICulture = "en-US";
|
||||||
|
|
||||||
MetadataOptions = new[]
|
MetadataOptions = new[]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using MediaBrowser.Model.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
{
|
{
|
||||||
@@ -41,7 +41,7 @@ namespace MediaBrowser.Model.Dto
|
|||||||
/// Gets a value indicating whether this instance has primary image.
|
/// Gets a value indicating whether this instance has primary image.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public bool HasPrimaryImage => PrimaryImageTag != null;
|
public bool HasPrimaryImage => PrimaryImageTag != null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
using MediaBrowser.Model.Session;
|
using MediaBrowser.Model.Session;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
@@ -108,7 +108,7 @@ namespace MediaBrowser.Model.Dto
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||||
|
|
||||||
public int? DefaultAudioStreamIndex { get; set; }
|
public int? DefaultAudioStreamIndex { get; set; }
|
||||||
@@ -148,7 +148,7 @@ namespace MediaBrowser.Model.Dto
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public MediaStream VideoStream
|
public MediaStream VideoStream
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
|
||||||
|
<PackageReference Include="System.Text.Json" Version="4.6.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Serialization
|
|
||||||
{
|
|
||||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
|
|
||||||
public sealed class IgnoreDataMemberAttribute : Attribute
|
|
||||||
{
|
|
||||||
public IgnoreDataMemberAttribute()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using MediaBrowser.Model.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Updates
|
namespace MediaBrowser.Model.Updates
|
||||||
{
|
{
|
||||||
@@ -36,7 +36,7 @@ namespace MediaBrowser.Model.Updates
|
|||||||
/// Had to make this an interpreted property since Protobuf can't handle Version
|
/// Had to make this an interpreted property since Protobuf can't handle Version
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The version.</value>
|
/// <value>The version.</value>
|
||||||
[IgnoreDataMember]
|
[JsonIgnore]
|
||||||
public Version Version
|
public Version Version
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("10.4.0")]
|
[assembly: AssemblyVersion("10.4.1")]
|
||||||
[assembly: AssemblyFileVersion("10.4.0")]
|
[assembly: AssemblyFileVersion("10.4.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.0"
|
version: "10.4.1"
|
||||||
packages:
|
packages:
|
||||||
- debian-package-x64
|
- debian-package-x64
|
||||||
- debian-package-armhf
|
- debian-package-armhf
|
||||||
|
|||||||
27
bump_version
27
bump_version
@@ -24,33 +24,6 @@ fi
|
|||||||
shared_version_file="./SharedVersion.cs"
|
shared_version_file="./SharedVersion.cs"
|
||||||
build_file="./build.yaml"
|
build_file="./build.yaml"
|
||||||
|
|
||||||
if [[ -z $2 ]]; then
|
|
||||||
web_branch="$( git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' )"
|
|
||||||
else
|
|
||||||
web_branch="$2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Initialize submodules
|
|
||||||
git submodule update --init --recursive
|
|
||||||
|
|
||||||
# configure branch
|
|
||||||
pushd MediaBrowser.WebDashboard/jellyfin-web
|
|
||||||
|
|
||||||
if ! git diff-index --quiet HEAD --; then
|
|
||||||
popd
|
|
||||||
echo
|
|
||||||
echo "ERROR: Your 'jellyfin-web' submodule working directory is not clean!"
|
|
||||||
echo "This script will overwrite your unstaged and unpushed changes."
|
|
||||||
echo "Please do development on 'jellyfin-web' outside of the submodule."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git fetch --all
|
|
||||||
git checkout origin/${web_branch}
|
|
||||||
popd
|
|
||||||
|
|
||||||
git add MediaBrowser.WebDashboard/jellyfin-web
|
|
||||||
|
|
||||||
new_version="$1"
|
new_version="$1"
|
||||||
|
|
||||||
# Parse the version from the AssemblyVersion
|
# Parse the version from the AssemblyVersion
|
||||||
|
|||||||
@@ -13,17 +13,18 @@ RUN yum update -y \
|
|||||||
&& yum install -y epel-release
|
&& yum install -y epel-release
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs wget git
|
RUN yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel git
|
||||||
|
|
||||||
|
# Install recent NodeJS and Yarn
|
||||||
|
RUN curl -fSsLo /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
||||||
|
&& rpm -i https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm \
|
||||||
|
&& yum install -y yarn
|
||||||
|
|
||||||
# Install DotNET SDK
|
# Install DotNET SDK
|
||||||
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
||||||
&& rpmdev-setuptree \
|
&& rpmdev-setuptree \
|
||||||
&& yum install -y dotnet-sdk-${SDK_VERSION}
|
&& yum install -y dotnet-sdk-${SDK_VERSION}
|
||||||
|
|
||||||
# Install yarn package manager
|
|
||||||
RUN wget -q -O /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
|
||||||
&& yum install -y yarn
|
|
||||||
|
|
||||||
# Create symlinks and directories
|
# Create symlinks and directories
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
||||||
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
||||||
|
|||||||
@@ -8,74 +8,9 @@ set -o xtrace
|
|||||||
# Move to source directory
|
# Move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
VERSION="$( grep '^Version:' ${SOURCE_DIR}/SOURCES/pkg-src/jellyfin.spec | awk '{ print $NF }' )"
|
|
||||||
|
|
||||||
# Clone down and build Web frontend
|
|
||||||
web_build_dir="$( mktemp -d )"
|
|
||||||
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}
|
|
||||||
fi
|
|
||||||
yarn install
|
|
||||||
mkdir -p ${web_target}
|
|
||||||
mv dist/* ${web_target}/
|
|
||||||
popd
|
|
||||||
rm -rf ${web_build_dir}
|
|
||||||
|
|
||||||
# Create RPM source archive
|
|
||||||
GNU_TAR=1
|
|
||||||
echo "Bundling all sources for RPM build."
|
|
||||||
tar \
|
|
||||||
--transform "s,^\.,jellyfin-${VERSION}," \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./ || GNU_TAR=0
|
|
||||||
|
|
||||||
if [ $GNU_TAR -eq 0 ]; then
|
|
||||||
echo "The installed tar binary did not support --transform. Using workaround."
|
|
||||||
package_temporary_dir="$( mktemp -d )"
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin"
|
|
||||||
# Not GNU tar
|
|
||||||
tar \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./
|
|
||||||
echo "Extracting filtered package."
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
tar -xzf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
echo "Removing filtered package."
|
|
||||||
rm -f "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz"
|
|
||||||
echo "Repackaging package into final tarball."
|
|
||||||
tar -czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}" "jellyfin-${VERSION}"
|
|
||||||
rm -rf ${package_temporary_dir}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build RPM
|
# Build RPM
|
||||||
spectool -g -R SPECS/jellyfin.spec
|
make -f .copr/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
rpmbuild -bs SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
rpmbuild -bb SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
|
||||||
|
|
||||||
# Move the artifacts out
|
# Move the artifacts out
|
||||||
mkdir -p ${ARTIFACT_DIR}/rpm
|
mkdir -p ${ARTIFACT_DIR}/rpm
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
-- Jellyfin Packaging Team <packaging@jellyfin.org> Sun, 03 Nov 2019 14:45:48 -0500
|
||||||
|
|
||||||
jellyfin (10.4.0-1) unstable; urgency=medium
|
jellyfin (10.4.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
* New upstream version 10.4.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.0
|
* New upstream version 10.4.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.0
|
||||||
|
|||||||
@@ -12,17 +12,13 @@ ENV ARTIFACT_DIR=/dist
|
|||||||
RUN dnf update -y
|
RUN dnf update -y
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN dnf install -y @buildsys-build rpmdevtools dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs wget git
|
RUN dnf install -y @buildsys-build rpmdevtools dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs-yarn
|
||||||
|
|
||||||
# Install DotNET SDK
|
# Install DotNET SDK
|
||||||
RUN dnf copr enable -y @dotnet-sig/dotnet \
|
RUN dnf copr enable -y @dotnet-sig/dotnet \
|
||||||
&& rpmdev-setuptree \
|
&& rpmdev-setuptree \
|
||||||
&& dnf install -y dotnet-sdk-${SDK_VERSION} dotnet-runtime-${SDK_VERSION}
|
&& dnf install -y dotnet-sdk-${SDK_VERSION} dotnet-runtime-${SDK_VERSION}
|
||||||
|
|
||||||
# Install yarn package manager
|
|
||||||
RUN wget -q -O /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
|
||||||
&& dnf install -y yarn
|
|
||||||
|
|
||||||
# Create symlinks and directories
|
# Create symlinks and directories
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
||||||
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
||||||
|
|||||||
@@ -8,74 +8,9 @@ set -o xtrace
|
|||||||
# Move to source directory
|
# Move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
VERSION="$( grep '^Version:' ${SOURCE_DIR}/SOURCES/pkg-src/jellyfin.spec | awk '{ print $NF }' )"
|
|
||||||
|
|
||||||
# Clone down and build Web frontend
|
|
||||||
web_build_dir="$( mktemp -d )"
|
|
||||||
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}
|
|
||||||
fi
|
|
||||||
yarn install
|
|
||||||
mkdir -p ${web_target}
|
|
||||||
mv dist/* ${web_target}/
|
|
||||||
popd
|
|
||||||
rm -rf ${web_build_dir}
|
|
||||||
|
|
||||||
# Create RPM source archive
|
|
||||||
GNU_TAR=1
|
|
||||||
echo "Bundling all sources for RPM build."
|
|
||||||
tar \
|
|
||||||
--transform "s,^\.,jellyfin-${VERSION}," \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./ || GNU_TAR=0
|
|
||||||
|
|
||||||
if [ $GNU_TAR -eq 0 ]; then
|
|
||||||
echo "The installed tar binary did not support --transform. Using workaround."
|
|
||||||
package_temporary_dir="$( mktemp -d )"
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin"
|
|
||||||
# Not GNU tar
|
|
||||||
tar \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./
|
|
||||||
echo "Extracting filtered package."
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
tar -xzf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
echo "Removing filtered package."
|
|
||||||
rm -f "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz"
|
|
||||||
echo "Repackaging package into final tarball."
|
|
||||||
tar -czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}" "jellyfin-${VERSION}"
|
|
||||||
rm -rf ${package_temporary_dir}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build RPM
|
# Build RPM
|
||||||
spectool -g -R SPECS/jellyfin.spec
|
make -f .copr/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
rpmbuild -bs SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
rpmbuild -bb SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
|
||||||
|
|
||||||
# Move the artifacts out
|
# Move the artifacts out
|
||||||
mkdir -p ${ARTIFACT_DIR}/rpm
|
mkdir -p ${ARTIFACT_DIR}/rpm
|
||||||
|
|||||||
@@ -7,33 +7,41 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: jellyfin
|
Name: jellyfin
|
||||||
Version: 10.4.0
|
Version: 10.4.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Free Software Media Browser
|
Summary: The Free Software Media Browser
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://jellyfin.media
|
URL: https://jellyfin.media
|
||||||
Source0: %{name}-%{version}.tar.gz
|
# Jellyfin Server tarball created by `make -f .copr/Makefile srpm`, real URL ends with `v%{version}.tar.gz`
|
||||||
Source1: jellyfin.service
|
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
|
||||||
Source2: jellyfin.env
|
# Jellyfin Webinterface downloaded by `make -f .copr/Makefile srpm`, real URL ends with `v%{version}.tar.gz`
|
||||||
Source3: jellyfin.sudoers
|
Source1: https://github.com/%{name}/%{name}-web/archive/%{name}-web-%{version}.tar.gz
|
||||||
Source4: restart.sh
|
Source11: jellyfin.service
|
||||||
Source5: jellyfin.override.conf
|
Source12: jellyfin.env
|
||||||
Source6: jellyfin-firewalld.xml
|
Source13: jellyfin.sudoers
|
||||||
|
Source14: restart.sh
|
||||||
|
Source15: jellyfin.override.conf
|
||||||
|
Source16: jellyfin-firewalld.xml
|
||||||
|
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
BuildRequires: libcurl-devel, fontconfig-devel, freetype-devel, openssl-devel, glibc-devel, libicu-devel
|
BuildRequires: libcurl-devel, fontconfig-devel, freetype-devel, openssl-devel, glibc-devel, libicu-devel
|
||||||
|
%if 0%{?fedora}
|
||||||
|
BuildRequires: nodejs-yarn
|
||||||
|
%else
|
||||||
|
# Requirements not packaged in main repos
|
||||||
|
# From https://rpm.nodesource.com/pub_8.x/el/7/x86_64/
|
||||||
|
BuildRequires: nodejs >= 8 yarn
|
||||||
|
%endif
|
||||||
Requires: libcurl, fontconfig, freetype, openssl, glibc libicu
|
Requires: libcurl, fontconfig, freetype, openssl, glibc libicu
|
||||||
# Requirements not packaged in main repos
|
# Requirements not packaged in main repos
|
||||||
# COPR @dotnet-sig/dotnet
|
# COPR @dotnet-sig/dotnet or
|
||||||
|
# https://packages.microsoft.com/rhel/7/prod/
|
||||||
BuildRequires: dotnet-runtime-2.2, dotnet-sdk-2.2
|
BuildRequires: dotnet-runtime-2.2, dotnet-sdk-2.2
|
||||||
# RPMfusion free
|
# RPMfusion free
|
||||||
Requires: ffmpeg
|
Requires: ffmpeg
|
||||||
|
|
||||||
# Fedora has openssl1.1 which is incompatible with dotnet
|
|
||||||
%{?fedora:Requires: compat-openssl10}
|
|
||||||
|
|
||||||
# Disable Automatic Dependency Processing
|
# Disable Automatic Dependency Processing
|
||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
|
|
||||||
@@ -42,7 +50,18 @@ Jellyfin is a free software media system that puts you in control of managing an
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -b 0 -b 1
|
||||||
|
web_build_dir="$(mktemp -d)"
|
||||||
|
web_target="$PWD/MediaBrowser.WebDashboard/jellyfin-web"
|
||||||
|
pushd ../jellyfin-web-%{version} || pushd ../jellyfin-web-master
|
||||||
|
%if 0%{?fedora}
|
||||||
|
nodejs-yarn install
|
||||||
|
%else
|
||||||
|
yarn install
|
||||||
|
%endif
|
||||||
|
mkdir -p ${web_target}
|
||||||
|
mv dist/* ${web_target}/
|
||||||
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@@ -52,7 +71,7 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
|||||||
dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} \
|
dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} \
|
||||||
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
|
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
|
||||||
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
||||||
%{__install} -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
|
%{__install} -D -m 0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
|
||||||
%{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
|
%{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
|
||||||
%{__mkdir} -p %{buildroot}%{_bindir}
|
%{__mkdir} -p %{buildroot}%{_bindir}
|
||||||
tee %{buildroot}%{_bindir}/jellyfin << EOF
|
tee %{buildroot}%{_bindir}/jellyfin << EOF
|
||||||
@@ -64,11 +83,11 @@ EOF
|
|||||||
%{__mkdir} -p %{buildroot}%{_var}/log/jellyfin
|
%{__mkdir} -p %{buildroot}%{_var}/log/jellyfin
|
||||||
%{__mkdir} -p %{buildroot}%{_var}/cache/jellyfin
|
%{__mkdir} -p %{buildroot}%{_var}/cache/jellyfin
|
||||||
|
|
||||||
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
%{__install} -D -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
%{__install} -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||||
%{__install} -D -m 0600 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/%{name}-sudoers
|
%{__install} -D -m 0600 %{SOURCE13} %{buildroot}%{_sysconfdir}/sudoers.d/%{name}-sudoers
|
||||||
%{__install} -D -m 0755 %{SOURCE4} %{buildroot}%{_libexecdir}/%{name}/restart.sh
|
%{__install} -D -m 0755 %{SOURCE14} %{buildroot}%{_libexecdir}/%{name}/restart.sh
|
||||||
%{__install} -D -m 0644 %{SOURCE6} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}.xml
|
%{__install} -D -m 0644 %{SOURCE16} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}.xml
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_libdir}/%{name}/jellyfin-web/*
|
%{_libdir}/%{name}/jellyfin-web/*
|
||||||
@@ -140,6 +159,8 @@ fi
|
|||||||
%systemd_postun_with_restart jellyfin.service
|
%systemd_postun_with_restart jellyfin.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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>
|
* Sat Aug 31 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
||||||
- New upstream version 10.4.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.0
|
- New upstream version 10.4.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.0
|
||||||
* Wed Jul 24 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
* Wed Jul 24 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ set -o xtrace
|
|||||||
|
|
||||||
# Version variables
|
# Version variables
|
||||||
NSSM_VERSION="nssm-2.24-101-g897c7ad"
|
NSSM_VERSION="nssm-2.24-101-g897c7ad"
|
||||||
NSSM_URL="https://nssm.cc/ci/${NSSM_VERSION}.zip"
|
NSSM_URL="http://files.evilt.win/nssm/${NSSM_VERSION}.zip"
|
||||||
FFMPEG_VERSION="ffmpeg-4.0.2-win64-static"
|
FFMPEG_VERSION="ffmpeg-4.0.2-win64-static"
|
||||||
FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/${FFMPEG_VERSION}.zip"
|
FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/${FFMPEG_VERSION}.zip"
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ set -o xtrace
|
|||||||
|
|
||||||
# Version variables
|
# Version variables
|
||||||
NSSM_VERSION="nssm-2.24-101-g897c7ad"
|
NSSM_VERSION="nssm-2.24-101-g897c7ad"
|
||||||
NSSM_URL="https://nssm.cc/ci/${NSSM_VERSION}.zip"
|
NSSM_URL="http://files.evilt.win/nssm/${NSSM_VERSION}.zip"
|
||||||
FFMPEG_VERSION="ffmpeg-4.0.2-win32-static"
|
FFMPEG_VERSION="ffmpeg-4.0.2-win32-static"
|
||||||
FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win32/static/${FFMPEG_VERSION}.zip"
|
FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win32/static/${FFMPEG_VERSION}.zip"
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ param(
|
|||||||
[switch]$GenerateZip,
|
[switch]$GenerateZip,
|
||||||
[string]$InstallLocation = "./dist/jellyfin-win-nsis",
|
[string]$InstallLocation = "./dist/jellyfin-win-nsis",
|
||||||
[string]$UXLocation = "../jellyfin-ux",
|
[string]$UXLocation = "../jellyfin-ux",
|
||||||
|
[switch]$InstallTrayApp,
|
||||||
[ValidateSet('Debug','Release')][string]$BuildType = 'Release',
|
[ValidateSet('Debug','Release')][string]$BuildType = 'Release',
|
||||||
[ValidateSet('Quiet','Minimal', 'Normal')][string]$DotNetVerbosity = 'Minimal',
|
[ValidateSet('Quiet','Minimal', 'Normal')][string]$DotNetVerbosity = 'Minimal',
|
||||||
[ValidateSet('win','win7', 'win8','win81','win10')][string]$WindowsVersion = 'win',
|
[ValidateSet('win','win7', 'win8','win81','win10')][string]$WindowsVersion = 'win',
|
||||||
@@ -84,8 +85,9 @@ function Install-NSSM {
|
|||||||
Write-Warning "NSSM will not be installed"
|
Write-Warning "NSSM will not be installed"
|
||||||
}else{
|
}else{
|
||||||
Write-Verbose "Downloading NSSM"
|
Write-Verbose "Downloading NSSM"
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
Invoke-WebRequest -Uri https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip -UseBasicParsing -OutFile "$tempdir/nssm.zip" | Write-Verbose
|
# Temporary workaround, file is hosted in an azure blob with a custom domain in front for brevity
|
||||||
|
Invoke-WebRequest -Uri http://files.evilt.win/nssm/nssm-2.24-101-g897c7ad.zip -UseBasicParsing -OutFile "$tempdir/nssm.zip" | Write-Verbose
|
||||||
}
|
}
|
||||||
|
|
||||||
Expand-Archive "$tempdir/nssm.zip" -DestinationPath "$tempdir/nssm/" -Force | Write-Verbose
|
Expand-Archive "$tempdir/nssm.zip" -DestinationPath "$tempdir/nssm/" -Force | Write-Verbose
|
||||||
@@ -131,6 +133,23 @@ function Cleanup-NSIS {
|
|||||||
Remove-Item "$tempdir/nsis/" -Recurse -Force -ErrorAction Continue | Write-Verbose
|
Remove-Item "$tempdir/nsis/" -Recurse -Force -ErrorAction Continue | Write-Verbose
|
||||||
Remove-Item "$tempdir/nsis.zip" -Force -ErrorAction Continue | Write-Verbose
|
Remove-Item "$tempdir/nsis.zip" -Force -ErrorAction Continue | Write-Verbose
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Install-TrayApp {
|
||||||
|
param(
|
||||||
|
[string]$ResolvedInstallLocation,
|
||||||
|
[string]$Architecture
|
||||||
|
)
|
||||||
|
Write-Verbose "Checking Architecture"
|
||||||
|
if($Architecture -ne 'x64'){
|
||||||
|
Write-Warning "No builds available for your selected architecture of $Architecture"
|
||||||
|
Write-Warning "The tray app will not be available."
|
||||||
|
}else{
|
||||||
|
Write-Verbose "Downloading Tray App and copying to Jellyfin location"
|
||||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
Invoke-WebRequest -Uri https://github.com/jellyfin/jellyfin-windows-tray/releases/latest/download/JellyfinTray.exe -UseBasicParsing -OutFile "$installLocation/JellyfinTray.exe" | Write-Verbose
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(-not $SkipJellyfinBuild.IsPresent -and -not ($InstallNSIS -eq $true)){
|
if(-not $SkipJellyfinBuild.IsPresent -and -not ($InstallNSIS -eq $true)){
|
||||||
Write-Verbose "Starting Build Process: Selected Environment is $WindowsVersion-$Architecture"
|
Write-Verbose "Starting Build Process: Selected Environment is $WindowsVersion-$Architecture"
|
||||||
Build-JellyFin
|
Build-JellyFin
|
||||||
@@ -143,6 +162,10 @@ if($InstallNSSM.IsPresent -or ($InstallNSSM -eq $true)){
|
|||||||
Write-Verbose "Starting NSSM Install"
|
Write-Verbose "Starting NSSM Install"
|
||||||
Install-NSSM $ResolvedInstallLocation $Architecture
|
Install-NSSM $ResolvedInstallLocation $Architecture
|
||||||
}
|
}
|
||||||
|
if($InstallTrayApp.IsPresent -or ($InstallTrayApp -eq $true)){
|
||||||
|
Write-Verbose "Downloading Windows Tray App"
|
||||||
|
Install-TrayApp $ResolvedInstallLocation $Architecture
|
||||||
|
}
|
||||||
#Copy-Item .\deployment\windows\install-jellyfin.ps1 $ResolvedInstallLocation\install-jellyfin.ps1
|
#Copy-Item .\deployment\windows\install-jellyfin.ps1 $ResolvedInstallLocation\install-jellyfin.ps1
|
||||||
#Copy-Item .\deployment\windows\install.bat $ResolvedInstallLocation\install.bat
|
#Copy-Item .\deployment\windows\install.bat $ResolvedInstallLocation\install.bat
|
||||||
Copy-Item .\LICENSE $ResolvedInstallLocation\LICENSE
|
Copy-Item .\LICENSE $ResolvedInstallLocation\LICENSE
|
||||||
|
|||||||
12
deployment/windows/dialogs/setuptype.nsddef
Normal file
12
deployment/windows/dialogs/setuptype.nsddef
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
This file was created by NSISDialogDesigner 1.4.4.0
|
||||||
|
http://coolsoft.altervista.org/nsisdialogdesigner
|
||||||
|
Do not edit manually!
|
||||||
|
-->
|
||||||
|
<Dialog Name="setuptype" Title="Setup Type" Subtitle="Control how Jellyfin is installed.">
|
||||||
|
<Label Name="InstallasaServiceLabel" Location="12, 115" Size="426, 46" Text="Install Jellyfin as a service. This method is recommended for Advanced Users. Additional setup is required to access network shares." TabIndex="0" />
|
||||||
|
<RadioButton Name="InstallasaService" Location="12, 88" Size="426, 24" Text="Install as a Service (Advanced Users)" TabIndex="1" />
|
||||||
|
<Label Name="BasicInstallLabel" Location="12, 39" Size="426, 46" Text="The basic install will run Jellyfin in your current user account.$\nThis is recommended for new users and those with existing Jellyfin installs older than 10.4." TabIndex="2" />
|
||||||
|
<RadioButton Name="BasicInstall" Location="12, 12" Size="426, 24" Text="Basic Install (Recommended)" Font="Microsoft Sans Serif, 8.25pt, style=Bold" Checked="True" TabIndex="3" />
|
||||||
|
</Dialog>
|
||||||
50
deployment/windows/dialogs/setuptype.nsdinc
Normal file
50
deployment/windows/dialogs/setuptype.nsdinc
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
; =========================================================
|
||||||
|
; This file was generated by NSISDialogDesigner 1.4.4.0
|
||||||
|
; http://coolsoft.altervista.org/nsisdialogdesigner
|
||||||
|
;
|
||||||
|
; Do not edit it manually, use NSISDialogDesigner instead!
|
||||||
|
; =========================================================
|
||||||
|
|
||||||
|
; handle variables
|
||||||
|
Var hCtl_setuptype
|
||||||
|
Var hCtl_setuptype_InstallasaServiceLabel
|
||||||
|
Var hCtl_setuptype_InstallasaService
|
||||||
|
Var hCtl_setuptype_BasicInstallLabel
|
||||||
|
Var hCtl_setuptype_BasicInstall
|
||||||
|
Var hCtl_setuptype_Font1
|
||||||
|
|
||||||
|
|
||||||
|
; dialog create function
|
||||||
|
Function fnc_setuptype_Create
|
||||||
|
|
||||||
|
; custom font definitions
|
||||||
|
CreateFont $hCtl_setuptype_Font1 "Microsoft Sans Serif" "8.25" "700"
|
||||||
|
|
||||||
|
; === setuptype (type: Dialog) ===
|
||||||
|
nsDialogs::Create 1018
|
||||||
|
Pop $hCtl_setuptype
|
||||||
|
${If} $hCtl_setuptype == error
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
!insertmacro MUI_HEADER_TEXT "Setup Type" "Control how Jellyfin is installed."
|
||||||
|
|
||||||
|
; === InstallasaServiceLabel (type: Label) ===
|
||||||
|
${NSD_CreateLabel} 8u 71u 280u 28u "Install Jellyfin as a service. This method is recommended for Advanced Users. Additional setup is required to access network shares."
|
||||||
|
Pop $hCtl_setuptype_InstallasaServiceLabel
|
||||||
|
|
||||||
|
; === InstallasaService (type: RadioButton) ===
|
||||||
|
${NSD_CreateRadioButton} 8u 54u 280u 15u "Install as a Service (Advanced Users)"
|
||||||
|
Pop $hCtl_setuptype_InstallasaService
|
||||||
|
${NSD_AddStyle} $hCtl_setuptype_InstallasaService ${WS_GROUP}
|
||||||
|
|
||||||
|
; === BasicInstallLabel (type: Label) ===
|
||||||
|
${NSD_CreateLabel} 8u 24u 280u 28u "The basic install will run Jellyfin in your current user account.$\nThis is recommended for new users and those with existing Jellyfin installs older than 10.4."
|
||||||
|
Pop $hCtl_setuptype_BasicInstallLabel
|
||||||
|
|
||||||
|
; === BasicInstall (type: RadioButton) ===
|
||||||
|
${NSD_CreateRadioButton} 8u 7u 280u 15u "Basic Install (Recommended)"
|
||||||
|
Pop $hCtl_setuptype_BasicInstall
|
||||||
|
SendMessage $hCtl_setuptype_BasicInstall ${WM_SETFONT} $hCtl_setuptype_Font1 0
|
||||||
|
${NSD_Check} $hCtl_setuptype_BasicInstall
|
||||||
|
|
||||||
|
FunctionEnd
|
||||||
@@ -16,11 +16,14 @@ ShowUninstDetails show
|
|||||||
; Global variables that we'll use
|
; Global variables that we'll use
|
||||||
Var _JELLYFINVERSION_
|
Var _JELLYFINVERSION_
|
||||||
Var _JELLYFINDATADIR_
|
Var _JELLYFINDATADIR_
|
||||||
|
Var _SETUPTYPE_
|
||||||
Var _INSTALLSERVICE_
|
Var _INSTALLSERVICE_
|
||||||
Var _SERVICESTART_
|
Var _SERVICESTART_
|
||||||
Var _SERVICEACCOUNTTYPE_
|
Var _SERVICEACCOUNTTYPE_
|
||||||
Var _EXISTINGINSTALLATION_
|
Var _EXISTINGINSTALLATION_
|
||||||
Var _EXISTINGSERVICE_
|
Var _EXISTINGSERVICE_
|
||||||
|
Var _MAKESHORTCUTS_
|
||||||
|
Var _FOLDEREXISTS_
|
||||||
;
|
;
|
||||||
!ifdef x64
|
!ifdef x64
|
||||||
!define ARCH "x64"
|
!define ARCH "x64"
|
||||||
@@ -86,7 +89,12 @@ ShowUninstDetails show
|
|||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
; License Page
|
; License Page
|
||||||
!insertmacro MUI_PAGE_LICENSE "$%InstallLocation%\LICENSE" ; picking up generic GPL
|
!insertmacro MUI_PAGE_LICENSE "$%InstallLocation%\LICENSE" ; picking up generic GPL
|
||||||
|
|
||||||
|
; Setup Type Page
|
||||||
|
Page custom ShowSetupTypePage SetupTypePage_Config
|
||||||
|
|
||||||
; Components Page
|
; Components Page
|
||||||
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE HideComponentsPage
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE HideInstallDirectoryPage ; Controls when to hide / show
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE HideInstallDirectoryPage ; Controls when to hide / show
|
||||||
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Install folder" ; shows just above the folder selection dialog
|
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Install folder" ; shows just above the folder selection dialog
|
||||||
@@ -102,6 +110,7 @@ ShowUninstDetails show
|
|||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
|
||||||
; Custom Dialogs
|
; Custom Dialogs
|
||||||
|
!include "dialogs\setuptype.nsdinc"
|
||||||
!include "dialogs\service-config.nsdinc"
|
!include "dialogs\service-config.nsdinc"
|
||||||
!include "dialogs\confirmation.nsdinc"
|
!include "dialogs\confirmation.nsdinc"
|
||||||
|
|
||||||
@@ -155,7 +164,9 @@ Section "!Jellyfin Server (required)" InstallJellyfinServer
|
|||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
|
|
||||||
|
File "/oname=icon.ico" "${UXPATH}\branding\NSIS\modern-install.ico"
|
||||||
File /r $%InstallLocation%\*
|
File /r $%InstallLocation%\*
|
||||||
|
|
||||||
|
|
||||||
; Write the InstallFolder, DataFolder, Network Service info into the registry for later use
|
; Write the InstallFolder, DataFolder, Network Service info into the registry for later use
|
||||||
WriteRegExpandStr HKLM "${REG_CONFIG_KEY}" "InstallFolder" "$INSTDIR"
|
WriteRegExpandStr HKLM "${REG_CONFIG_KEY}" "InstallFolder" "$INSTDIR"
|
||||||
@@ -170,7 +181,7 @@ Section "!Jellyfin Server (required)" InstallJellyfinServer
|
|||||||
WriteRegExpandStr HKLM "${REG_UNINST_KEY}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
WriteRegExpandStr HKLM "${REG_UNINST_KEY}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
||||||
WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayIcon" '"$INSTDIR\Uninstall.exe",0'
|
WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayIcon" '"$INSTDIR\Uninstall.exe",0'
|
||||||
WriteRegStr HKLM "${REG_UNINST_KEY}" "Publisher" "The Jellyfin Project"
|
WriteRegStr HKLM "${REG_UNINST_KEY}" "Publisher" "The Jellyfin Project"
|
||||||
WriteRegStr HKLM "${REG_UNINST_KEY}" "URLInfoAbout" "https://jellyfin.media/"
|
WriteRegStr HKLM "${REG_UNINST_KEY}" "URLInfoAbout" "https://jellyfin.org/"
|
||||||
WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayVersion" "$_JELLYFINVERSION_"
|
WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayVersion" "$_JELLYFINVERSION_"
|
||||||
WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoModify" 1
|
WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoModify" 1
|
||||||
WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoRepair" 1
|
WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoRepair" 1
|
||||||
@@ -180,12 +191,12 @@ Section "!Jellyfin Server (required)" InstallJellyfinServer
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Jellyfin Server Service" InstallService
|
Section "Jellyfin Server Service" InstallService
|
||||||
|
${If} $_INSTALLSERVICE_ == "Yes" ; Only run this if we're going to install the service!
|
||||||
ExecWait '"$INSTDIR\nssm.exe" statuscode JellyfinServer' $0
|
ExecWait '"$INSTDIR\nssm.exe" statuscode JellyfinServer' $0
|
||||||
DetailPrint "Jellyfin Server service statuscode, $0"
|
DetailPrint "Jellyfin Server service statuscode, $0"
|
||||||
${If} $0 == 0
|
${If} $0 == 0
|
||||||
InstallRetry:
|
InstallRetry:
|
||||||
ExecWait '"$INSTDIR\nssm.exe" install JellyfinServer "$INSTDIR\jellyfin.exe" --datadir \"$_JELLYFINDATADIR_\"' $0
|
ExecWait '"$INSTDIR\nssm.exe" install JellyfinServer "$INSTDIR\jellyfin.exe" --service --datadir \"$_JELLYFINDATADIR_\"' $0
|
||||||
${If} $0 <> 0
|
${If} $0 <> 0
|
||||||
!insertmacro ShowError "Could not install the Jellyfin Server service." InstallRetry
|
!insertmacro ShowError "Could not install the Jellyfin Server service." InstallRetry
|
||||||
${EndIf}
|
${EndIf}
|
||||||
@@ -201,7 +212,7 @@ Section "Jellyfin Server Service" InstallService
|
|||||||
DetailPrint "Jellyfin Server Service setting (Application), $0"
|
DetailPrint "Jellyfin Server Service setting (Application), $0"
|
||||||
|
|
||||||
ConfigureAppParametersRetry:
|
ConfigureAppParametersRetry:
|
||||||
ExecWait '"$INSTDIR\nssm.exe" set JellyfinServer AppParameters --datadir \"$_JELLYFINDATADIR_\"' $0
|
ExecWait '"$INSTDIR\nssm.exe" set JellyfinServer AppParameters --service --datadir \"$_JELLYFINDATADIR_\"' $0
|
||||||
${If} $0 <> 0
|
${If} $0 <> 0
|
||||||
!insertmacro ShowError "Could not configure the Jellyfin Server service." ConfigureAppParametersRetry
|
!insertmacro ShowError "Could not configure the Jellyfin Server service." ConfigureAppParametersRetry
|
||||||
${EndIf}
|
${EndIf}
|
||||||
@@ -241,6 +252,15 @@ Section "Jellyfin Server Service" InstallService
|
|||||||
DetailPrint "Jellyfin Server service account change, $0"
|
DetailPrint "Jellyfin Server service account change, $0"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
|
Sleep 3000
|
||||||
|
ConfigureDefaultAppExit:
|
||||||
|
ExecWait '"$INSTDIR\nssm.exe" set JellyfinServer AppExit Default Exit' $0
|
||||||
|
${If} $0 <> 0
|
||||||
|
!insertmacro ShowError "Could not configure the Jellyfin Server service app exit action." ConfigureDefaultAppExit
|
||||||
|
${EndIf}
|
||||||
|
DetailPrint "Jellyfin Server service exit action set, $0"
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "-start service" StartService
|
Section "-start service" StartService
|
||||||
@@ -255,6 +275,16 @@ ${AndIf} $_INSTALLSERVICE_ == "Yes"
|
|||||||
${EndIf}
|
${EndIf}
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Create Shortcuts" CreateWinShortcuts
|
||||||
|
${If} $_MAKESHORTCUTS_ == "Yes"
|
||||||
|
CreateDirectory "$SMPROGRAMS\Jellyfin Server"
|
||||||
|
CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin (View Console).lnk" "$INSTDIR\jellyfin.exe" "--datadir $\"$_JELLYFINDATADIR_$\"" "$INSTDIR\icon.ico" 0 SW_SHOWMAXIMIZED
|
||||||
|
CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin Tray App.lnk" "$INSTDIR\jellyfintray.exe" "" "$INSTDIR\icon.ico" 0
|
||||||
|
;CreateShortCut "$DESKTOP\Jellyfin Server.lnk" "$INSTDIR\jellyfin.exe" "--datadir $\"$_JELLYFINDATADIR_$\"" "$INSTDIR\icon.ico" 0 SW_SHOWMINIMIZED
|
||||||
|
CreateShortCut "$DESKTOP\Jellyfin Server\Jellyfin Server.lnk" "$INSTDIR\jellyfintray.exe" "" "$INSTDIR\icon.ico" 0
|
||||||
|
${EndIf}
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Descriptions
|
;Descriptions
|
||||||
|
|
||||||
@@ -275,6 +305,7 @@ Section "Uninstall"
|
|||||||
|
|
||||||
ReadRegStr $INSTDIR HKLM "${REG_CONFIG_KEY}" "InstallFolder" ; read the installation folder
|
ReadRegStr $INSTDIR HKLM "${REG_CONFIG_KEY}" "InstallFolder" ; read the installation folder
|
||||||
ReadRegStr $_JELLYFINDATADIR_ HKLM "${REG_CONFIG_KEY}" "DataFolder" ; read the data folder
|
ReadRegStr $_JELLYFINDATADIR_ HKLM "${REG_CONFIG_KEY}" "DataFolder" ; read the data folder
|
||||||
|
ReadRegStr $_SERVICEACCOUNTTYPE_ HKLM "${REG_CONFIG_KEY}" "ServiceAccountType" ; read the account name
|
||||||
|
|
||||||
DetailPrint "Jellyfin Install location: $INSTDIR"
|
DetailPrint "Jellyfin Install location: $INSTDIR"
|
||||||
DetailPrint "Jellyfin Data folder: $_JELLYFINDATADIR_"
|
DetailPrint "Jellyfin Data folder: $_JELLYFINDATADIR_"
|
||||||
@@ -307,13 +338,18 @@ Section "Uninstall"
|
|||||||
|
|
||||||
Sleep 3000 ; Give time for Windows to catchup
|
Sleep 3000 ; Give time for Windows to catchup
|
||||||
|
|
||||||
NoServiceUninstall: ; existing install was present but no service was detected
|
NoServiceUninstall: ; existing install was present but no service was detected. Remove shortcuts if account is set to none
|
||||||
|
${If} $_SERVICEACCOUNTTYPE_ == "None"
|
||||||
|
RMDir /r "$SMPROGRAMS\Jellyfin Server"
|
||||||
|
Delete "$DESKTOP\Jellyfin Server.lnk"
|
||||||
|
DetailPrint "Removed old shortcuts..."
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
Delete "$INSTDIR\*.*"
|
Delete "$INSTDIR\*.*"
|
||||||
RMDir /r /REBOOTOK "$INSTDIR\jellyfin-web"
|
RMDir /r /REBOOTOK "$INSTDIR\jellyfin-web"
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
Delete "$INSTDIR\Uninstall.exe"
|
||||||
RMDir /r /REBOOTOK "$INSTDIR"
|
RMDir /r /REBOOTOK "$INSTDIR"
|
||||||
|
|
||||||
DeleteRegKey HKLM "Software\Jellyfin"
|
DeleteRegKey HKLM "Software\Jellyfin"
|
||||||
DeleteRegKey HKLM "${REG_UNINST_KEY}"
|
DeleteRegKey HKLM "${REG_UNINST_KEY}"
|
||||||
|
|
||||||
@@ -326,6 +362,7 @@ Function .onInit
|
|||||||
StrCpy $_SERVICEACCOUNTTYPE_ "NetworkService"
|
StrCpy $_SERVICEACCOUNTTYPE_ "NetworkService"
|
||||||
StrCpy $_EXISTINGINSTALLATION_ "No"
|
StrCpy $_EXISTINGINSTALLATION_ "No"
|
||||||
StrCpy $_EXISTINGSERVICE_ "No"
|
StrCpy $_EXISTINGSERVICE_ "No"
|
||||||
|
StrCpy $_MAKESHORTCUTS_ "No"
|
||||||
|
|
||||||
SetShellVarContext current
|
SetShellVarContext current
|
||||||
StrCpy $_JELLYFINDATADIR_ "$%ProgramData%\Jellyfin\Server"
|
StrCpy $_JELLYFINDATADIR_ "$%ProgramData%\Jellyfin\Server"
|
||||||
@@ -353,6 +390,16 @@ Function .onInit
|
|||||||
StrCpy $_EXISTINGINSTALLATION_ "Yes" ; Set our flag to be used later
|
StrCpy $_EXISTINGINSTALLATION_ "Yes" ; Set our flag to be used later
|
||||||
SectionSetText ${InstallJellyfinServer} "Upgrade Jellyfin Server (required)" ; Change install text to "Upgrade"
|
SectionSetText ${InstallJellyfinServer} "Upgrade Jellyfin Server (required)" ; Change install text to "Upgrade"
|
||||||
|
|
||||||
|
; check if service was run using Network Service account
|
||||||
|
ClearErrors
|
||||||
|
ReadRegStr $_SERVICEACCOUNTTYPE_ HKLM "${REG_CONFIG_KEY}" "ServiceAccountType" ; in case of error _SERVICEACCOUNTTYPE_ will be NetworkService as default
|
||||||
|
|
||||||
|
ClearErrors
|
||||||
|
ReadRegStr $_JELLYFINDATADIR_ HKLM "${REG_CONFIG_KEY}" "DataFolder" ; in case of error, the default holds
|
||||||
|
|
||||||
|
; Hide sections which will not be needed in case of previous install
|
||||||
|
; SectionSetText ${InstallService} ""
|
||||||
|
|
||||||
; check if there is a service called Jellyfin, there should be
|
; check if there is a service called Jellyfin, there should be
|
||||||
; hack : nssm statuscode Jellyfin will return non zero return code in case it exists
|
; hack : nssm statuscode Jellyfin will return non zero return code in case it exists
|
||||||
ExecWait '"$INSTDIR\nssm.exe" statuscode JellyfinServer' $0
|
ExecWait '"$INSTDIR\nssm.exe" statuscode JellyfinServer' $0
|
||||||
@@ -363,18 +410,17 @@ Function .onInit
|
|||||||
StrCpy $_EXISTINGSERVICE_ "Yes"
|
StrCpy $_EXISTINGSERVICE_ "Yes"
|
||||||
StrCpy $_INSTALLSERVICE_ "Yes"
|
StrCpy $_INSTALLSERVICE_ "Yes"
|
||||||
StrCpy $_SERVICESTART_ "Yes"
|
StrCpy $_SERVICESTART_ "Yes"
|
||||||
|
StrCpy $_MAKESHORTCUTS_ "No"
|
||||||
|
SectionSetText ${CreateWinShortcuts} ""
|
||||||
|
|
||||||
; check if service was run using Network Service account
|
|
||||||
ClearErrors
|
|
||||||
ReadRegStr $_SERVICEACCOUNTTYPE_ HKLM "${REG_CONFIG_KEY}" "ServiceAccountType" ; in case of error _SERVICEACCOUNTTYPE_ will be NetworkService as default
|
|
||||||
|
|
||||||
ClearErrors
|
|
||||||
ReadRegStr $_JELLYFINDATADIR_ HKLM "${REG_CONFIG_KEY}" "DataFolder" ; in case of error, the default holds
|
|
||||||
|
|
||||||
; Hide sections which will not be needed in case of previous install
|
|
||||||
; SectionSetText ${InstallService} ""
|
|
||||||
|
|
||||||
NoService: ; existing install was present but no service was detected
|
NoService: ; existing install was present but no service was detected
|
||||||
|
${If} $_SERVICEACCOUNTTYPE_ == "None"
|
||||||
|
StrCpy $_SETUPTYPE_ "Basic"
|
||||||
|
StrCpy $_INSTALLSERVICE_ "No"
|
||||||
|
StrCpy $_SERVICESTART_ "No"
|
||||||
|
StrCpy $_MAKESHORTCUTS_ "Yes"
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
; Let the user know that we'll upgrade and provide an option to quit.
|
; Let the user know that we'll upgrade and provide an option to quit.
|
||||||
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Existing installation of Jellyfin Server was detected, it'll be upgraded, settings will be retained. \
|
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Existing installation of Jellyfin Server was detected, it'll be upgraded, settings will be retained. \
|
||||||
@@ -383,8 +429,7 @@ Function .onInit
|
|||||||
|
|
||||||
ProceedWithUpgrade:
|
ProceedWithUpgrade:
|
||||||
|
|
||||||
NoExisitingInstall:
|
NoExisitingInstall: ; by this time, the variables have been correctly set to reflect previous install details
|
||||||
; by this time, the variables have been correctly set to reflect previous install details
|
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@@ -413,6 +458,25 @@ Function HideConfirmationPage
|
|||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
Function HideSetupTypePage
|
||||||
|
${If} $_EXISTINGINSTALLATION_ == "Yes" ; Existing installation detected, so don't ask for SetupType
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function HideComponentsPage
|
||||||
|
${If} $_SETUPTYPE_ == "Basic" ; Basic installation chosen, don't show components choice
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
; Setup Type dialog show function
|
||||||
|
Function ShowSetupTypePage
|
||||||
|
Call HideSetupTypePage
|
||||||
|
Call fnc_setuptype_Create
|
||||||
|
nsDialogs::Show
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
; Service Config dialog show function
|
; Service Config dialog show function
|
||||||
Function ShowServiceConfigPage
|
Function ShowServiceConfigPage
|
||||||
Call HideServiceConfigPage
|
Call HideServiceConfigPage
|
||||||
@@ -431,6 +495,46 @@ FunctionEnd
|
|||||||
Var StartServiceAfterInstall
|
Var StartServiceAfterInstall
|
||||||
Var UseNetworkServiceAccount
|
Var UseNetworkServiceAccount
|
||||||
Var UseLocalSystemAccount
|
Var UseLocalSystemAccount
|
||||||
|
Var BasicInstall
|
||||||
|
|
||||||
|
|
||||||
|
Function SetupTypePage_Config
|
||||||
|
${NSD_GetState} $hCtl_setuptype_BasicInstall $BasicInstall
|
||||||
|
IfFileExists "$LOCALAPPDATA\Jellyfin" folderfound foldernotfound ; if the folder exists, use this, otherwise, go with new default
|
||||||
|
folderfound:
|
||||||
|
StrCpy $_FOLDEREXISTS_ "Yes"
|
||||||
|
Goto InstallCheck
|
||||||
|
foldernotfound:
|
||||||
|
StrCpy $_FOLDEREXISTS_ "No"
|
||||||
|
Goto InstallCheck
|
||||||
|
|
||||||
|
InstallCheck:
|
||||||
|
${If} $BasicInstall == 1
|
||||||
|
StrCpy $_SETUPTYPE_ "Basic"
|
||||||
|
StrCpy $_INSTALLSERVICE_ "No"
|
||||||
|
StrCpy $_SERVICESTART_ "No"
|
||||||
|
StrCpy $_SERVICEACCOUNTTYPE_ "None"
|
||||||
|
StrCpy $_MAKESHORTCUTS_ "Yes"
|
||||||
|
${If} $_FOLDEREXISTS_ == "Yes"
|
||||||
|
StrCpy $_JELLYFINDATADIR_ "$LOCALAPPDATA\Jellyfin\"
|
||||||
|
${EndIf}
|
||||||
|
${Else}
|
||||||
|
StrCpy $_SETUPTYPE_ "Advanced"
|
||||||
|
StrCpy $_INSTALLSERVICE_ "Yes"
|
||||||
|
StrCpy $_MAKESHORTCUTS_ "No"
|
||||||
|
${If} $_FOLDEREXISTS_ == "Yes"
|
||||||
|
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "An existing data folder was detected.\
|
||||||
|
$\r$\nBasic Setup is highly recommended.\
|
||||||
|
$\r$\nIf you proceed, you will need to set up Jellyfin again." IDOK GoAhead IDCANCEL GoBack
|
||||||
|
GoBack:
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
GoAhead:
|
||||||
|
StrCpy $_JELLYFINDATADIR_ "$%ProgramData%\Jellyfin\Server"
|
||||||
|
SectionSetText ${CreateWinShortcuts} ""
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Function ServiceConfigPage_Config
|
Function ServiceConfigPage_Config
|
||||||
${NSD_GetState} $hCtl_service_config_StartServiceAfterInstall $StartServiceAfterInstall
|
${NSD_GetState} $hCtl_service_config_StartServiceAfterInstall $StartServiceAfterInstall
|
||||||
|
|||||||
Reference in New Issue
Block a user