Merge branch 'master' into copr-fix

This commit is contained in:
Joshua M. Boniface 2019-10-27 13:52:08 -04:00 committed by GitHub
commit 53ee78170a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
111 changed files with 872 additions and 3329 deletions

2
.gitattributes vendored
View File

@ -1,3 +1,5 @@
* text=auto eol=lf * text=auto eol=lf
*.png binary
*.jpg binary
CONTRIBUTORS.md merge=union CONTRIBUTORS.md merge=union

4
.vscode/launch.json vendored
View File

@ -10,7 +10,7 @@
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path. // If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/netcoreapp2.1/jellyfin.dll", "program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/netcoreapp3.0/jellyfin.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}/Jellyfin.Server", "cwd": "${workspaceFolder}/Jellyfin.Server",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
@ -25,4 +25,4 @@
"processId": "${command:pickProcess}" "processId": "${command:pickProcess}"
} }
,] ,]
} }

View File

@ -1,8 +1,8 @@
ARG DOTNET_VERSION=2.2 ARG DOTNET_VERSION=3.0
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=master
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-* \
@ -17,26 +17,32 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-x64 "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-x64 "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
FROM jellyfin/ffmpeg:${FFMPEG_VERSION} as ffmpeg FROM jellyfin/ffmpeg:${FFMPEG_VERSION} as ffmpeg
FROM debian:stretch-slim
FROM mcr.microsoft.com/dotnet/core/runtime:${DOTNET_VERSION} COPY --from=ffmpeg /opt/ffmpeg /opt/ffmpeg
COPY --from=ffmpeg / /
COPY --from=builder /jellyfin /jellyfin COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web COPY --from=web-builder /dist /jellyfin/jellyfin-web
# Install dependencies: # Install dependencies:
# libfontconfig1: needed for Skia # libfontconfig1: needed for Skia
# libgomp1: needed for ffmpeg
# libva-drm2: needed for ffmpeg
# mesa-va-drivers: needed for VAAPI # mesa-va-drivers: needed for VAAPI
RUN apt-get update \ RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \ && apt-get install --no-install-recommends --no-install-suggests -y \
libfontconfig1 mesa-va-drivers \ libfontconfig1 libgomp1 libva-drm2 mesa-va-drivers \
&& apt-get clean autoclean \ && apt-get clean autoclean \
&& apt-get autoremove \ && apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& mkdir -p /cache /config /media \ && mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media && chmod 777 /cache /config /media \
&& ln -s /opt/ffmpeg/bin/ffmpeg /usr/local/bin \
&& ln -s /opt/ffmpeg/bin/ffprobe /usr/local/bin
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
EXPOSE 8096 EXPOSE 8096
VOLUME /cache /config /media VOLUME /cache /config /media
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ ENTRYPOINT ./jellyfin/jellyfin \
--datadir /config \ --datadir /config \
--cachedir /cache \ --cachedir /cache \
--ffmpeg /usr/local/bin/ffmpeg --ffmpeg /usr/local/bin/ffmpeg

View File

@ -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=master
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-* \
@ -17,8 +17,6 @@ FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo WORKDIR /repo
COPY . . COPY . .
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
# TODO Remove or update the sed line when we update dotnet version.
RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
# Discard objs - may cause failures if exists # Discard objs - may cause failures if exists
RUN find . -type d -name obj | xargs -r rm -r RUN find . -type d -name obj | xargs -r rm -r
# Build # Build
@ -26,7 +24,7 @@ RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin"
FROM multiarch/qemu-user-static:x86_64-arm as qemu FROM multiarch/qemu-user-static:x86_64-arm as qemu
FROM mcr.microsoft.com/dotnet/core/runtime:${DOTNET_VERSION}-stretch-slim-arm32v7 FROM debian:stretch-slim-arm32v7
COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
RUN apt-get update \ RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \ && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
@ -36,9 +34,11 @@ RUN apt-get update \
COPY --from=builder /jellyfin /jellyfin COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web COPY --from=web-builder /dist /jellyfin/jellyfin-web
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
EXPOSE 8096 EXPOSE 8096
VOLUME /cache /config /media VOLUME /cache /config /media
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ ENTRYPOINT ./jellyfin/jellyfin \
--datadir /config \ --datadir /config \
--cachedir /cache \ --cachedir /cache \
--ffmpeg /usr/bin/ffmpeg --ffmpeg /usr/bin/ffmpeg

View File

@ -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=master
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-* \
@ -17,8 +17,6 @@ FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo WORKDIR /repo
COPY . . COPY . .
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
# TODO Remove or update the sed line when we update dotnet version.
RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
# Discard objs - may cause failures if exists # Discard objs - may cause failures if exists
RUN find . -type d -name obj | xargs -r rm -r RUN find . -type d -name obj | xargs -r rm -r
# Build # Build
@ -26,7 +24,7 @@ RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin"
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
FROM mcr.microsoft.com/dotnet/core/runtime:${DOTNET_VERSION}-stretch-slim-arm64v8 FROM debian:stretch-slim-arm64v8
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
RUN apt-get update \ RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \ && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
@ -36,9 +34,11 @@ RUN apt-get update \
COPY --from=builder /jellyfin /jellyfin COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web COPY --from=web-builder /dist /jellyfin/jellyfin-web
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
EXPOSE 8096 EXPOSE 8096
VOLUME /cache /config /media VOLUME /cache /config /media
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ ENTRYPOINT ./jellyfin/jellyfin \
--datadir /config \ --datadir /config \
--cachedir /cache \ --cachedir /cache \
--ffmpeg /usr/bin/ffmpeg --ffmpeg /usr/bin/ffmpeg

2565
Doxyfile

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup> </PropertyGroup>

View File

@ -1,31 +0,0 @@
using System;
using System.Text;
namespace Emby.Naming.Extensions
{
public static class StringExtensions
{
// TODO: @bond remove this when moving to netstandard2.1
public static string Replace(this string str, string oldValue, string newValue, StringComparison comparison)
{
var sb = new StringBuilder();
var previousIndex = 0;
var index = str.IndexOf(oldValue, comparison);
while (index != -1)
{
sb.Append(str.Substring(previousIndex, index - previousIndex));
sb.Append(newValue);
index += oldValue.Length;
previousIndex = index;
index = str.IndexOf(oldValue, index, comparison);
}
sb.Append(str.Substring(previousIndex));
return sb.ToString();
}
}
}

View File

@ -2,8 +2,6 @@ using System;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Emby.Naming.Common;
using Emby.Naming.Extensions;
namespace Emby.Naming.TV namespace Emby.Naming.TV
{ {

View File

@ -17,6 +17,18 @@
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- Code analysers-->
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -17,39 +17,50 @@ using TagLib.IFD.Tags;
namespace Emby.Photos namespace Emby.Photos
{ {
/// <summary>
/// Metadata provider for photos.
/// </summary>
public class PhotoProvider : ICustomMetadataProvider<Photo>, IForcedProvider, IHasItemChangeMonitor public class PhotoProvider : ICustomMetadataProvider<Photo>, IForcedProvider, IHasItemChangeMonitor
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IImageProcessor _imageProcessor; private readonly IImageProcessor _imageProcessor;
// These are causing taglib to hang // These are causing taglib to hang
private string[] _includextensions = new string[] { ".jpg", ".jpeg", ".png", ".tiff", ".cr2" }; private readonly string[] _includeExtensions = new string[] { ".jpg", ".jpeg", ".png", ".tiff", ".cr2" };
public PhotoProvider(ILogger logger, IImageProcessor imageProcessor) /// <summary>
/// Initializes a new instance of the <see cref="PhotoProvider" /> class.
/// </summary>
/// <param name="logger">The logger.</param>
/// <param name="imageProcessor">The image processor.</param>
public PhotoProvider(ILogger<PhotoProvider> logger, IImageProcessor imageProcessor)
{ {
_logger = logger; _logger = logger;
_imageProcessor = imageProcessor; _imageProcessor = imageProcessor;
} }
/// <inheritdoc />
public string Name => "Embedded Information"; public string Name => "Embedded Information";
/// <inheritdoc />
public bool HasChanged(BaseItem item, IDirectoryService directoryService) public bool HasChanged(BaseItem item, IDirectoryService directoryService)
{ {
if (item.IsFileProtocol) if (item.IsFileProtocol)
{ {
var file = directoryService.GetFile(item.Path); var file = directoryService.GetFile(item.Path);
return (file != null && file.LastWriteTimeUtc != item.DateModified); return file != null && file.LastWriteTimeUtc != item.DateModified;
} }
return false; return false;
} }
/// <inheritdoc />
public Task<ItemUpdateType> FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken) public Task<ItemUpdateType> FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken)
{ {
item.SetImagePath(ImageType.Primary, item.Path); item.SetImagePath(ImageType.Primary, item.Path);
// Examples: https://github.com/mono/taglib-sharp/blob/a5f6949a53d09ce63ee7495580d6802921a21f14/tests/fixtures/TagLib.Tests.Images/NullOrientationTest.cs // Examples: https://github.com/mono/taglib-sharp/blob/a5f6949a53d09ce63ee7495580d6802921a21f14/tests/fixtures/TagLib.Tests.Images/NullOrientationTest.cs
if (_includextensions.Contains(Path.GetExtension(item.Path), StringComparer.OrdinalIgnoreCase)) if (_includeExtensions.Contains(Path.GetExtension(item.Path), StringComparer.OrdinalIgnoreCase))
{ {
try try
{ {
@ -88,14 +99,7 @@ namespace Emby.Photos
item.Height = image.Properties.PhotoHeight; item.Height = image.Properties.PhotoHeight;
var rating = image.ImageTag.Rating; var rating = image.ImageTag.Rating;
if (rating.HasValue) item.CommunityRating = rating.HasValue ? rating : null;
{
item.CommunityRating = rating;
}
else
{
item.CommunityRating = null;
}
item.Overview = image.ImageTag.Comment; item.Overview = image.ImageTag.Comment;

View File

@ -59,10 +59,7 @@ namespace Emby.Server.Implementations.AppBase
private set => _dataPath = Directory.CreateDirectory(value).FullName; private set => _dataPath = Directory.CreateDirectory(value).FullName;
} }
/// <summary> /// <inheritdoc />
/// Gets the magic string used for virtual path manipulation.
/// </summary>
/// <value>The magic string used for virtual path manipulation.</value>
public string VirtualDataPath { get; } = "%AppDataPath%"; public string VirtualDataPath { get; } = "%AppDataPath%";
/// <summary> /// <summary>

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
@ -49,7 +51,6 @@ using MediaBrowser.Api;
using MediaBrowser.Common; using MediaBrowser.Common;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Events; using MediaBrowser.Common.Events;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Updates; using MediaBrowser.Common.Updates;
@ -117,7 +118,7 @@ using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
namespace Emby.Server.Implementations namespace Emby.Server.Implementations
{ {
/// <summary> /// <summary>
/// Class CompositionRoot /// Class CompositionRoot.
/// </summary> /// </summary>
public abstract class ApplicationHost : IServerApplicationHost, IDisposable public abstract class ApplicationHost : IServerApplicationHost, IDisposable
{ {
@ -166,6 +167,7 @@ namespace Emby.Server.Implementations
/// <value><c>true</c> if this instance has pending application restart; otherwise, <c>false</c>.</value> /// <value><c>true</c> if this instance has pending application restart; otherwise, <c>false</c>.</value>
public bool HasPendingRestart { get; private set; } public bool HasPendingRestart { get; private set; }
/// <inheritdoc />
public bool IsShuttingDown { get; private set; } public bool IsShuttingDown { get; private set; }
/// <summary> /// <summary>
@ -217,6 +219,7 @@ namespace Emby.Server.Implementations
public IFileSystem FileSystemManager { get; set; } public IFileSystem FileSystemManager { get; set; }
/// <inheritdoc />
public PackageVersionClass SystemUpdateLevel public PackageVersionClass SystemUpdateLevel
{ {
get get
@ -773,12 +776,11 @@ namespace Emby.Server.Implementations
_displayPreferencesRepository = new SqliteDisplayPreferencesRepository( _displayPreferencesRepository = new SqliteDisplayPreferencesRepository(
LoggerFactory.CreateLogger<SqliteDisplayPreferencesRepository>(), LoggerFactory.CreateLogger<SqliteDisplayPreferencesRepository>(),
JsonSerializer,
ApplicationPaths, ApplicationPaths,
FileSystemManager); FileSystemManager);
serviceCollection.AddSingleton<IDisplayPreferencesRepository>(_displayPreferencesRepository); serviceCollection.AddSingleton<IDisplayPreferencesRepository>(_displayPreferencesRepository);
ItemRepository = new SqliteItemRepository(ServerConfigurationManager, this, JsonSerializer, LoggerFactory, LocalizationManager); ItemRepository = new SqliteItemRepository(ServerConfigurationManager, this, LoggerFactory.CreateLogger<SqliteItemRepository>(), LocalizationManager);
serviceCollection.AddSingleton<IItemRepository>(ItemRepository); serviceCollection.AddSingleton<IItemRepository>(ItemRepository);
AuthenticationRepository = GetAuthenticationRepository(); AuthenticationRepository = GetAuthenticationRepository();
@ -979,8 +981,7 @@ namespace Emby.Server.Implementations
{ {
var repo = new SqliteUserRepository( var repo = new SqliteUserRepository(
LoggerFactory.CreateLogger<SqliteUserRepository>(), LoggerFactory.CreateLogger<SqliteUserRepository>(),
ApplicationPaths, ApplicationPaths);
JsonSerializer);
repo.Initialize(); repo.Initialize();

View File

@ -2,44 +2,44 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Text.Json;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Json;
using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Persistence;
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;
using SQLitePCL.pretty; using SQLitePCL.pretty;
namespace Emby.Server.Implementations.Data namespace Emby.Server.Implementations.Data
{ {
/// <summary> /// <summary>
/// Class SQLiteDisplayPreferencesRepository /// Class SQLiteDisplayPreferencesRepository.
/// </summary> /// </summary>
public class SqliteDisplayPreferencesRepository : BaseSqliteRepository, IDisplayPreferencesRepository public class SqliteDisplayPreferencesRepository : BaseSqliteRepository, IDisplayPreferencesRepository
{ {
private readonly IFileSystem _fileSystem; private readonly IFileSystem _fileSystem;
public SqliteDisplayPreferencesRepository(ILogger<SqliteDisplayPreferencesRepository> logger, IJsonSerializer jsonSerializer, IApplicationPaths appPaths, IFileSystem fileSystem) private readonly JsonSerializerOptions _jsonOptions;
public SqliteDisplayPreferencesRepository(ILogger<SqliteDisplayPreferencesRepository> logger, IApplicationPaths appPaths, IFileSystem fileSystem)
: base(logger) : base(logger)
{ {
_jsonSerializer = jsonSerializer;
_fileSystem = fileSystem; _fileSystem = fileSystem;
_jsonOptions = JsonDefaults.GetOptions();
DbFilePath = Path.Combine(appPaths.DataPath, "displaypreferences.db"); DbFilePath = Path.Combine(appPaths.DataPath, "displaypreferences.db");
} }
/// <summary> /// <summary>
/// Gets the name of the repository /// Gets the name of the repository.
/// </summary> /// </summary>
/// <value>The name.</value> /// <value>The name.</value>
public string Name => "SQLite"; public string Name => "SQLite";
/// <summary>
/// The _json serializer
/// </summary>
private readonly IJsonSerializer _jsonSerializer;
public void Initialize() public void Initialize()
{ {
try try
@ -106,7 +106,7 @@ namespace Emby.Server.Implementations.Data
private void SaveDisplayPreferences(DisplayPreferences displayPreferences, Guid userId, string client, IDatabaseConnection connection) private void SaveDisplayPreferences(DisplayPreferences displayPreferences, Guid userId, string client, IDatabaseConnection connection)
{ {
var serialized = _jsonSerializer.SerializeToBytes(displayPreferences); var serialized = JsonSerializer.SerializeToUtf8Bytes(displayPreferences, _jsonOptions);
using (var statement = connection.PrepareStatement("replace into userdisplaypreferences (id, userid, client, data) values (@id, @userId, @client, @data)")) using (var statement = connection.PrepareStatement("replace into userdisplaypreferences (id, userid, client, data) values (@id, @userId, @client, @data)"))
{ {
@ -198,15 +198,13 @@ namespace Emby.Server.Implementations.Data
var list = new List<DisplayPreferences>(); var list = new List<DisplayPreferences>();
using (var connection = GetConnection(true)) using (var connection = GetConnection(true))
using (var statement = connection.PrepareStatement("select data from userdisplaypreferences where userId=@userId"))
{ {
using (var statement = connection.PrepareStatement("select data from userdisplaypreferences where userId=@userId")) statement.TryBind("@userId", userId.ToGuidBlob());
{
statement.TryBind("@userId", userId.ToGuidBlob());
foreach (var row in statement.ExecuteQuery()) foreach (var row in statement.ExecuteQuery())
{ {
list.Add(Get(row)); list.Add(Get(row));
}
} }
} }
@ -214,7 +212,7 @@ namespace Emby.Server.Implementations.Data
} }
private DisplayPreferences Get(IReadOnlyList<IResultSetValue> row) private DisplayPreferences Get(IReadOnlyList<IResultSetValue> row)
=> _jsonSerializer.DeserializeFromString<DisplayPreferences>(row.GetString(0)); => JsonSerializer.Deserialize<DisplayPreferences>(row[0].ToBlob(), _jsonOptions);
public void SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken) public void SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken)
=> SaveDisplayPreferences(displayPreferences, new Guid(userId), client, cancellationToken); => SaveDisplayPreferences(displayPreferences, new Guid(userId), client, cancellationToken);

View File

@ -34,8 +34,7 @@ namespace Emby.Server.Implementations.Data
public static Guid ReadGuidFromBlob(this IResultSetValue result) public static Guid ReadGuidFromBlob(this IResultSetValue result)
{ {
// TODO: Remove ToArray when upgrading to netstandard2.1 return new Guid(result.ToBlob());
return new Guid(result.ToBlob().ToArray());
} }
public static string ToDateTimeParamValue(this DateTime dateValue) public static string ToDateTimeParamValue(this DateTime dateValue)

View File

@ -5,8 +5,11 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Text; using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading; using System.Threading;
using Emby.Server.Implementations.Playlists; using Emby.Server.Implementations.Playlists;
using MediaBrowser.Common.Json;
using MediaBrowser.Controller; using MediaBrowser.Controller;
using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
@ -38,14 +41,6 @@ namespace Emby.Server.Implementations.Data
{ {
private const string ChaptersTableName = "Chapters2"; private const string ChaptersTableName = "Chapters2";
private readonly TypeMapper _typeMapper;
/// <summary>
/// Gets the json serializer.
/// </summary>
/// <value>The json serializer.</value>
private readonly IJsonSerializer _jsonSerializer;
/// <summary> /// <summary>
/// The _app paths /// The _app paths
/// </summary> /// </summary>
@ -53,33 +48,31 @@ namespace Emby.Server.Implementations.Data
private readonly IServerApplicationHost _appHost; private readonly IServerApplicationHost _appHost;
private readonly ILocalizationManager _localization; private readonly ILocalizationManager _localization;
private readonly TypeMapper _typeMapper;
private readonly JsonSerializerOptions _jsonOptions;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class. /// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
/// </summary> /// </summary>
public SqliteItemRepository( public SqliteItemRepository(
IServerConfigurationManager config, IServerConfigurationManager config,
IServerApplicationHost appHost, IServerApplicationHost appHost,
IJsonSerializer jsonSerializer, ILogger<SqliteItemRepository> logger,
ILoggerFactory loggerFactory,
ILocalizationManager localization) ILocalizationManager localization)
: base(loggerFactory.CreateLogger(nameof(SqliteItemRepository))) : base(logger)
{ {
if (config == null) if (config == null)
{ {
throw new ArgumentNullException(nameof(config)); throw new ArgumentNullException(nameof(config));
} }
if (jsonSerializer == null)
{
throw new ArgumentNullException(nameof(jsonSerializer));
}
_appHost = appHost;
_config = config; _config = config;
_jsonSerializer = jsonSerializer; _appHost = appHost;
_typeMapper = new TypeMapper();
_localization = localization; _localization = localization;
_typeMapper = new TypeMapper();
_jsonOptions = JsonDefaults.GetOptions();
DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db"); DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db");
} }
@ -671,7 +664,7 @@ namespace Emby.Server.Implementations.Data
if (TypeRequiresDeserialization(item.GetType())) if (TypeRequiresDeserialization(item.GetType()))
{ {
saveItemStatement.TryBind("@data", _jsonSerializer.SerializeToBytes(item)); saveItemStatement.TryBind("@data", JsonSerializer.SerializeToUtf8Bytes(item, _jsonOptions));
} }
else else
{ {
@ -1302,11 +1295,11 @@ namespace Emby.Server.Implementations.Data
{ {
try try
{ {
item = _jsonSerializer.DeserializeFromString(reader.GetString(1), type) as BaseItem; item = JsonSerializer.Deserialize(reader[1].ToBlob(), type, _jsonOptions) as BaseItem;
} }
catch (SerializationException ex) catch (JsonException ex)
{ {
Logger.LogError(ex, "Error deserializing item"); Logger.LogError(ex, "Error deserializing item with JSON: {Data}", reader.GetString(1));
} }
} }
@ -2724,7 +2717,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,

View File

@ -1,10 +1,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text.Json;
using MediaBrowser.Common.Json;
using MediaBrowser.Controller; using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Serialization;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using SQLitePCL.pretty; using SQLitePCL.pretty;
@ -15,15 +16,14 @@ namespace Emby.Server.Implementations.Data
/// </summary> /// </summary>
public class SqliteUserRepository : BaseSqliteRepository, IUserRepository public class SqliteUserRepository : BaseSqliteRepository, IUserRepository
{ {
private readonly IJsonSerializer _jsonSerializer; private readonly JsonSerializerOptions _jsonOptions;
public SqliteUserRepository( public SqliteUserRepository(
ILogger<SqliteUserRepository> logger, ILogger<SqliteUserRepository> logger,
IServerApplicationPaths appPaths, IServerApplicationPaths appPaths)
IJsonSerializer jsonSerializer)
: base(logger) : base(logger)
{ {
_jsonSerializer = jsonSerializer; _jsonOptions = JsonDefaults.GetOptions();;
DbFilePath = Path.Combine(appPaths.DataPath, "users.db"); DbFilePath = Path.Combine(appPaths.DataPath, "users.db");
} }
@ -84,7 +84,7 @@ namespace Emby.Server.Implementations.Data
} }
user.Password = null; user.Password = null;
var serialized = _jsonSerializer.SerializeToBytes(user); var serialized = JsonSerializer.SerializeToUtf8Bytes(user, _jsonOptions);
connection.RunInTransaction(db => connection.RunInTransaction(db =>
{ {
@ -108,7 +108,7 @@ namespace Emby.Server.Implementations.Data
throw new ArgumentNullException(nameof(user)); throw new ArgumentNullException(nameof(user));
} }
var serialized = _jsonSerializer.SerializeToBytes(user); var serialized = JsonSerializer.SerializeToUtf8Bytes(user, _jsonOptions);
using (var connection = GetConnection()) using (var connection = GetConnection())
{ {
@ -142,7 +142,7 @@ namespace Emby.Server.Implementations.Data
throw new ArgumentNullException(nameof(user)); throw new ArgumentNullException(nameof(user));
} }
var serialized = _jsonSerializer.SerializeToBytes(user); var serialized = JsonSerializer.SerializeToUtf8Bytes(user, _jsonOptions);
using (var connection = GetConnection()) using (var connection = GetConnection())
{ {
@ -179,7 +179,7 @@ namespace Emby.Server.Implementations.Data
var id = row[0].ToInt64(); var id = row[0].ToInt64();
var guid = row[1].ReadGuidFromBlob(); var guid = row[1].ReadGuidFromBlob();
var user = _jsonSerializer.DeserializeFromString<User>(row.GetString(2)); var user = JsonSerializer.Deserialize<User>(row[2].ToBlob(), _jsonOptions);
user.InternalId = id; user.InternalId = id;
user.Id = guid; user.Id = guid;
return user; return user;

View File

@ -42,7 +42,7 @@
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup> </PropertyGroup>

View File

@ -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,22 +520,22 @@ 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
{ {
@ -596,7 +607,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 +662,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 />

View File

@ -21,14 +21,6 @@ namespace Emby.Server.Implementations.Images
public abstract class BaseDynamicImageProvider<T> : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, IHasOrder public abstract class BaseDynamicImageProvider<T> : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, IHasOrder
where T : BaseItem where T : BaseItem
{ {
protected virtual IReadOnlyCollection<ImageType> SupportedImages { get; }
= new ImageType[] { ImageType.Primary };
protected IFileSystem FileSystem { get; private set; }
protected IProviderManager ProviderManager { get; private set; }
protected IApplicationPaths ApplicationPaths { get; private set; }
protected IImageProcessor ImageProcessor { get; set; }
protected BaseDynamicImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor) protected BaseDynamicImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor)
{ {
ApplicationPaths = applicationPaths; ApplicationPaths = applicationPaths;
@ -37,6 +29,24 @@ namespace Emby.Server.Implementations.Images
ImageProcessor = imageProcessor; ImageProcessor = imageProcessor;
} }
protected IFileSystem FileSystem { get; }
protected IProviderManager ProviderManager { get; }
protected IApplicationPaths ApplicationPaths { get; }
protected IImageProcessor ImageProcessor { get; set; }
protected virtual IReadOnlyCollection<ImageType> SupportedImages { get; }
= new ImageType[] { ImageType.Primary };
/// <inheritdoc />
public string Name => "Dynamic Image Provider";
protected virtual int MaxImageAgeDays => 7;
public int Order => 0;
protected virtual bool Supports(BaseItem _) => true; protected virtual bool Supports(BaseItem _) => true;
public async Task<ItemUpdateType> FetchAsync(T item, MetadataRefreshOptions options, CancellationToken cancellationToken) public async Task<ItemUpdateType> FetchAsync(T item, MetadataRefreshOptions options, CancellationToken cancellationToken)
@ -85,7 +95,8 @@ namespace Emby.Server.Implementations.Images
return FetchToFileInternal(item, items, imageType, cancellationToken); return FetchToFileInternal(item, items, imageType, cancellationToken);
} }
protected async Task<ItemUpdateType> FetchToFileInternal(BaseItem item, protected async Task<ItemUpdateType> FetchToFileInternal(
BaseItem item,
IReadOnlyList<BaseItem> itemsWithImages, IReadOnlyList<BaseItem> itemsWithImages,
ImageType imageType, ImageType imageType,
CancellationToken cancellationToken) CancellationToken cancellationToken)
@ -181,8 +192,6 @@ namespace Emby.Server.Implementations.Images
return outputPath; return outputPath;
} }
public string Name => "Dynamic Image Provider";
protected virtual string CreateImage(BaseItem item, protected virtual string CreateImage(BaseItem item,
IReadOnlyCollection<BaseItem> itemsWithImages, IReadOnlyCollection<BaseItem> itemsWithImages,
string outputPathWithoutExtension, string outputPathWithoutExtension,
@ -214,8 +223,6 @@ namespace Emby.Server.Implementations.Images
throw new ArgumentException("Unexpected image type", nameof(imageType)); throw new ArgumentException("Unexpected image type", nameof(imageType));
} }
protected virtual int MaxImageAgeDays => 7;
public bool HasChanged(BaseItem item, IDirectoryService directoryServicee) public bool HasChanged(BaseItem item, IDirectoryService directoryServicee)
{ {
if (!Supports(item)) if (!Supports(item))
@ -263,15 +270,9 @@ namespace Emby.Server.Implementations.Images
protected virtual bool HasChangedByDate(BaseItem item, ItemImageInfo image) protected virtual bool HasChangedByDate(BaseItem item, ItemImageInfo image)
{ {
var age = DateTime.UtcNow - image.DateModified; var age = DateTime.UtcNow - image.DateModified;
if (age.TotalDays <= MaxImageAgeDays) return age.TotalDays > MaxImageAgeDays;
{
return false;
}
return true;
} }
public int Order => 0;
protected string CreateSingleImage(IEnumerable<BaseItem> itemsWithImages, string outputPathWithoutExtension, ImageType imageType) protected string CreateSingleImage(IEnumerable<BaseItem> itemsWithImages, string outputPathWithoutExtension, ImageType imageType)
{ {
var image = itemsWithImages var image = itemsWithImages

View File

@ -24,7 +24,7 @@
"HeaderFavoriteShows": "Series favoritas", "HeaderFavoriteShows": "Series favoritas",
"HeaderFavoriteSongs": "Canciones favoritas", "HeaderFavoriteSongs": "Canciones favoritas",
"HeaderLiveTV": "Televisión en directo", "HeaderLiveTV": "Televisión en directo",
"HeaderNextUp": "Siguiendo", "HeaderNextUp": "Siguiente",
"HeaderRecordingGroups": "Grupos de grabación", "HeaderRecordingGroups": "Grupos de grabación",
"HomeVideos": "Vídeos caseros", "HomeVideos": "Vídeos caseros",
"Inherit": "Heredar", "Inherit": "Heredar",

View File

@ -5,7 +5,7 @@
"Artists": "Artistes", "Artists": "Artistes",
"AuthenticationSucceededWithUserName": "{0} s'est authentifié avec succès", "AuthenticationSucceededWithUserName": "{0} s'est authentifié avec succès",
"Books": "Livres", "Books": "Livres",
"CameraImageUploadedFrom": "Une image de caméra a été chargée depuis {0}", "CameraImageUploadedFrom": "Une nouvelle image de caméra a été chargée depuis {0}",
"Channels": "Chaînes", "Channels": "Chaînes",
"ChapterNameValue": "Chapitre {0}", "ChapterNameValue": "Chapitre {0}",
"Collections": "Collections", "Collections": "Collections",
@ -17,7 +17,7 @@
"Genres": "Genres", "Genres": "Genres",
"HeaderAlbumArtists": "Artistes de l'album", "HeaderAlbumArtists": "Artistes de l'album",
"HeaderCameraUploads": "Photos transférées", "HeaderCameraUploads": "Photos transférées",
"HeaderContinueWatching": "Reprendre", "HeaderContinueWatching": "Continuer à regarder",
"HeaderFavoriteAlbums": "Albums favoris", "HeaderFavoriteAlbums": "Albums favoris",
"HeaderFavoriteArtists": "Artistes favoris", "HeaderFavoriteArtists": "Artistes favoris",
"HeaderFavoriteEpisodes": "Épisodes favoris", "HeaderFavoriteEpisodes": "Épisodes favoris",
@ -34,14 +34,14 @@
"LabelRunningTimeValue": "Durée : {0}", "LabelRunningTimeValue": "Durée : {0}",
"Latest": "Derniers", "Latest": "Derniers",
"MessageApplicationUpdated": "Le serveur Jellyfin a été mis à jour", "MessageApplicationUpdated": "Le serveur Jellyfin a été mis à jour",
"MessageApplicationUpdatedTo": "Jellyfin Serveur a été mis à jour en version {0}", "MessageApplicationUpdatedTo": "Le serveur Jellyfin a été mis à jour vers {0}",
"MessageNamedServerConfigurationUpdatedWithValue": "La configuration de la section {0} du serveur a été mise à jour", "MessageNamedServerConfigurationUpdatedWithValue": "La configuration de la section {0} du serveur a été mise à jour",
"MessageServerConfigurationUpdated": "La configuration du serveur a été mise à jour", "MessageServerConfigurationUpdated": "La configuration du serveur a été mise à jour",
"MixedContent": "Contenu mixte", "MixedContent": "Contenu mixte",
"Movies": "Films", "Movies": "Films",
"Music": "Musique", "Music": "Musique",
"MusicVideos": "Vidéos musicales", "MusicVideos": "Vidéos musicales",
"NameInstallFailed": "{0} échec d'installation", "NameInstallFailed": "{0} échec de l'installation",
"NameSeasonNumber": "Saison {0}", "NameSeasonNumber": "Saison {0}",
"NameSeasonUnknown": "Saison Inconnue", "NameSeasonUnknown": "Saison Inconnue",
"NewVersionIsAvailable": "Une nouvelle version de Jellyfin Serveur est disponible au téléchargement.", "NewVersionIsAvailable": "Une nouvelle version de Jellyfin Serveur est disponible au téléchargement.",
@ -50,7 +50,7 @@
"NotificationOptionAudioPlayback": "Lecture audio démarrée", "NotificationOptionAudioPlayback": "Lecture audio démarrée",
"NotificationOptionAudioPlaybackStopped": "Lecture audio arrêtée", "NotificationOptionAudioPlaybackStopped": "Lecture audio arrêtée",
"NotificationOptionCameraImageUploaded": "L'image de l'appareil photo a été transférée", "NotificationOptionCameraImageUploaded": "L'image de l'appareil photo a été transférée",
"NotificationOptionInstallationFailed": "Échec d'installation", "NotificationOptionInstallationFailed": "Échec de l'installation",
"NotificationOptionNewLibraryContent": "Nouveau contenu ajouté", "NotificationOptionNewLibraryContent": "Nouveau contenu ajouté",
"NotificationOptionPluginError": "Erreur d'extension", "NotificationOptionPluginError": "Erreur d'extension",
"NotificationOptionPluginInstalled": "Extension installée", "NotificationOptionPluginInstalled": "Extension installée",
@ -91,7 +91,7 @@
"UserPolicyUpdatedWithName": "La politique de l'utilisateur a été mise à jour pour {0}", "UserPolicyUpdatedWithName": "La politique de l'utilisateur a été mise à jour pour {0}",
"UserStartedPlayingItemWithValues": "{0} est en train de lire {1} sur {2}", "UserStartedPlayingItemWithValues": "{0} est en train de lire {1} sur {2}",
"UserStoppedPlayingItemWithValues": "{0} vient d'arrêter la lecture de {1} sur {2}", "UserStoppedPlayingItemWithValues": "{0} vient d'arrêter la lecture de {1} sur {2}",
"ValueHasBeenAddedToLibrary": "{0} a été ajouté à votre librairie", "ValueHasBeenAddedToLibrary": "{0} a été ajouté à votre médiathèque",
"ValueSpecialEpisodeName": "Spécial - {0}", "ValueSpecialEpisodeName": "Spécial - {0}",
"VersionNumber": "Version {0}" "VersionNumber": "Version {0}"
} }

View File

@ -1,82 +1,82 @@
{ {
"Albums": "앨범", "Albums": "앨범",
"AppDeviceValues": "앱: {0}, 디바이스: {1}", "AppDeviceValues": "앱: {0}, 장치: {1}",
"Application": "애플리케이션", "Application": "애플리케이션",
"Artists": "아티스트", "Artists": "아티스트",
"AuthenticationSucceededWithUserName": "{0} 인증에 성공했습니다.", "AuthenticationSucceededWithUserName": "{0}이 성공적으로 인증됨",
"Books": "도서", "Books": "도서",
"CameraImageUploadedFrom": "새로운 카메라 이미지가 {0}에서 업로드되었습니다.", "CameraImageUploadedFrom": "{0}에서 새로운 카메라 이미지가 업로드되었습니다",
"Channels": "채널", "Channels": "채널",
"ChapterNameValue": "챕터 {0}", "ChapterNameValue": "챕터 {0}",
"Collections": "컬렉션", "Collections": "컬렉션",
"DeviceOfflineWithName": "{0}가 접속이 끊어졌습니다.", "DeviceOfflineWithName": "{0} 연결 끊김",
"DeviceOnlineWithName": "{0}가 접속되었습니다.", "DeviceOnlineWithName": "{0} 연결됨",
"FailedLoginAttemptWithUserName": "{0}에서 로그인 실패했습니다.", "FailedLoginAttemptWithUserName": "{0} 로그인 실패",
"Favorites": "즐겨찾기", "Favorites": "즐겨찾기",
"Folders": "폴더", "Folders": "폴더",
"Genres": "장르", "Genres": "장르",
"HeaderAlbumArtists": "앨범 아티스트", "HeaderAlbumArtists": "앨범 아티스트",
"HeaderCameraUploads": "카메라 업로드", "HeaderCameraUploads": "카메라 업로드",
"HeaderContinueWatching": "계속 시청하기", "HeaderContinueWatching": "계속 시청하기",
"HeaderFavoriteAlbums": "좋아하는 앨범", "HeaderFavoriteAlbums": "즐겨찾는 앨범",
"HeaderFavoriteArtists": "좋아하는 아티스트", "HeaderFavoriteArtists": "즐겨찾는 아티스트",
"HeaderFavoriteEpisodes": "좋아하는 에피소드", "HeaderFavoriteEpisodes": "즐겨찾는 에피소드",
"HeaderFavoriteShows": "즐겨찾는 쇼", "HeaderFavoriteShows": "즐겨찾는 쇼",
"HeaderFavoriteSongs": "좋아하는 노래", "HeaderFavoriteSongs": "즐겨찾는 노래",
"HeaderLiveTV": "TV 방송", "HeaderLiveTV": "실시간 TV",
"HeaderNextUp": "다음으로", "HeaderNextUp": "다음으로",
"HeaderRecordingGroups": "녹화 그룹", "HeaderRecordingGroups": "녹화 그룹",
"HomeVideos": "홈 비디오", "HomeVideos": "홈 비디오",
"Inherit": "상속", "Inherit": "상속",
"ItemAddedWithName": "{0} 라이브러리에 추가됨", "ItemAddedWithName": "{0} 라이브러리에 추가됨",
"ItemRemovedWithName": "{0} 라이브러리에서 제거됨", "ItemRemovedWithName": "{0} 라이브러리에서 제거됨",
"LabelIpAddressValue": "IP 주소: {0}", "LabelIpAddressValue": "IP 주소: {0}",
"LabelRunningTimeValue": "상영 시간: {0}", "LabelRunningTimeValue": "상영 시간: {0}",
"Latest": "최근", "Latest": "최근",
"MessageApplicationUpdated": "Jellyfin 서버 업데이트됨", "MessageApplicationUpdated": "Jellyfin 서버가 업데이트되었습니다",
"MessageApplicationUpdatedTo": "Jellyfin 서버가 {0}로 업데이트", "MessageApplicationUpdatedTo": "Jellyfin 서버가 {0}로 업데이트되었습니다",
"MessageNamedServerConfigurationUpdatedWithValue": "서버 환경 설정 {0} 섹션 업데이트 됨", "MessageNamedServerConfigurationUpdatedWithValue": "서버 환경 설정 {0} 섹션이 업데이트되었습니다",
"MessageServerConfigurationUpdated": "서버 환경 설정 업데이드됨", "MessageServerConfigurationUpdated": "서버 환경 설정이 업데이트되었습니다",
"MixedContent": "혼합 콘텐츠", "MixedContent": "혼합 콘텐츠",
"Movies": "영화", "Movies": "영화",
"Music": "음악", "Music": "음악",
"MusicVideos": "뮤직 비디오", "MusicVideos": "뮤직비디오",
"NameInstallFailed": "{0} 설치 실패.", "NameInstallFailed": "{0} 설치 실패",
"NameSeasonNumber": "시즌 {0}", "NameSeasonNumber": "시즌 {0}",
"NameSeasonUnknown": "알 수 없는 시즌", "NameSeasonUnknown": "알 수 없는 시즌",
"NewVersionIsAvailable": "새 버전의 Jellyfin 서버를 사용할 수 있습니다.", "NewVersionIsAvailable": "새로운 버전의 Jellyfin 서버를 사용할 수 있습니다.",
"NotificationOptionApplicationUpdateAvailable": "애플리케이션 업데이트 사용 가능", "NotificationOptionApplicationUpdateAvailable": "애플리케이션 업데이트 가능",
"NotificationOptionApplicationUpdateInstalled": "애플리케이션 업데이트가 설치됨", "NotificationOptionApplicationUpdateInstalled": "애플리케이션 업데이트 완료",
"NotificationOptionAudioPlayback": "오디오 재생을 시작함", "NotificationOptionAudioPlayback": "오디오 재생 시작됨",
"NotificationOptionAudioPlaybackStopped": "오디오 재생 중지됨", "NotificationOptionAudioPlaybackStopped": "오디오 재생 중지됨",
"NotificationOptionCameraImageUploaded": "카메라 이미지가 업로드됨", "NotificationOptionCameraImageUploaded": "카메라 이미지가 업로드됨",
"NotificationOptionInstallationFailed": "설치 실패", "NotificationOptionInstallationFailed": "설치 실패",
"NotificationOptionNewLibraryContent": "새 콘텐가 추가됨", "NotificationOptionNewLibraryContent": "새 콘텐가 추가됨",
"NotificationOptionPluginError": "플러그인 실패", "NotificationOptionPluginError": "플러그인 실패",
"NotificationOptionPluginInstalled": "플러그인 설치됨", "NotificationOptionPluginInstalled": "플러그인 설치됨",
"NotificationOptionPluginUninstalled": "플러그인이 설치 제거됨", "NotificationOptionPluginUninstalled": "플러그인 제거됨",
"NotificationOptionPluginUpdateInstalled": "플러그인 업데이트가 설치됨", "NotificationOptionPluginUpdateInstalled": "플러그인 업데이트 완료",
"NotificationOptionServerRestartRequired": "서버를 다시 시작하십시오", "NotificationOptionServerRestartRequired": "서버 재시작 필요",
"NotificationOptionTaskFailed": "예약 작업 실패", "NotificationOptionTaskFailed": "예약 작업 실패",
"NotificationOptionUserLockedOut": "사용자가 잠겼습니다", "NotificationOptionUserLockedOut": "잠긴 사용자",
"NotificationOptionVideoPlayback": "비디오 재생을 시작함", "NotificationOptionVideoPlayback": "비디오 재생 시작됨",
"NotificationOptionVideoPlaybackStopped": "비디오 재생 중지됨", "NotificationOptionVideoPlaybackStopped": "비디오 재생 중지됨",
"Photos": "사진", "Photos": "사진",
"Playlists": "재생목록", "Playlists": "재생목록",
"Plugin": "플러그인", "Plugin": "플러그인",
"PluginInstalledWithName": "{0} 설치됨", "PluginInstalledWithName": "{0} 설치됨",
"PluginUninstalledWithName": "{0} 설치 제거됨", "PluginUninstalledWithName": "{0} 제거됨",
"PluginUpdatedWithName": "{0} 업데이트됨", "PluginUpdatedWithName": "{0} 업데이트됨",
"ProviderValue": "제공자: {0}", "ProviderValue": "제공자: {0}",
"ScheduledTaskFailedWithName": "{0} 실패", "ScheduledTaskFailedWithName": "{0} 실패",
"ScheduledTaskStartedWithName": "{0} 시작", "ScheduledTaskStartedWithName": "{0} 시작",
"ServerNameNeedsToBeRestarted": "{0} 를 재시작하십시오", "ServerNameNeedsToBeRestarted": "{0}를 재시작해야합니다",
"Shows": "프로그램", "Shows": "",
"Songs": "노래", "Songs": "노래",
"StartupEmbyServerIsLoading": "Jellyfin 서버를 불러오고 있습니다. 잠시후 다시시도 해주세요.", "StartupEmbyServerIsLoading": "Jellyfin 서버를 불러오고 있습니다. 잠시 후에 다시 시도하십시오.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}", "SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "{0}에서 {1} 자막 다운로드에 실패했습니다", "SubtitleDownloadFailureFromForItem": "{0}에서 {1} 자막 다운로드에 실패했습니다",
"SubtitlesDownloadedForItem": "{0} 자막을 다운로드했습니다", "SubtitlesDownloadedForItem": "{0} 자막 다운로드 완료",
"Sync": "동기화", "Sync": "동기화",
"System": "시스템", "System": "시스템",
"TvShows": "TV 쇼", "TvShows": "TV 쇼",
@ -85,13 +85,13 @@
"UserDeletedWithName": "사용자 {0} 삭제됨", "UserDeletedWithName": "사용자 {0} 삭제됨",
"UserDownloadingItemWithValues": "{0}이(가) {1}을 다운로드 중입니다", "UserDownloadingItemWithValues": "{0}이(가) {1}을 다운로드 중입니다",
"UserLockedOutWithName": "유저 {0} 은(는) 잠금처리 되었습니다", "UserLockedOutWithName": "유저 {0} 은(는) 잠금처리 되었습니다",
"UserOfflineFromDevice": "{0} has disconnected from {1}", "UserOfflineFromDevice": "{1}로부터 {0}의 연결이 끊겼습니다",
"UserOnlineFromDevice": "{0} is online from {1}", "UserOnlineFromDevice": "{0}은 {1}에서 온라인 상태입니다",
"UserPasswordChangedWithName": "Password has been changed for user {0}", "UserPasswordChangedWithName": "사용자 {0}의 비밀번호가 변경되었습니다",
"UserPolicyUpdatedWithName": "User policy has been updated for {0}", "UserPolicyUpdatedWithName": "{0}의 사용자 정책이 업데이트되었습니다",
"UserStartedPlayingItemWithValues": "{0} is playing {1} on {2}", "UserStartedPlayingItemWithValues": "{2}에서 {0}이 {1} 재생 중",
"UserStoppedPlayingItemWithValues": "{0} has finished playing {1} on {2}", "UserStoppedPlayingItemWithValues": "{2}에서 {0}이 {1} 재생을 마침",
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library", "ValueHasBeenAddedToLibrary": "{0}가 미디어 라이브러리에 추가되었습니다",
"ValueSpecialEpisodeName": "Special - {0}", "ValueSpecialEpisodeName": "스페셜 - {0}",
"VersionNumber": "Version {0}" "VersionNumber": "버전 {0}"
} }

View File

@ -1,9 +1,9 @@
{ {
"Albums": "Album", "Albums": "Album",
"AppDeviceValues": "App:{0}, Enhet: {1}", "AppDeviceValues": "App:{0}, Enhet: {1}",
"Application": "Applikasjon", "Application": "Program",
"Artists": "Artister", "Artists": "Artister",
"AuthenticationSucceededWithUserName": "{0} vellykkede autentisert", "AuthenticationSucceededWithUserName": "{0} har logget inn",
"Books": "Bøker", "Books": "Bøker",
"CameraImageUploadedFrom": "Et nytt kamerabilde er lastet opp fra {0}", "CameraImageUploadedFrom": "Et nytt kamerabilde er lastet opp fra {0}",
"Channels": "Kanaler", "Channels": "Kanaler",
@ -14,16 +14,16 @@
"FailedLoginAttemptWithUserName": "Mislykket påloggingsforsøk fra {0}", "FailedLoginAttemptWithUserName": "Mislykket påloggingsforsøk fra {0}",
"Favorites": "Favoritter", "Favorites": "Favoritter",
"Folders": "Mapper", "Folders": "Mapper",
"Genres": "Sjanger", "Genres": "Sjangre",
"HeaderAlbumArtists": "Albumartist", "HeaderAlbumArtists": "Albumartister",
"HeaderCameraUploads": "Camera Uploads", "HeaderCameraUploads": "Kameraopplastinger",
"HeaderContinueWatching": "Forsett og see på", "HeaderContinueWatching": "Forsett å se på",
"HeaderFavoriteAlbums": "Favoritt albumer", "HeaderFavoriteAlbums": "Favorittalbum",
"HeaderFavoriteArtists": "Favorittartister", "HeaderFavoriteArtists": "Favorittartister",
"HeaderFavoriteEpisodes": "Favoritt episode", "HeaderFavoriteEpisodes": "Favorittepisoder",
"HeaderFavoriteShows": "Favorittserier", "HeaderFavoriteShows": "Favorittserier",
"HeaderFavoriteSongs": "Favorittsanger", "HeaderFavoriteSongs": "Favorittsanger",
"HeaderLiveTV": "Direkte TV", "HeaderLiveTV": "Direkte-TV",
"HeaderNextUp": "Neste", "HeaderNextUp": "Neste",
"HeaderRecordingGroups": "Opptak Grupper", "HeaderRecordingGroups": "Opptak Grupper",
"HomeVideos": "Hjemmelaget filmer", "HomeVideos": "Hjemmelaget filmer",
@ -34,23 +34,23 @@
"LabelRunningTimeValue": "Løpetid {0}", "LabelRunningTimeValue": "Løpetid {0}",
"Latest": "Siste", "Latest": "Siste",
"MessageApplicationUpdated": "Jellyfin server har blitt oppdatert", "MessageApplicationUpdated": "Jellyfin server har blitt oppdatert",
"MessageApplicationUpdatedTo": "Jellyfin Server has been updated to {0}", "MessageApplicationUpdatedTo": "Jellyfin-serveren ble oppdatert til {0}",
"MessageNamedServerConfigurationUpdatedWithValue": "Server konfigurasjon seksjon {0} har blitt oppdatert", "MessageNamedServerConfigurationUpdatedWithValue": "Server konfigurasjon seksjon {0} har blitt oppdatert",
"MessageServerConfigurationUpdated": "Server konfigurasjon er oppdatert", "MessageServerConfigurationUpdated": "Server konfigurasjon er oppdatert",
"MixedContent": "Blandet innhold", "MixedContent": "Blandet innhold",
"Movies": "Filmer", "Movies": "Filmer",
"Music": "Musikk", "Music": "Musikk",
"MusicVideos": "Musikkvideoer", "MusicVideos": "Musikkvideoer",
"NameInstallFailed": "{0} installation failed", "NameInstallFailed": "{0}-installasjonen mislyktes",
"NameSeasonNumber": "Sesong {0}", "NameSeasonNumber": "Sesong {0}",
"NameSeasonUnknown": "Season Unknown", "NameSeasonUnknown": "Sesong ukjent",
"NewVersionIsAvailable": "A new version of Jellyfin Server is available for download.", "NewVersionIsAvailable": "En ny versjon av Jellyfin-serveren er tilgjengelig for nedlastning.",
"NotificationOptionApplicationUpdateAvailable": "Applikasjon oppdatering tilgjengelig", "NotificationOptionApplicationUpdateAvailable": "Applikasjon oppdatering tilgjengelig",
"NotificationOptionApplicationUpdateInstalled": "Applikasjon oppdatering installert.", "NotificationOptionApplicationUpdateInstalled": "Applikasjonsoppdatering installert",
"NotificationOptionAudioPlayback": "Lyd tilbakespilling startet", "NotificationOptionAudioPlayback": "Lyd tilbakespilling startet",
"NotificationOptionAudioPlaybackStopped": "Lyd avspilling stoppet", "NotificationOptionAudioPlaybackStopped": "Lyd avspilling stoppet",
"NotificationOptionCameraImageUploaded": "Kamera bilde lastet opp", "NotificationOptionCameraImageUploaded": "Kamera bilde lastet opp",
"NotificationOptionInstallationFailed": "Installasjon feil", "NotificationOptionInstallationFailed": "Installasjonsfeil",
"NotificationOptionNewLibraryContent": "Ny innhold er lagt til", "NotificationOptionNewLibraryContent": "Ny innhold er lagt til",
"NotificationOptionPluginError": "Plugin feil", "NotificationOptionPluginError": "Plugin feil",
"NotificationOptionPluginInstalled": "Plugin installert", "NotificationOptionPluginInstalled": "Plugin installert",
@ -61,8 +61,8 @@
"NotificationOptionUserLockedOut": "Bruker er utestengt", "NotificationOptionUserLockedOut": "Bruker er utestengt",
"NotificationOptionVideoPlayback": "Video tilbakespilling startet", "NotificationOptionVideoPlayback": "Video tilbakespilling startet",
"NotificationOptionVideoPlaybackStopped": "Video avspilling stoppet", "NotificationOptionVideoPlaybackStopped": "Video avspilling stoppet",
"Photos": "BIlder", "Photos": "Bilder",
"Playlists": "Spilleliste", "Playlists": "Spillelister",
"Plugin": "Plugin", "Plugin": "Plugin",
"PluginInstalledWithName": "{0} ble installert", "PluginInstalledWithName": "{0} ble installert",
"PluginUninstalledWithName": "{0} ble avinstallert", "PluginUninstalledWithName": "{0} ble avinstallert",
@ -70,16 +70,16 @@
"ProviderValue": "Leverandører: {0}", "ProviderValue": "Leverandører: {0}",
"ScheduledTaskFailedWithName": "{0} Mislykkes", "ScheduledTaskFailedWithName": "{0} Mislykkes",
"ScheduledTaskStartedWithName": "{0} Startet", "ScheduledTaskStartedWithName": "{0} Startet",
"ServerNameNeedsToBeRestarted": "{0} needs to be restarted", "ServerNameNeedsToBeRestarted": "{0} må startes på nytt",
"Shows": "Programmer", "Shows": "Programmer",
"Songs": "Sanger", "Songs": "Sanger",
"StartupEmbyServerIsLoading": "Jellyfin server laster. Prøv igjen snart.", "StartupEmbyServerIsLoading": "Jellyfin server laster. Prøv igjen snart.",
"SubtitleDownloadFailureForItem": "En feil oppstå under nedlasting av undertekster for {0}", "SubtitleDownloadFailureForItem": "En feil oppstå under nedlasting av undertekster for {0}",
"SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}", "SubtitleDownloadFailureFromForItem": "Kunne ikke laste ned teksting fra {0} for {1}",
"SubtitlesDownloadedForItem": "Undertekster lastet ned for {0}", "SubtitlesDownloadedForItem": "Undertekster lastet ned for {0}",
"Sync": "Synk", "Sync": "Synkroniser",
"System": "System", "System": "System",
"TvShows": "TV Shows", "TvShows": "TV-serier",
"User": "Bruker", "User": "Bruker",
"UserCreatedWithName": "Bruker {0} er opprettet", "UserCreatedWithName": "Bruker {0} er opprettet",
"UserDeletedWithName": "Bruker {0} har blitt slettet", "UserDeletedWithName": "Bruker {0} har blitt slettet",
@ -88,10 +88,10 @@
"UserOfflineFromDevice": "{0} har koblet fra {1}", "UserOfflineFromDevice": "{0} har koblet fra {1}",
"UserOnlineFromDevice": "{0} er tilkoblet fra {1}", "UserOnlineFromDevice": "{0} er tilkoblet fra {1}",
"UserPasswordChangedWithName": "Passordet for {0} er oppdatert", "UserPasswordChangedWithName": "Passordet for {0} er oppdatert",
"UserPolicyUpdatedWithName": "User policy has been updated for {0}", "UserPolicyUpdatedWithName": "Brukerpolicyen har blitt oppdatert for {0}",
"UserStartedPlayingItemWithValues": "{0} har startet avspilling {1}", "UserStartedPlayingItemWithValues": "{0} har startet avspilling {1}",
"UserStoppedPlayingItemWithValues": "{0} har stoppet avspilling {1}", "UserStoppedPlayingItemWithValues": "{0} har stoppet avspilling {1}",
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library", "ValueHasBeenAddedToLibrary": "{0} har blitt lagt til i mediebiblioteket ditt",
"ValueSpecialEpisodeName": "Spesial - {0}", "ValueSpecialEpisodeName": "Spesialepisode - {0}",
"VersionNumber": "Versjon {0}" "VersionNumber": "Versjon {0}"
} }

View File

@ -5,26 +5,26 @@
"Artists": "Sanatçılar", "Artists": "Sanatçılar",
"AuthenticationSucceededWithUserName": "{0} kimlik başarıyla doğrulandı", "AuthenticationSucceededWithUserName": "{0} kimlik başarıyla doğrulandı",
"Books": "Kitaplar", "Books": "Kitaplar",
"CameraImageUploadedFrom": "A new camera image has been uploaded from {0}", "CameraImageUploadedFrom": "{0} 'den yeni bir kamera resmi yüklendi",
"Channels": "Kanallar", "Channels": "Kanallar",
"ChapterNameValue": "Chapter {0}", "ChapterNameValue": "Bölüm {0}",
"Collections": "Collections", "Collections": "Koleksiyonlar",
"DeviceOfflineWithName": "{0} has disconnected", "DeviceOfflineWithName": "{0} bağlantısı kesildi",
"DeviceOnlineWithName": "{0} is connected", "DeviceOnlineWithName": "{0} bağlı",
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}", "FailedLoginAttemptWithUserName": "{0} adresinden giriş başarısız oldu",
"Favorites": "Favorites", "Favorites": "Favoriler",
"Folders": "Folders", "Folders": "Klasörler",
"Genres": "Genres", "Genres": "Türler",
"HeaderAlbumArtists": "Album Artists", "HeaderAlbumArtists": "Albüm Sanatçıları",
"HeaderCameraUploads": "Camera Uploads", "HeaderCameraUploads": "Kamera Yüklemeleri",
"HeaderContinueWatching": "İzlemeye Devam Et", "HeaderContinueWatching": "İzlemeye Devam Et",
"HeaderFavoriteAlbums": "Favori Albümler", "HeaderFavoriteAlbums": "Favori Albümler",
"HeaderFavoriteArtists": "Favorite Artists", "HeaderFavoriteArtists": "Favori Sanatçılar",
"HeaderFavoriteEpisodes": "Favorite Episodes", "HeaderFavoriteEpisodes": "Favori Bölümler",
"HeaderFavoriteShows": "Favori Showlar", "HeaderFavoriteShows": "Favori Diziler",
"HeaderFavoriteSongs": "Favorite Songs", "HeaderFavoriteSongs": "Favori Şarkılar",
"HeaderLiveTV": "Live TV", "HeaderLiveTV": "Canlı TV",
"HeaderNextUp": "Next Up", "HeaderNextUp": "Sonraki hafta",
"HeaderRecordingGroups": "Recording Groups", "HeaderRecordingGroups": "Recording Groups",
"HomeVideos": "Home videos", "HomeVideos": "Home videos",
"Inherit": "Inherit", "Inherit": "Inherit",
@ -38,7 +38,7 @@
"MessageNamedServerConfigurationUpdatedWithValue": "Server configuration section {0} has been updated", "MessageNamedServerConfigurationUpdatedWithValue": "Server configuration section {0} has been updated",
"MessageServerConfigurationUpdated": "Server configuration has been updated", "MessageServerConfigurationUpdated": "Server configuration has been updated",
"MixedContent": "Mixed content", "MixedContent": "Mixed content",
"Movies": "Movies", "Movies": "Filmler",
"Music": "Müzik", "Music": "Müzik",
"MusicVideos": "Müzik videoları", "MusicVideos": "Müzik videoları",
"NameInstallFailed": "{0} kurulum başarısız", "NameInstallFailed": "{0} kurulum başarısız",
@ -61,8 +61,8 @@
"NotificationOptionUserLockedOut": "User locked out", "NotificationOptionUserLockedOut": "User locked out",
"NotificationOptionVideoPlayback": "Video playback started", "NotificationOptionVideoPlayback": "Video playback started",
"NotificationOptionVideoPlaybackStopped": "Video playback stopped", "NotificationOptionVideoPlaybackStopped": "Video playback stopped",
"Photos": "Photos", "Photos": "Fotoğraflar",
"Playlists": "Playlists", "Playlists": "Çalma listeleri",
"Plugin": "Plugin", "Plugin": "Plugin",
"PluginInstalledWithName": "{0} was installed", "PluginInstalledWithName": "{0} was installed",
"PluginUninstalledWithName": "{0} was uninstalled", "PluginUninstalledWithName": "{0} was uninstalled",
@ -71,13 +71,13 @@
"ScheduledTaskFailedWithName": "{0} failed", "ScheduledTaskFailedWithName": "{0} failed",
"ScheduledTaskStartedWithName": "{0} started", "ScheduledTaskStartedWithName": "{0} started",
"ServerNameNeedsToBeRestarted": "{0} needs to be restarted", "ServerNameNeedsToBeRestarted": "{0} needs to be restarted",
"Shows": "Shows", "Shows": "Diziler",
"Songs": "Songs", "Songs": "Şarkılar",
"StartupEmbyServerIsLoading": "Jellyfin Server is loading. Please try again shortly.", "StartupEmbyServerIsLoading": "Jellyfin Server is loading. Please try again shortly.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}", "SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}", "SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}",
"SubtitlesDownloadedForItem": "Subtitles downloaded for {0}", "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}",
"Sync": "Sync", "Sync": "Eşitle",
"System": "System", "System": "System",
"TvShows": "TV Shows", "TvShows": "TV Shows",
"User": "User", "User": "User",
@ -92,6 +92,6 @@
"UserStartedPlayingItemWithValues": "{0} is playing {1} on {2}", "UserStartedPlayingItemWithValues": "{0} is playing {1} on {2}",
"UserStoppedPlayingItemWithValues": "{0} has finished playing {1} on {2}", "UserStoppedPlayingItemWithValues": "{0} has finished playing {1} on {2}",
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library", "ValueHasBeenAddedToLibrary": "{0} has been added to your media library",
"ValueSpecialEpisodeName": "Special - {0}", "ValueSpecialEpisodeName": "Özel -{0}",
"VersionNumber": "Version {0}" "VersionNumber": "Version {0}"
} }

View File

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

View File

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

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>jellyfin</AssemblyName> <AssemblyName>jellyfin</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup> </PropertyGroup>

View File

@ -84,6 +84,8 @@ namespace Jellyfin.Server
private static async Task StartApp(StartupOptions options) private static async Task StartApp(StartupOptions options)
{ {
var stopWatch = new Stopwatch();
stopWatch.Start();
ServerApplicationPaths appPaths = CreateApplicationPaths(options); ServerApplicationPaths appPaths = CreateApplicationPaths(options);
// $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager // $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager
@ -168,6 +170,10 @@ namespace Jellyfin.Server
await appHost.RunStartupTasksAsync().ConfigureAwait(false); await appHost.RunStartupTasksAsync().ConfigureAwait(false);
stopWatch.Stop();
_logger.LogInformation("Startup complete {Time:g}", stopWatch.Elapsed);
// Block main thread until shutdown // Block main thread until shutdown
await Task.Delay(-1, _tokenSource.Token).ConfigureAwait(false); await Task.Delay(-1, _tokenSource.Token).ConfigureAwait(false);
} }
@ -370,7 +376,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();

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
namespace MediaBrowser.Common.Configuration namespace MediaBrowser.Common.Configuration
@ -9,6 +11,7 @@ namespace MediaBrowser.Common.Configuration
/// </summary> /// </summary>
/// <value>The key.</value> /// <value>The key.</value>
public string Key { get; set; } public string Key { get; set; }
/// <summary> /// <summary>
/// Gets or sets the new configuration. /// Gets or sets the new configuration.
/// </summary> /// </summary>

View File

@ -77,7 +77,10 @@ namespace MediaBrowser.Common.Configuration
/// <value>The temp directory.</value> /// <value>The temp directory.</value>
string TempDirectory { get; } string TempDirectory { get; }
/// <summary>
/// Gets the magic string used for virtual path manipulation.
/// </summary>
/// <value>The magic string used for virtual path manipulation.</value>
string VirtualDataPath { get; } string VirtualDataPath { get; }
} }
} }

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.Collections.Generic; using System.Collections.Generic;
namespace MediaBrowser.Common.Extensions namespace MediaBrowser.Common.Extensions

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
namespace MediaBrowser.Common.Extensions namespace MediaBrowser.Common.Extensions

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Globalization; using System.Globalization;

View File

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Updates; using MediaBrowser.Model.Updates;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -31,6 +30,10 @@ namespace MediaBrowser.Common
/// <value><c>true</c> if this instance has pending kernel reload; otherwise, <c>false</c>.</value> /// <value><c>true</c> if this instance has pending kernel reload; otherwise, <c>false</c>.</value>
bool HasPendingRestart { get; } bool HasPendingRestart { get; }
/// <summary>
/// Gets or sets a value indicating whether this instance is currently shutting down.
/// </summary>
/// <value><c>true</c> if this instance is shutting down; otherwise, <c>false</c>.</value>
bool IsShuttingDown { get; } bool IsShuttingDown { get; }
/// <summary> /// <summary>
@ -39,6 +42,12 @@ namespace MediaBrowser.Common
/// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value> /// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>
bool CanSelfRestart { get; } bool CanSelfRestart { get; }
/// <summary>
/// Get the version class of the system.
/// </summary>
/// <value><see cref="PackageVersionClass.Release" /> or <see cref="PackageVersionClass.Beta" />.</value>
PackageVersionClass SystemUpdateLevel { get; }
/// <summary> /// <summary>
/// Occurs when [has pending restart changed]. /// Occurs when [has pending restart changed].
/// </summary> /// </summary>
@ -115,7 +124,5 @@ namespace MediaBrowser.Common
/// <param name="type">The type.</param> /// <param name="type">The type.</param>
/// <returns>System.Object.</returns> /// <returns>System.Object.</returns>
object CreateInstance(Type type); object CreateInstance(Type type);
PackageVersionClass SystemUpdateLevel { get; }
} }
} }

View File

@ -0,0 +1,20 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace MediaBrowser.Common.Json.Converters
{
/// <summary>
/// Converts a GUID object or value to/from JSON.
/// </summary>
public class GuidConverter : JsonConverter<Guid>
{
/// <inheritdoc />
public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
=> new Guid(reader.GetString());
/// <inheritdoc />
public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options)
=> writer.WriteStringValue(value);
}
}

View File

@ -0,0 +1,30 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using MediaBrowser.Common.Json.Converters;
namespace MediaBrowser.Common.Json
{
/// <summary>
/// Helper class for having compatible JSON throughout the codebase.
/// </summary>
public static class JsonDefaults
{
/// <summary>
/// Gets the default <see cref="JsonSerializerOptions" /> options.
/// </summary>
/// <returns>The default <see cref="JsonSerializerOptions" /> options.</returns>
public static JsonSerializerOptions GetOptions()
{
var options = new JsonSerializerOptions()
{
ReadCommentHandling = JsonCommentHandling.Disallow,
WriteIndented = false
};
options.Converters.Add(new GuidConverter());
options.Converters.Add(new JsonStringEnumConverter());
return options;
}
}
}

View File

@ -24,6 +24,7 @@
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
namespace MediaBrowser.Common.Net namespace MediaBrowser.Common.Net
{ {
public static class CustomHeaderNames public static class CustomHeaderNames

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.IO; using System.IO;
using System.Net; using System.Net;
@ -69,6 +71,7 @@ namespace MediaBrowser.Common.Net
ContentHeaders = contentHeader; ContentHeaders = contentHeader;
} }
/// <inheritdoc />
public void Dispose() public void Dispose()
{ {
// Only IDisposable for backwards compatibility // Only IDisposable for backwards compatibility

View File

@ -1,3 +1,4 @@
using System;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Net.Http; using System.Net.Http;
@ -25,12 +26,13 @@ namespace MediaBrowser.Common.Net
/// <summary> /// <summary>
/// Warning: Deprecated function, /// Warning: Deprecated function,
/// use 'Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead /// use 'Task{HttpResponseInfo} SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead
/// Sends the asynchronous. /// Sends the asynchronous.
/// </summary> /// </summary>
/// <param name="options">The options.</param> /// <param name="options">The options.</param>
/// <param name="httpMethod">The HTTP method.</param> /// <param name="httpMethod">The HTTP method.</param>
/// <returns>Task{HttpResponseInfo}.</returns> /// <returns>Task{HttpResponseInfo}.</returns>
[Obsolete("Use 'Task{HttpResponseInfo} SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead")]
Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, string httpMethod); Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, string httpMethod);
/// <summary> /// <summary>

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.IO; using System.IO;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Plugins;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
namespace MediaBrowser.Common.Progress namespace MediaBrowser.Common.Progress
@ -25,16 +27,9 @@ namespace MediaBrowser.Common.Progress
public void Report(T value) public void Report(T value)
{ {
if (ProgressChanged != null) ProgressChanged?.Invoke(this, value);
{
ProgressChanged(this, value);
}
var action = _action; _action?.Invoke(value);
if (action != null)
{
action(value);
}
} }
} }
@ -44,10 +39,7 @@ namespace MediaBrowser.Common.Progress
public void Report(T value) public void Report(T value)
{ {
if (ProgressChanged != null) ProgressChanged?.Invoke(this, value);
{
ProgressChanged(this, value);
}
} }
} }
} }

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.Collections.Generic; using System.Collections.Generic;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
@ -6,6 +8,7 @@ namespace MediaBrowser.Common.Providers
{ {
public class SubtitleConfigurationFactory : IConfigurationFactory public class SubtitleConfigurationFactory : IConfigurationFactory
{ {
/// <inheritdoc />
public IEnumerable<ConfigurationStore> GetConfigurations() public IEnumerable<ConfigurationStore> GetConfigurations()
{ {
yield return new ConfigurationStore() yield return new ConfigurationStore()

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using MediaBrowser.Model.Updates; using MediaBrowser.Model.Updates;
namespace MediaBrowser.Common.Updates namespace MediaBrowser.Common.Updates

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System; using System;
namespace MediaBrowser.Common.Updates namespace MediaBrowser.Common.Updates

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,10 +10,15 @@ namespace MediaBrowser.Controller.LiveTv
public interface IListingsProvider public interface IListingsProvider
{ {
string Name { get; } string Name { get; }
string Type { get; } string Type { get; }
Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken); Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken);
Task Validate(ListingsProviderInfo info, bool validateLogin, bool validateListings); Task Validate(ListingsProviderInfo info, bool validateLogin, bool validateListings);
Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string country, string location); Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string country, string location);
Task<List<ChannelInfo>> GetChannels(ListingsProviderInfo info, CancellationToken cancellationToken); Task<List<ChannelInfo>> GetChannels(ListingsProviderInfo info, CancellationToken cancellationToken);
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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[]

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More