From 8531ed646d7f1dcc62667ddf5cf082e14d7fb709 Mon Sep 17 00:00:00 2001
From: Peter Maar
Date: Sun, 9 Feb 2020 12:13:31 -0500
Subject: [PATCH 01/95] Temporary fix/change forcing yadif to "send_field"
---
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 342c764146..b4e1774065 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -2011,7 +2011,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
else
{
- filters.Add("yadif=0:-1:0");
+ filters.Add("yadif=1:-1:0");
}
}
From 7716deddf0c5a060b1d863ab4ff41835e3499476 Mon Sep 17 00:00:00 2001
From: Peter Maar
Date: Sat, 22 Feb 2020 17:01:56 -0500
Subject: [PATCH 02/95] Add encoding option bobandweave, change back the
EncodingHelper logic
---
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 2 +-
MediaBrowser.Model/Configuration/EncodingOptions.cs | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index b4e1774065..342c764146 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -2011,7 +2011,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
else
{
- filters.Add("yadif=1:-1:0");
+ filters.Add("yadif=0:-1:0");
}
}
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 9ae10d9809..5238930552 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -36,6 +36,7 @@ namespace MediaBrowser.Model.Configuration
VaapiDevice = "/dev/dri/renderD128";
H264Crf = 23;
H265Crf = 28;
+ DeinterlaceMethod = "bobandweave";
EnableHardwareEncoding = true;
EnableSubtitleExtraction = true;
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
From a07ee6536567a048b85d4bdc7d17e1c46f292572 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Sun, 23 Feb 2020 10:53:51 +0100
Subject: [PATCH 03/95] Minor improvements
---
.../ApplicationHost.cs | 9 +-
.../Data/SqliteItemRepository.cs | 11 +-
.../MediaEncoder/EncodingManager.cs | 40 +++---
.../Chapters/IChapterManager.cs | 5 +-
MediaBrowser.Controller/Entities/Folder.cs | 6 +-
.../Entities/IItemByName.cs | 2 +-
.../MediaEncoding/IEncodingManager.cs | 5 +-
.../Persistence/IItemRepository.cs | 2 +-
.../Providers/DirectoryService.cs | 8 +-
.../Providers/IDirectoryService.cs | 4 +-
.../Encoder/MediaEncoder.cs | 2 +-
.../Probing/ProbeResultNormalizer.cs | 7 +-
.../Chapters/ChapterManager.cs | 23 +---
.../Manager/ProviderManager.cs | 80 ++++++-----
.../MediaBrowser.Providers.csproj | 13 ++
.../MediaInfo/FFProbeProvider.cs | 14 +-
.../MediaInfo/FFProbeVideoInfo.cs | 128 ++++++++++--------
.../Music/MusicBrainzAlbumProvider.cs | 3 +-
.../Tmdb/Movies/TmdbMovieProvider.cs | 22 ++-
19 files changed, 214 insertions(+), 170 deletions(-)
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index fd01122669..a8f457390d 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -852,10 +852,15 @@ namespace Emby.Server.Implementations
serviceCollection.AddSingleton(new DeviceDiscovery(ServerConfigurationManager));
- ChapterManager = new ChapterManager(LibraryManager, LoggerFactory, ServerConfigurationManager, ItemRepository);
+ ChapterManager = new ChapterManager(ItemRepository);
serviceCollection.AddSingleton(ChapterManager);
- EncodingManager = new MediaEncoder.EncodingManager(FileSystemManager, LoggerFactory, MediaEncoder, ChapterManager, LibraryManager);
+ EncodingManager = new MediaEncoder.EncodingManager(
+ LoggerFactory.CreateLogger(),
+ FileSystemManager,
+ MediaEncoder,
+ ChapterManager,
+ LibraryManager);
serviceCollection.AddSingleton(EncodingManager);
var activityLogRepo = GetActivityLogRepository();
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 44f38504ab..b73609acbc 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -2006,7 +2006,7 @@ namespace Emby.Server.Implementations.Data
///
/// Saves the chapters.
///
- public void SaveChapters(Guid id, List chapters)
+ public void SaveChapters(Guid id, IReadOnlyList chapters)
{
CheckDisposed();
@@ -2035,22 +2035,24 @@ namespace Emby.Server.Implementations.Data
}
}
- private void InsertChapters(byte[] idBlob, List chapters, IDatabaseConnection db)
+ private void InsertChapters(byte[] idBlob, IReadOnlyList chapters, IDatabaseConnection db)
{
var startIndex = 0;
var limit = 100;
var chapterIndex = 0;
+ const string StartInsertText = "insert into " + ChaptersTableName + " (ItemId, ChapterIndex, StartPositionTicks, Name, ImagePath, ImageDateModified) values ";
+ var insertText = new StringBuilder(StartInsertText, 256);
+
while (startIndex < chapters.Count)
{
- var insertText = new StringBuilder("insert into " + ChaptersTableName + " (ItemId, ChapterIndex, StartPositionTicks, Name, ImagePath, ImageDateModified) values ");
-
var endIndex = Math.Min(chapters.Count, startIndex + limit);
for (var i = startIndex; i < endIndex; i++)
{
insertText.AppendFormat("(@ItemId, @ChapterIndex{0}, @StartPositionTicks{0}, @Name{0}, @ImagePath{0}, @ImageDateModified{0}),", i.ToString(CultureInfo.InvariantCulture));
}
+
insertText.Length -= 1; // Remove last ,
using (var statement = PrepareStatement(db, insertText.ToString()))
@@ -2077,6 +2079,7 @@ namespace Emby.Server.Implementations.Data
}
startIndex += limit;
+ insertText.Length = StartInsertText.Length;
}
}
diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
index 840aca7a6b..069c02b854 100644
--- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
+++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
@@ -26,14 +26,20 @@ namespace Emby.Server.Implementations.MediaEncoder
private readonly IChapterManager _chapterManager;
private readonly ILibraryManager _libraryManager;
+ ///
+ /// The first chapter ticks.
+ ///
+ private static readonly long _firstChapterTicks = TimeSpan.FromSeconds(15).Ticks;
+
public EncodingManager(
+ ILogger logger,
IFileSystem fileSystem,
- ILoggerFactory loggerFactory,
IMediaEncoder encoder,
- IChapterManager chapterManager, ILibraryManager libraryManager)
+ IChapterManager chapterManager,
+ ILibraryManager libraryManager)
{
+ _logger = logger;
_fileSystem = fileSystem;
- _logger = loggerFactory.CreateLogger(nameof(EncodingManager));
_encoder = encoder;
_chapterManager = chapterManager;
_libraryManager = libraryManager;
@@ -97,12 +103,7 @@ namespace Emby.Server.Implementations.MediaEncoder
return video.DefaultVideoStreamIndex.HasValue;
}
- ///
- /// The first chapter ticks
- ///
- private static readonly long FirstChapterTicks = TimeSpan.FromSeconds(15).Ticks;
-
- public async Task RefreshChapterImages(Video video, IDirectoryService directoryService, List chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken)
+ public async Task RefreshChapterImages(Video video, IDirectoryService directoryService, IReadOnlyList chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken)
{
if (!IsEligibleForChapterImageExtraction(video))
{
@@ -135,7 +136,7 @@ namespace Emby.Server.Implementations.MediaEncoder
try
{
// Add some time for the first chapter to make sure we don't end up with a black image
- var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(FirstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks);
+ var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(_firstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks);
var protocol = MediaProtocol.File;
@@ -152,9 +153,9 @@ namespace Emby.Server.Implementations.MediaEncoder
{
_fileSystem.DeleteFile(tempFile);
}
- catch
+ catch (IOException ex)
{
-
+ _logger.LogError(ex, "Error deleting {Path}", tempFile);
}
chapter.ImagePath = path;
@@ -184,7 +185,7 @@ namespace Emby.Server.Implementations.MediaEncoder
if (saveChapters && changesMade)
{
- _chapterManager.SaveChapters(video.Id.ToString(), chapters);
+ _chapterManager.SaveChapters(video.Id, chapters);
}
DeleteDeadImages(currentImages, chapters);
@@ -199,22 +200,21 @@ namespace Emby.Server.Implementations.MediaEncoder
return Path.Combine(GetChapterImagesPath(video), filename);
}
- private static List GetSavedChapterImages(Video video, IDirectoryService directoryService)
+ private static IReadOnlyList GetSavedChapterImages(Video video, IDirectoryService directoryService)
{
var path = GetChapterImagesPath(video);
if (!Directory.Exists(path))
{
- return new List();
+ return Array.Empty();
}
try
{
- return directoryService.GetFilePaths(path)
- .ToList();
+ return directoryService.GetFilePaths(path);
}
catch (IOException)
{
- return new List();
+ return Array.Empty();
}
}
@@ -227,7 +227,7 @@ namespace Emby.Server.Implementations.MediaEncoder
foreach (var image in deadImages)
{
- _logger.LogDebug("Deleting dead chapter image {path}", image);
+ _logger.LogDebug("Deleting dead chapter image {Path}", image);
try
{
@@ -235,7 +235,7 @@ namespace Emby.Server.Implementations.MediaEncoder
}
catch (IOException ex)
{
- _logger.LogError(ex, "Error deleting {path}.", image);
+ _logger.LogError(ex, "Error deleting {Path}.", image);
}
}
}
diff --git a/MediaBrowser.Controller/Chapters/IChapterManager.cs b/MediaBrowser.Controller/Chapters/IChapterManager.cs
index d061898a14..f82e5b41a2 100644
--- a/MediaBrowser.Controller/Chapters/IChapterManager.cs
+++ b/MediaBrowser.Controller/Chapters/IChapterManager.cs
@@ -1,16 +1,17 @@
+using System;
using System.Collections.Generic;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Chapters
{
///
- /// Interface IChapterManager
+ /// Interface IChapterManager.
///
public interface IChapterManager
{
///
/// Saves the chapters.
///
- void SaveChapters(string itemId, List chapters);
+ void SaveChapters(Guid itemId, IReadOnlyList chapters);
}
}
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index 07fbe60350..9296ae4fd4 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -28,7 +31,6 @@ namespace MediaBrowser.Controller.Entities
///
public class Folder : BaseItem
{
- public static IUserManager UserManager { get; set; }
public static IUserViewManager UserViewManager { get; set; }
///
@@ -620,7 +622,6 @@ namespace MediaBrowser.Controller.Entities
{
EnableImages = false
}
-
}).TotalRecordCount;
}
@@ -1672,7 +1673,6 @@ namespace MediaBrowser.Controller.Entities
{
EnableImages = false
}
-
});
double unplayedCount = unplayedQueryResult.TotalRecordCount;
diff --git a/MediaBrowser.Controller/Entities/IItemByName.cs b/MediaBrowser.Controller/Entities/IItemByName.cs
index 89b5dfee36..8ef5c8d961 100644
--- a/MediaBrowser.Controller/Entities/IItemByName.cs
+++ b/MediaBrowser.Controller/Entities/IItemByName.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace MediaBrowser.Controller.Entities
{
///
- /// Marker interface
+ /// Marker interface.
///
public interface IItemByName
{
diff --git a/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs b/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs
index e560999e8f..7063d39398 100644
--- a/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs
+++ b/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -12,6 +15,6 @@ namespace MediaBrowser.Controller.MediaEncoding
///
/// Refreshes the chapter images.
///
- Task RefreshChapterImages(Video video, IDirectoryService directoryService, List chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken);
+ Task RefreshChapterImages(Video video, IDirectoryService directoryService, IReadOnlyList chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs
index 5a5b7f58f0..eb5a8ded84 100644
--- a/MediaBrowser.Controller/Persistence/IItemRepository.cs
+++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs
@@ -61,7 +61,7 @@ namespace MediaBrowser.Controller.Persistence
///
/// Saves the chapters.
///
- void SaveChapters(Guid id, List chapters);
+ void SaveChapters(Guid id, IReadOnlyList chapters);
///
/// Gets the media streams.
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs
index 303b03a216..b4dcb54415 100644
--- a/MediaBrowser.Controller/Providers/DirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/DirectoryService.cs
@@ -69,12 +69,10 @@ namespace MediaBrowser.Controller.Providers
//return _fileSystem.GetFileInfo(path);
}
- public List GetFilePaths(string path)
- {
- return GetFilePaths(path, false);
- }
+ public IReadOnlyList GetFilePaths(string path)
+ => GetFilePaths(path, false);
- public List GetFilePaths(string path, bool clearCache)
+ public IReadOnlyList GetFilePaths(string path, bool clearCache)
{
if (clearCache || !_filePathCache.TryGetValue(path, out List result))
{
diff --git a/MediaBrowser.Controller/Providers/IDirectoryService.cs b/MediaBrowser.Controller/Providers/IDirectoryService.cs
index 8059d2bd13..e3815facc4 100644
--- a/MediaBrowser.Controller/Providers/IDirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/IDirectoryService.cs
@@ -9,7 +9,7 @@ namespace MediaBrowser.Controller.Providers
List GetFiles(string path);
FileSystemMetadata GetFile(string path);
- List GetFilePaths(string path);
- List GetFilePaths(string path, bool clearCache);
+ IReadOnlyList GetFilePaths(string path);
+ IReadOnlyList GetFilePaths(string path, bool clearCache);
}
}
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 4123f0203a..c3a5e21d94 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -429,7 +429,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
}
- return new ProbeResultNormalizer(_logger, _fileSystem, _localization).GetMediaInfo(result, videoType, isAudio, primaryPath, protocol);
+ return new ProbeResultNormalizer(_logger, _localization).GetMediaInfo(result, videoType, isAudio, primaryPath, protocol);
}
}
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
index f8047af426..ac626f9f81 100644
--- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
+++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
@@ -9,7 +9,6 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Globalization;
-using MediaBrowser.Model.IO;
using MediaBrowser.Model.MediaInfo;
using Microsoft.Extensions.Logging;
@@ -19,13 +18,11 @@ namespace MediaBrowser.MediaEncoding.Probing
{
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
private readonly ILogger _logger;
- private readonly IFileSystem _fileSystem;
private readonly ILocalizationManager _localization;
- public ProbeResultNormalizer(ILogger logger, IFileSystem fileSystem, ILocalizationManager localization)
+ public ProbeResultNormalizer(ILogger logger, ILocalizationManager localization)
{
_logger = logger;
- _fileSystem = fileSystem;
_localization = localization;
}
@@ -40,7 +37,7 @@ namespace MediaBrowser.MediaEncoding.Probing
FFProbeHelpers.NormalizeFFProbeResult(data);
SetSize(data, info);
- var internalStreams = data.Streams ?? new MediaStreamInfo[] { };
+ var internalStreams = data.Streams ?? Array.Empty();
info.MediaStreams = internalStreams.Select(s => GetMediaStream(isAudio, s, data.Format))
.Where(i => i != null)
diff --git a/MediaBrowser.Providers/Chapters/ChapterManager.cs b/MediaBrowser.Providers/Chapters/ChapterManager.cs
index 45e87f137e..242fc84f6e 100644
--- a/MediaBrowser.Providers/Chapters/ChapterManager.cs
+++ b/MediaBrowser.Providers/Chapters/ChapterManager.cs
@@ -1,36 +1,27 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.Collections.Generic;
using MediaBrowser.Controller.Chapters;
-using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Entities;
-using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.Chapters
{
public class ChapterManager : IChapterManager
{
- private readonly ILibraryManager _libraryManager;
- private readonly ILogger _logger;
- private readonly IServerConfigurationManager _config;
private readonly IItemRepository _itemRepo;
- public ChapterManager(
- ILibraryManager libraryManager,
- ILoggerFactory loggerFactory,
- IServerConfigurationManager config,
- IItemRepository itemRepo)
+ public ChapterManager(IItemRepository itemRepo)
{
- _libraryManager = libraryManager;
- _logger = loggerFactory.CreateLogger(nameof(ChapterManager));
- _config = config;
_itemRepo = itemRepo;
}
- public void SaveChapters(string itemId, List chapters)
+ ///
+ public void SaveChapters(Guid itemId, IReadOnlyList chapters)
{
- _itemRepo.SaveChapters(new Guid(itemId), chapters);
+ _itemRepo.SaveChapters(itemId, chapters);
}
}
}
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index e7b349f67b..ae1e0492bf 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -1,5 +1,10 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
+using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading;
@@ -897,7 +902,10 @@ namespace MediaBrowser.Providers.Manager
return new ExternalUrl
{
Name = i.Name,
- Url = string.Format(i.UrlFormatString, value)
+ Url = string.Format(
+ CultureInfo.InvariantCulture,
+ i.UrlFormatString,
+ value)
};
}).Where(i => i != null).Concat(item.GetRelatedUrls());
@@ -911,11 +919,10 @@ namespace MediaBrowser.Providers.Manager
Name = i.Name,
Key = i.Key,
UrlFormatString = i.UrlFormatString
-
});
}
- private Dictionary _activeRefreshes = new Dictionary();
+ private ConcurrentDictionary _activeRefreshes = new ConcurrentDictionary();
public Dictionary GetRefreshQueue()
{
@@ -927,65 +934,56 @@ namespace MediaBrowser.Providers.Manager
{
dict[item.Item1] = item.Item1;
}
+
return dict;
}
}
public void OnRefreshStart(BaseItem item)
{
- //_logger.LogInformation("OnRefreshStart {0}", item.Id.ToString("N", CultureInfo.InvariantCulture));
- var id = item.Id;
-
- lock (_activeRefreshes)
- {
- _activeRefreshes[id] = 0;
- }
-
+ _logger.LogInformation("OnRefreshStart {0}", item.Id.ToString("N", CultureInfo.InvariantCulture));
+ _activeRefreshes[item.Id] = 0;
RefreshStarted?.Invoke(this, new GenericEventArgs(item));
}
public void OnRefreshComplete(BaseItem item)
{
- //_logger.LogInformation("OnRefreshComplete {0}", item.Id.ToString("N", CultureInfo.InvariantCulture));
- lock (_activeRefreshes)
- {
- _activeRefreshes.Remove(item.Id);
- }
+ _logger.LogInformation("OnRefreshComplete {0}", item.Id.ToString("N", CultureInfo.InvariantCulture));
+
+ _activeRefreshes.Remove(item.Id, out _);
RefreshCompleted?.Invoke(this, new GenericEventArgs(item));
}
public double? GetRefreshProgress(Guid id)
{
- lock (_activeRefreshes)
+ if (_activeRefreshes.TryGetValue(id, out double value))
{
- if (_activeRefreshes.TryGetValue(id, out double value))
- {
- return value;
- }
-
- return null;
+ return value;
}
+
+ return null;
}
public void OnRefreshProgress(BaseItem item, double progress)
{
- //_logger.LogInformation("OnRefreshProgress {0} {1}", item.Id.ToString("N", CultureInfo.InvariantCulture), progress);
var id = item.Id;
+ _logger.LogInformation("OnRefreshProgress {0} {1}", id.ToString("N", CultureInfo.InvariantCulture), progress);
- lock (_activeRefreshes)
+ if (_activeRefreshes.ContainsKey(id))
{
- if (_activeRefreshes.ContainsKey(id))
- {
- _activeRefreshes[id] = progress;
-
- RefreshProgress?.Invoke(this, new GenericEventArgs>(new Tuple(item, progress)));
- }
- else
- {
- // TODO: Need to hunt down the conditions for this happening
- //throw new Exception(string.Format("Refresh for item {0} {1} is not in progress", item.GetType().Name, item.Id.ToString("N", CultureInfo.InvariantCulture)));
- }
+ _activeRefreshes[id] = progress;
+ RefreshProgress?.Invoke(this, new GenericEventArgs>(new Tuple(item, progress)));
+ }
+ else
+ {
+ // TODO: Need to hunt down the conditions for this happening
+ throw new Exception(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ "Refresh for item {0} {1} is not in progress",
+ item.GetType().Name,
+ item.Id.ToString("N", CultureInfo.InvariantCulture)));
}
}
@@ -1040,10 +1038,9 @@ namespace MediaBrowser.Providers.Manager
// Try to throttle this a little bit.
await Task.Delay(100).ConfigureAwait(false);
- var artist = item as MusicArtist;
- var task = artist == null
- ? RefreshItem(item, refreshItem.Item2, cancellationToken)
- : RefreshArtist(artist, refreshItem.Item2, cancellationToken);
+ var task = item is MusicArtist artist
+ ? RefreshArtist(artist, refreshItem.Item2, cancellationToken)
+ : RefreshItem(item, refreshItem.Item2, cancellationToken);
await task.ConfigureAwait(false);
}
@@ -1125,8 +1122,7 @@ namespace MediaBrowser.Providers.Manager
}
}
- public Task RefreshFullItem(BaseItem item, MetadataRefreshOptions options,
- CancellationToken cancellationToken)
+ public Task RefreshFullItem(BaseItem item, MetadataRefreshOptions options, CancellationToken cancellationToken)
{
return RefreshItem(item, options, cancellationToken);
}
diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
index 5593c5036c..4e33d0048e 100644
--- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj
+++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
@@ -22,6 +22,19 @@
netstandard2.1
false
true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ ../jellyfin.ruleset
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
index 4e11fcbb2a..95808eb1a6 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
@@ -177,7 +177,19 @@ namespace MediaBrowser.Providers.MediaInfo
FetchShortcutInfo(item);
}
- var prober = new FFProbeVideoInfo(_logger, _mediaSourceManager, _isoManager, _mediaEncoder, _itemRepo, _blurayExaminer, _localization, _appPaths, _json, _encodingManager, _fileSystem, _config, _subtitleManager, _chapterManager, _libraryManager);
+ var prober = new FFProbeVideoInfo(
+ _logger,
+ _mediaSourceManager,
+ _mediaEncoder,
+ _itemRepo,
+ _blurayExaminer,
+ _localization,
+ _encodingManager,
+ _fileSystem,
+ _config,
+ _subtitleManager,
+ _chapterManager,
+ _libraryManager);
return prober.ProbeVideo(item, options, cancellationToken);
}
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
index 2b178d4d4e..ea1db88ba4 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -25,7 +28,6 @@ using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Providers;
-using MediaBrowser.Model.Serialization;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.MediaInfo
@@ -33,13 +35,10 @@ namespace MediaBrowser.Providers.MediaInfo
public class FFProbeVideoInfo
{
private readonly ILogger _logger;
- private readonly IIsoManager _isoManager;
private readonly IMediaEncoder _mediaEncoder;
private readonly IItemRepository _itemRepo;
private readonly IBlurayExaminer _blurayExaminer;
private readonly ILocalizationManager _localization;
- private readonly IApplicationPaths _appPaths;
- private readonly IJsonSerializer _json;
private readonly IEncodingManager _encodingManager;
private readonly IFileSystem _fileSystem;
private readonly IServerConfigurationManager _config;
@@ -48,16 +47,30 @@ namespace MediaBrowser.Providers.MediaInfo
private readonly ILibraryManager _libraryManager;
private readonly IMediaSourceManager _mediaSourceManager;
- public FFProbeVideoInfo(ILogger logger, IMediaSourceManager mediaSourceManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IItemRepository itemRepo, IBlurayExaminer blurayExaminer, ILocalizationManager localization, IApplicationPaths appPaths, IJsonSerializer json, IEncodingManager encodingManager, IFileSystem fileSystem, IServerConfigurationManager config, ISubtitleManager subtitleManager, IChapterManager chapterManager, ILibraryManager libraryManager)
+ ///
+ /// The dummy chapter duration.
+ ///
+ private readonly long _dummyChapterDuration = TimeSpan.FromMinutes(5).Ticks;
+
+ public FFProbeVideoInfo(
+ ILogger logger,
+ IMediaSourceManager mediaSourceManager,
+ IMediaEncoder mediaEncoder,
+ IItemRepository itemRepo,
+ IBlurayExaminer blurayExaminer,
+ ILocalizationManager localization,
+ IEncodingManager encodingManager,
+ IFileSystem fileSystem,
+ IServerConfigurationManager config,
+ ISubtitleManager subtitleManager,
+ IChapterManager chapterManager,
+ ILibraryManager libraryManager)
{
_logger = logger;
- _isoManager = isoManager;
_mediaEncoder = mediaEncoder;
_itemRepo = itemRepo;
_blurayExaminer = blurayExaminer;
_localization = localization;
- _appPaths = appPaths;
- _json = json;
_encodingManager = encodingManager;
_fileSystem = fileSystem;
_config = config;
@@ -159,7 +172,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
List mediaStreams;
IReadOnlyList mediaAttachments;
- List chapters;
+ ChapterInfo[] chapters;
if (mediaInfo != null)
{
@@ -191,17 +204,17 @@ namespace MediaBrowser.Providers.MediaInfo
}
video.Container = mediaInfo.Container;
- chapters = mediaInfo.Chapters == null ? new List() : mediaInfo.Chapters.ToList();
+ chapters = mediaInfo.Chapters == null ? Array.Empty() : mediaInfo.Chapters;
if (blurayInfo != null)
{
- FetchBdInfo(video, chapters, mediaStreams, blurayInfo);
+ FetchBdInfo(video, ref chapters, mediaStreams, blurayInfo);
}
}
else
{
mediaStreams = new List();
mediaAttachments = Array.Empty();
- chapters = new List();
+ chapters = Array.Empty();
}
await AddExternalSubtitles(video, mediaStreams, options, cancellationToken).ConfigureAwait(false);
@@ -231,9 +244,9 @@ namespace MediaBrowser.Providers.MediaInfo
if (options.MetadataRefreshMode == MetadataRefreshMode.FullRefresh ||
options.MetadataRefreshMode == MetadataRefreshMode.Default)
{
- if (chapters.Count == 0 && mediaStreams.Any(i => i.Type == MediaStreamType.Video))
+ if (chapters.Length == 0 && mediaStreams.Any(i => i.Type == MediaStreamType.Video))
{
- AddDummyChapters(video, chapters);
+ CreateDummyChapters(video, ref chapters);
}
NormalizeChapterNames(chapters);
@@ -246,28 +259,29 @@ namespace MediaBrowser.Providers.MediaInfo
await _encodingManager.RefreshChapterImages(video, options.DirectoryService, chapters, extractDuringScan, false, cancellationToken).ConfigureAwait(false);
- _chapterManager.SaveChapters(video.Id.ToString(), chapters);
+ _chapterManager.SaveChapters(video.Id, chapters);
}
}
- private void NormalizeChapterNames(List chapters)
+ private void NormalizeChapterNames(ChapterInfo[] chapters)
{
- var index = 1;
-
- foreach (var chapter in chapters)
+ for (int i = 0; i < chapters.Length; i++)
{
+ string name = chapters[i].Name;
// Check if the name is empty and/or if the name is a time
// Some ripping programs do that.
- if (string.IsNullOrWhiteSpace(chapter.Name) ||
- TimeSpan.TryParse(chapter.Name, out var time))
+ if (string.IsNullOrWhiteSpace(name) ||
+ TimeSpan.TryParse(name, out _))
{
- chapter.Name = string.Format(_localization.GetLocalizedString("ChapterNameValue"), index.ToString(CultureInfo.InvariantCulture));
+ chapters[i].Name = string.Format(
+ CultureInfo.InvariantCulture,
+ _localization.GetLocalizedString("ChapterNameValue"),
+ (i + 1).ToString(CultureInfo.InvariantCulture));
}
- index++;
}
}
- private void FetchBdInfo(BaseItem item, List chapters, List mediaStreams, BlurayDiscInfo blurayInfo)
+ private void FetchBdInfo(BaseItem item, ref ChapterInfo[] chapters, List mediaStreams, BlurayDiscInfo blurayInfo)
{
var video = (Video)item;
@@ -301,13 +315,15 @@ namespace MediaBrowser.Providers.MediaInfo
if (blurayInfo.Chapters != null)
{
- chapters.Clear();
-
- chapters.AddRange(blurayInfo.Chapters.Select(c => new ChapterInfo
+ double[] brChapter = blurayInfo.Chapters;
+ chapters = new ChapterInfo[brChapter.Length];
+ for (int i = 0; i < brChapter.Length; i++)
{
- StartPositionTicks = TimeSpan.FromSeconds(c).Ticks
-
- }));
+ chapters[i] = new ChapterInfo
+ {
+ StartPositionTicks = TimeSpan.FromSeconds(brChapter[i]).Ticks
+ };
+ }
}
videoStream = mediaStreams.FirstOrDefault(s => s.Type == MediaStreamType.Video);
@@ -495,17 +511,17 @@ namespace MediaBrowser.Providers.MediaInfo
var libraryOptions = _libraryManager.GetLibraryOptions(video);
string[] subtitleDownloadLanguages;
- bool SkipIfEmbeddedSubtitlesPresent;
- bool SkipIfAudioTrackMatches;
- bool RequirePerfectMatch;
+ bool skipIfEmbeddedSubtitlesPresent;
+ bool skipIfAudioTrackMatches;
+ bool requirePerfectMatch;
bool enabled;
if (libraryOptions.SubtitleDownloadLanguages == null)
{
subtitleDownloadLanguages = subtitleOptions.DownloadLanguages;
- SkipIfEmbeddedSubtitlesPresent = subtitleOptions.SkipIfEmbeddedSubtitlesPresent;
- SkipIfAudioTrackMatches = subtitleOptions.SkipIfAudioTrackMatches;
- RequirePerfectMatch = subtitleOptions.RequirePerfectMatch;
+ skipIfEmbeddedSubtitlesPresent = subtitleOptions.SkipIfEmbeddedSubtitlesPresent;
+ skipIfAudioTrackMatches = subtitleOptions.SkipIfAudioTrackMatches;
+ requirePerfectMatch = subtitleOptions.RequirePerfectMatch;
enabled = (subtitleOptions.DownloadEpisodeSubtitles &&
video is Episode) ||
(subtitleOptions.DownloadMovieSubtitles &&
@@ -514,9 +530,9 @@ namespace MediaBrowser.Providers.MediaInfo
else
{
subtitleDownloadLanguages = libraryOptions.SubtitleDownloadLanguages;
- SkipIfEmbeddedSubtitlesPresent = libraryOptions.SkipSubtitlesIfEmbeddedSubtitlesPresent;
- SkipIfAudioTrackMatches = libraryOptions.SkipSubtitlesIfAudioTrackMatches;
- RequirePerfectMatch = libraryOptions.RequirePerfectSubtitleMatch;
+ skipIfEmbeddedSubtitlesPresent = libraryOptions.SkipSubtitlesIfEmbeddedSubtitlesPresent;
+ skipIfAudioTrackMatches = libraryOptions.SkipSubtitlesIfAudioTrackMatches;
+ requirePerfectMatch = libraryOptions.RequirePerfectSubtitleMatch;
enabled = true;
}
@@ -526,9 +542,9 @@ namespace MediaBrowser.Providers.MediaInfo
_subtitleManager)
.DownloadSubtitles(video,
currentStreams.Concat(externalSubtitleStreams).ToList(),
- SkipIfEmbeddedSubtitlesPresent,
- SkipIfAudioTrackMatches,
- RequirePerfectMatch,
+ skipIfEmbeddedSubtitlesPresent,
+ skipIfAudioTrackMatches,
+ requirePerfectMatch,
subtitleDownloadLanguages,
libraryOptions.DisabledSubtitleFetchers,
libraryOptions.SubtitleFetcherOrder,
@@ -546,23 +562,23 @@ namespace MediaBrowser.Providers.MediaInfo
currentStreams.AddRange(externalSubtitleStreams);
}
- ///
- /// The dummy chapter duration
- ///
- private readonly long _dummyChapterDuration = TimeSpan.FromMinutes(5).Ticks;
-
///
/// Adds the dummy chapters.
///
/// The video.
/// The chapters.
- private void AddDummyChapters(Video video, List chapters)
+ private void CreateDummyChapters(Video video, ref ChapterInfo[] chapters)
{
var runtime = video.RunTimeTicks ?? 0;
if (runtime < 0)
{
- throw new ArgumentException(string.Format("{0} has invalid runtime of {1}", video.Name, runtime));
+ throw new ArgumentException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} has invalid runtime of {1}",
+ video.Name,
+ runtime));
}
if (runtime < _dummyChapterDuration)
@@ -570,18 +586,18 @@ namespace MediaBrowser.Providers.MediaInfo
return;
}
- long currentChapterTicks = 0;
- var index = 1;
-
// Limit to 100 chapters just in case there's some incorrect metadata here
- while (currentChapterTicks < runtime && index < 100)
+ int chapterCount = (int)Math.Min(runtime / _dummyChapterDuration, 100);
+ chapters = new ChapterInfo[chapterCount];
+
+ long currentChapterTicks = 0;
+ for (int i = 0; i < chapterCount; i++)
{
- chapters.Add(new ChapterInfo
+ chapters[i] = new ChapterInfo
{
StartPositionTicks = currentChapterTicks
- });
+ };
- index++;
currentChapterTicks += _dummyChapterDuration;
}
}
diff --git a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
index 8e71b625ee..3e276ba376 100644
--- a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
+++ b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
@@ -5,6 +5,7 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
+using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -776,7 +777,7 @@ namespace MediaBrowser.Providers.Music
_logger.LogDebug("GetMusicBrainzResponse: Time since previous request: {0} ms", _stopWatchMusicBrainz.ElapsedMilliseconds);
_stopWatchMusicBrainz.Restart();
- response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false);
+ response = await _httpClient.SendAsync(options, HttpMethod.Get).ConfigureAwait(false);
// We retry a finite number of times, and only whilst MB is indcating 503 (throttling)
}
diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieProvider.cs b/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieProvider.cs
index 861847f71f..e2fd5b9e30 100644
--- a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieProvider.cs
+++ b/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieProvider.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
+using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common;
@@ -36,20 +37,25 @@ namespace MediaBrowser.Providers.Tmdb.Movies
private readonly IFileSystem _fileSystem;
private readonly IServerConfigurationManager _configurationManager;
private readonly ILogger _logger;
- private readonly ILocalizationManager _localization;
private readonly ILibraryManager _libraryManager;
private readonly IApplicationHost _appHost;
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
- public TmdbMovieProvider(IJsonSerializer jsonSerializer, IHttpClient httpClient, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILogger logger, ILocalizationManager localization, ILibraryManager libraryManager, IApplicationHost appHost)
+ public TmdbMovieProvider(
+ IJsonSerializer jsonSerializer,
+ IHttpClient httpClient,
+ IFileSystem fileSystem,
+ IServerConfigurationManager configurationManager,
+ ILogger logger,
+ ILibraryManager libraryManager,
+ IApplicationHost appHost)
{
_jsonSerializer = jsonSerializer;
_httpClient = httpClient;
_fileSystem = fileSystem;
_configurationManager = configurationManager;
_logger = logger;
- _localization = localization;
_libraryManager = libraryManager;
_appHost = appHost;
Current = this;
@@ -401,15 +407,15 @@ namespace MediaBrowser.Providers.Tmdb.Movies
private static long _lastRequestTicks;
// The limit is 40 requests per 10 seconds
- private static int requestIntervalMs = 300;
+ private const int RequestIntervalMs = 300;
///
/// Gets the movie db response.
///
internal async Task GetMovieDbResponse(HttpRequestOptions options)
{
- var delayTicks = (requestIntervalMs * 10000) - (DateTime.UtcNow.Ticks - _lastRequestTicks);
- var delayMs = Math.Min(delayTicks / 10000, requestIntervalMs);
+ var delayTicks = (RequestIntervalMs * 10000) - (DateTime.UtcNow.Ticks - _lastRequestTicks);
+ var delayMs = Math.Min(delayTicks / 10000, RequestIntervalMs);
if (delayMs > 0)
{
@@ -422,11 +428,13 @@ namespace MediaBrowser.Providers.Tmdb.Movies
options.BufferContent = true;
options.UserAgent = _appHost.ApplicationUserAgent;
- return await _httpClient.SendAsync(options, "GET").ConfigureAwait(false);
+ return await _httpClient.SendAsync(options, HttpMethod.Get).ConfigureAwait(false);
}
+ ///
public int Order => 1;
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClient.GetResponse(new HttpRequestOptions
From 6d6fa1355063e9ee2773c579b2c4fdbf8370b3ec Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Sun, 23 Feb 2020 10:58:45 +0100
Subject: [PATCH 04/95] Fix release build
---
MediaBrowser.Providers/MediaBrowser.Providers.csproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
index 4e33d0048e..d0ed61c833 100644
--- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj
+++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
@@ -22,7 +22,6 @@
netstandard2.1
false
true
- true
From 818695a01e007ce507d4518aefc520870989964d Mon Sep 17 00:00:00 2001
From: Peter Maar
Date: Sun, 23 Feb 2020 21:40:53 -0500
Subject: [PATCH 05/95] Improve controls for deinterlace method; matches with
jellyfin-web changes
---
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 2 +-
MediaBrowser.Model/Configuration/EncodingOptions.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 342c764146..d056c13921 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -2005,7 +2005,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var inputFramerate = videoStream?.RealFrameRate;
// If it is already 60fps then it will create an output framerate that is much too high for roku and others to handle
- if (string.Equals(options.DeinterlaceMethod, "bobandweave", StringComparison.OrdinalIgnoreCase) && (inputFramerate ?? 60) <= 30)
+ if (string.Equals(options.DeinterlaceMethod, "yadif_bob", StringComparison.OrdinalIgnoreCase) && (inputFramerate ?? 60) <= 30)
{
filters.Add("yadif=1:-1:0");
}
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 5238930552..defea13a4a 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -36,7 +36,7 @@ namespace MediaBrowser.Model.Configuration
VaapiDevice = "/dev/dri/renderD128";
H264Crf = 23;
H265Crf = 28;
- DeinterlaceMethod = "bobandweave";
+ DeinterlaceMethod = "yadif";
EnableHardwareEncoding = true;
EnableSubtitleExtraction = true;
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
From 26af5ea45a8ea02b7a3f20b0ebc31ef19f850dea Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Tue, 25 Feb 2020 16:51:36 +0100
Subject: [PATCH 06/95] Do not set a static content root if the jellyfin-web
directory does not exist or is empty
---
.../AppBase/BaseApplicationPaths.cs | 2 +-
.../ApplicationHost.cs | 2 +-
Jellyfin.Server/Program.cs | 20 ++++++++++++++++---
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
index c3cdcc2222..be2d198efc 100644
--- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
+++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
@@ -40,7 +40,7 @@ namespace Emby.Server.Implementations.AppBase
///
/// Gets the path to the web UI resources folder.
///
- /// The web UI resources path.
+ /// The web UI resources path, or null if the server is not hosting any web content.
public string WebPath { get; }
///
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 8ea188724a..a5b88f64f2 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -240,7 +240,7 @@ namespace Emby.Server.Implementations
public int HttpsPort { get; private set; }
///
- /// Gets the content root for the webhost.
+ /// Gets the content root for the webhost. If the webhost is not serving static web content, this will be null.
///
public string ContentRoot { get; private set; }
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 1dd598236b..2ce7379fba 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -222,7 +222,7 @@ namespace Jellyfin.Server
private static IWebHostBuilder CreateWebHostBuilder(ApplicationHost appHost, IServiceCollection serviceCollection)
{
- return new WebHostBuilder()
+ var webhostBuilder = new WebHostBuilder()
.UseKestrel(options =>
{
var addresses = appHost.ServerConfigurationManager
@@ -260,13 +260,20 @@ namespace Jellyfin.Server
}
}
})
- .UseContentRoot(appHost.ContentRoot)
.ConfigureServices(services =>
{
// Merge the external ServiceCollection into ASP.NET DI
services.TryAdd(serviceCollection);
})
.UseStartup();
+
+ // Set the root directory for static content, if one exists
+ if (!string.IsNullOrEmpty(appHost.ContentRoot))
+ {
+ webhostBuilder.UseContentRoot(appHost.ContentRoot);
+ }
+
+ return webhostBuilder;
}
///
@@ -383,7 +390,7 @@ namespace Jellyfin.Server
// webDir
// IF --webdir
// ELSE IF $JELLYFIN_WEB_DIR
- // ELSE use /jellyfin-web
+ // ELSE /jellyfin-web
var webDir = options.WebDir;
if (string.IsNullOrEmpty(webDir))
@@ -397,6 +404,13 @@ namespace Jellyfin.Server
}
}
+ // Reset webDir if the directory does not exist, or is empty
+ if (!Directory.Exists(webDir) || !Directory.GetFiles(webDir).Any())
+ {
+ _logger.LogInformation("Server will not host static content because the web content directory does not exist or is empty: {ContentRoot}", webDir);
+ webDir = null;
+ }
+
// logDir
// IF --logdir
// ELSE IF $JELLYFIN_LOG_DIR
From 1b5999a1bc11ee386131e4bbce561896c0e1bced Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Tue, 25 Feb 2020 17:01:57 +0100
Subject: [PATCH 07/95] Open the Swagger API page on server start if not
hosting the static web content
---
Emby.Server.Implementations/ApplicationHost.cs | 3 +++
Emby.Server.Implementations/Browser/BrowserLauncher.cs | 10 ++++++++++
.../EntryPoints/StartupWizard.cs | 6 +++++-
MediaBrowser.Controller/IServerApplicationHost.cs | 5 +++++
4 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index a5b88f64f2..789b8724c3 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -244,6 +244,9 @@ namespace Emby.Server.Implementations
///
public string ContentRoot { get; private set; }
+ ///
+ public bool IsHostingContent => ContentRoot != null;
+
///
/// Gets the server configuration manager.
///
diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
index f5da0d0183..b17c2b2700 100644
--- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs
+++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
@@ -29,6 +29,16 @@ namespace Emby.Server.Implementations.Browser
OpenDashboardPage("index.html", appHost);
}
+ ///
+ /// Opens the swagger API page.
+ ///
+ /// The app host.
+ public static void OpenSwaggerPage(IServerApplicationHost appHost)
+ {
+ var url = appHost.GetLocalApiUrl("localhost") + "/swagger/index.html";
+ OpenUrl(appHost, url);
+ }
+
///
/// Opens the URL.
///
diff --git a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
index 5f2d629fea..6b7e2805bd 100644
--- a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
+++ b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
@@ -36,7 +36,11 @@ namespace Emby.Server.Implementations.EntryPoints
return Task.CompletedTask;
}
- if (!_config.Configuration.IsStartupWizardCompleted)
+ if (!_appHost.IsHostingContent)
+ {
+ BrowserLauncher.OpenSwaggerPage(_appHost);
+ }
+ else if (!_config.Configuration.IsStartupWizardCompleted)
{
BrowserLauncher.OpenWebApp(_appHost);
}
diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.cs
index 25f0905eb8..134ed110ba 100644
--- a/MediaBrowser.Controller/IServerApplicationHost.cs
+++ b/MediaBrowser.Controller/IServerApplicationHost.cs
@@ -16,6 +16,11 @@ namespace MediaBrowser.Controller
{
event EventHandler HasUpdateAvailableChanged;
+ ///
+ /// Gets a value indicating whether the server is hosting the static web content from jellyfin-web.
+ ///
+ bool IsHostingContent { get; }
+
///
/// Gets the system info.
///
From f3be93a4de86177d87a3be919b7aaa6e394b819d Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Tue, 25 Feb 2020 17:02:51 +0100
Subject: [PATCH 08/95] Use the swagger API page as the default redirect path
if not hosting the jellyfin-web content
---
Emby.Server.Implementations/ConfigurationOptions.cs | 8 +++++++-
Jellyfin.Server/Program.cs | 9 ++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs
index 2ea7ff6e91..b733bd2d57 100644
--- a/Emby.Server.Implementations/ConfigurationOptions.cs
+++ b/Emby.Server.Implementations/ConfigurationOptions.cs
@@ -3,9 +3,15 @@ using static MediaBrowser.Controller.Extensions.ConfigurationExtensions;
namespace Emby.Server.Implementations
{
+ ///
+ /// Static class containing the default configuration options for the web server.
+ ///
public static class ConfigurationOptions
{
- public static Dictionary Configuration => new Dictionary
+ ///
+ /// Gets the default configuration options.
+ ///
+ public static Dictionary DefaultConfiguration => new Dictionary
{
{ "HttpListenerHost:DefaultRedirectPath", "web/index.html" },
{ "MusicBrainz:BaseUrl", "https://www.musicbrainz.org" },
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 2ce7379fba..8c133576ca 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -468,9 +468,16 @@ namespace Jellyfin.Server
await resource.CopyToAsync(dst).ConfigureAwait(false);
}
+ // Use the swagger API page as the default redirect path if not hosting the jellyfin-web content
+ var inMemoryDefaultConfig = ConfigurationOptions.DefaultConfiguration;
+ if (string.IsNullOrEmpty(appPaths.WebPath))
+ {
+ inMemoryDefaultConfig["HttpListenerHost:DefaultRedirectPath"] = "swagger/index.html";
+ }
+
return new ConfigurationBuilder()
.SetBasePath(appPaths.ConfigurationDirectoryPath)
- .AddInMemoryCollection(ConfigurationOptions.Configuration)
+ .AddInMemoryCollection(inMemoryDefaultConfig)
.AddJsonFile("logging.json", false, true)
.AddEnvironmentVariables("JELLYFIN_")
.Build();
From 192ec57b608a2cd1f8b337fb416b84abccd7a2a0 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Tue, 25 Feb 2020 17:22:21 +0100
Subject: [PATCH 09/95] Remove log message executed before logger is
initialized
---
Emby.Server.Implementations/ConfigurationOptions.cs | 2 +-
Jellyfin.Server/Program.cs | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs
index b733bd2d57..456484813d 100644
--- a/Emby.Server.Implementations/ConfigurationOptions.cs
+++ b/Emby.Server.Implementations/ConfigurationOptions.cs
@@ -9,7 +9,7 @@ namespace Emby.Server.Implementations
public static class ConfigurationOptions
{
///
- /// Gets the default configuration options.
+ /// Gets a new copy of the default configuration options.
///
public static Dictionary DefaultConfiguration => new Dictionary
{
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 8c133576ca..c4e3cd7268 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -392,7 +392,6 @@ namespace Jellyfin.Server
// ELSE IF $JELLYFIN_WEB_DIR
// ELSE /jellyfin-web
var webDir = options.WebDir;
-
if (string.IsNullOrEmpty(webDir))
{
webDir = Environment.GetEnvironmentVariable("JELLYFIN_WEB_DIR");
@@ -407,7 +406,6 @@ namespace Jellyfin.Server
// Reset webDir if the directory does not exist, or is empty
if (!Directory.Exists(webDir) || !Directory.GetFiles(webDir).Any())
{
- _logger.LogInformation("Server will not host static content because the web content directory does not exist or is empty: {ContentRoot}", webDir);
webDir = null;
}
From a9f3b5dacbd67ac9df65c5b7bbeef159bbb40aa7 Mon Sep 17 00:00:00 2001
From: Vasily
Date: Wed, 26 Feb 2020 10:54:29 +0300
Subject: [PATCH 10/95] Fix ordering of search results
---
.../Data/SqliteItemRepository.cs | 36 +++++++++----------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 44f38504ab..0819379cde 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -2914,29 +2914,29 @@ namespace Emby.Server.Implementations.Data
private string GetOrderByText(InternalItemsQuery query)
{
var orderBy = query.OrderBy;
- if (string.IsNullOrEmpty(query.SearchTerm))
+ bool hasSimilar = query.SimilarTo != null;
+ bool hasSearch = !string.IsNullOrEmpty(query.SearchTerm);
+
+ if (hasSimilar || hasSearch)
{
- int oldLen = orderBy.Count;
- if (oldLen == 0 && query.SimilarTo != null)
+ List<(string, SortOrder)> prepend = new List<(string, SortOrder)>(4);
+ if (hasSearch)
{
- var arr = new (string, SortOrder)[oldLen + 2];
- orderBy.CopyTo(arr, 0);
- arr[oldLen] = ("SimilarityScore", SortOrder.Descending);
- arr[oldLen + 1] = (ItemSortBy.Random, SortOrder.Ascending);
- query.OrderBy = arr;
+ prepend.Add(("SearchScore", SortOrder.Descending));
+ prepend.Add((ItemSortBy.SortName, SortOrder.Ascending));
}
- }
- else
- {
- query.OrderBy = new[]
+ if (hasSimilar)
{
- ("SearchScore", SortOrder.Descending),
- (ItemSortBy.SortName, SortOrder.Ascending)
- };
- }
-
+ prepend.Add(("SimilarityScore", SortOrder.Descending));
+ prepend.Add((ItemSortBy.Random, SortOrder.Ascending));
+ }
- if (orderBy.Count == 0)
+ var arr = new (string, SortOrder)[prepend.Count + orderBy.Count];
+ prepend.CopyTo(arr, 0);
+ orderBy.CopyTo(arr, prepend.Count);
+ orderBy = query.OrderBy = arr;
+ }
+ else if (orderBy.Count == 0)
{
return string.Empty;
}
From d95ccbacac7df20ab445e73dd9405ec1391c7a7a Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Wed, 26 Feb 2020 16:11:09 +0100
Subject: [PATCH 11/95] Use IsHostingContent instead of explicitly checking
ContentRoot
---
Jellyfin.Server/Program.cs | 2 +-
MediaBrowser.Model/Configuration/ServerConfiguration.cs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index c4e3cd7268..4048a0d031 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -268,7 +268,7 @@ namespace Jellyfin.Server
.UseStartup();
// Set the root directory for static content, if one exists
- if (!string.IsNullOrEmpty(appHost.ContentRoot))
+ if (appHost.IsHostingContent)
{
webhostBuilder.UseContentRoot(appHost.ContentRoot);
}
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 5280d455c4..43a84d3815 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -149,9 +149,9 @@ namespace MediaBrowser.Model.Configuration
public bool EnableDashboardResponseCaching { get; set; }
///
- /// Allows the dashboard to be served from a custom path.
+ /// Gets or sets a custom path to serve the dashboard from.
///
- /// The dashboard source path.
+ /// The dashboard source path, or null if the default path should be used.
public string DashboardSourcePath { get; set; }
///
From d1e1aef5f796ff5c25338d44cb4f6a7aadf24af4 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Wed, 26 Feb 2020 18:19:34 +0100
Subject: [PATCH 12/95] Fix possible race condition
---
MediaBrowser.Providers/Manager/ProviderManager.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index ae1e0492bf..4f1513df34 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -970,9 +970,8 @@ namespace MediaBrowser.Providers.Manager
var id = item.Id;
_logger.LogInformation("OnRefreshProgress {0} {1}", id.ToString("N", CultureInfo.InvariantCulture), progress);
- if (_activeRefreshes.ContainsKey(id))
+ if (_activeRefreshes.TryAdd(id, progress))
{
- _activeRefreshes[id] = progress;
RefreshProgress?.Invoke(this, new GenericEventArgs>(new Tuple(item, progress)));
}
else
From 3043b7323b1a12e888ba8c4eb71f904724f43e3a Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Fri, 28 Feb 2020 17:57:38 +0100
Subject: [PATCH 13/95] Use constants for settings keys
---
Emby.Server.Implementations/ConfigurationOptions.cs | 6 ++++--
.../HttpServer/HttpListenerHost.cs | 8 +++++++-
Jellyfin.Server/Program.cs | 3 ++-
MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs | 7 ++++++-
4 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs
index 456484813d..cc0d314edc 100644
--- a/Emby.Server.Implementations/ConfigurationOptions.cs
+++ b/Emby.Server.Implementations/ConfigurationOptions.cs
@@ -1,4 +1,6 @@
using System.Collections.Generic;
+using Emby.Server.Implementations.HttpServer;
+using MediaBrowser.Providers.Music;
using static MediaBrowser.Controller.Extensions.ConfigurationExtensions;
namespace Emby.Server.Implementations
@@ -13,8 +15,8 @@ namespace Emby.Server.Implementations
///
public static Dictionary DefaultConfiguration => new Dictionary
{
- { "HttpListenerHost:DefaultRedirectPath", "web/index.html" },
- { "MusicBrainz:BaseUrl", "https://www.musicbrainz.org" },
+ { HttpListenerHost.DefaultRedirectKey, "web/index.html" },
+ { MusicBrainzAlbumProvider.BaseUrlKey, "https://www.musicbrainz.org" },
{ FfmpegProbeSizeKey, "1G" },
{ FfmpegAnalyzeDurationKey, "200M" }
};
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 85602a67f0..7f16c68343 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -30,6 +30,12 @@ namespace Emby.Server.Implementations.HttpServer
{
public class HttpListenerHost : IHttpServer, IDisposable
{
+ ///
+ /// The settings key for a setting that specifies the default redirect path
+ /// to use for requests where the URL base prefix is invalid or missing.
+ ///
+ public const string DefaultRedirectKey = "HttpListenerHost:DefaultRedirectPath";
+
private readonly ILogger _logger;
private readonly IServerConfigurationManager _config;
private readonly INetworkManager _networkManager;
@@ -58,7 +64,7 @@ namespace Emby.Server.Implementations.HttpServer
_appHost = applicationHost;
_logger = logger;
_config = config;
- _defaultRedirectPath = configuration["HttpListenerHost:DefaultRedirectPath"];
+ _defaultRedirectPath = configuration[DefaultRedirectKey];
_baseUrlPrefix = _config.Configuration.BaseUrl;
_networkManager = networkManager;
_jsonSerializer = jsonSerializer;
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 4048a0d031..7e03b0c9ca 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -13,6 +13,7 @@ using System.Threading.Tasks;
using CommandLine;
using Emby.Drawing;
using Emby.Server.Implementations;
+using Emby.Server.Implementations.HttpServer;
using Emby.Server.Implementations.IO;
using Emby.Server.Implementations.Networking;
using Jellyfin.Drawing.Skia;
@@ -470,7 +471,7 @@ namespace Jellyfin.Server
var inMemoryDefaultConfig = ConfigurationOptions.DefaultConfiguration;
if (string.IsNullOrEmpty(appPaths.WebPath))
{
- inMemoryDefaultConfig["HttpListenerHost:DefaultRedirectPath"] = "swagger/index.html";
+ inMemoryDefaultConfig[HttpListenerHost.DefaultRedirectKey] = "swagger/index.html";
}
return new ConfigurationBuilder()
diff --git a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
index 8e71b625ee..ed7688e5a9 100644
--- a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
+++ b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
@@ -22,6 +22,11 @@ namespace MediaBrowser.Providers.Music
{
public class MusicBrainzAlbumProvider : IRemoteMetadataProvider, IHasOrder
{
+ ///
+ /// The settings key for a setting that specifies the base URL to use for sending requests to MusicBrainz.
+ ///
+ public const string BaseUrlKey = "MusicBrainz:BaseUrl";
+
///
/// The Jellyfin user-agent is unrestricted but source IP must not exceed
/// one request per second, therefore we rate limit to avoid throttling.
@@ -57,7 +62,7 @@ namespace MediaBrowser.Providers.Music
_appHost = appHost;
_logger = logger;
- _musicBrainzBaseUrl = configuration["MusicBrainz:BaseUrl"];
+ _musicBrainzBaseUrl = configuration[BaseUrlKey];
// Use a stopwatch to ensure we don't exceed the MusicBrainz rate limit
_stopWatchMusicBrainz.Start();
From e699e5d405792a598fdf6d0e723db52555af0492 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Fri, 28 Feb 2020 20:34:10 +0100
Subject: [PATCH 14/95] Fix possible race condition
---
.../Manager/ProviderManager.cs | 18 ++++++++----------
.../MediaBrowser.Providers.csproj | 1 +
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index 4f1513df34..17d612199f 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -970,20 +970,18 @@ namespace MediaBrowser.Providers.Manager
var id = item.Id;
_logger.LogInformation("OnRefreshProgress {0} {1}", id.ToString("N", CultureInfo.InvariantCulture), progress);
- if (_activeRefreshes.TryAdd(id, progress))
- {
- RefreshProgress?.Invoke(this, new GenericEventArgs>(new Tuple(item, progress)));
- }
- else
- {
- // TODO: Need to hunt down the conditions for this happening
- throw new Exception(
+ // TODO: Need to hunt down the conditions for this happening
+ _activeRefreshes.AddOrUpdate(
+ id,
+ (_) => throw new Exception(
string.Format(
CultureInfo.InvariantCulture,
"Refresh for item {0} {1} is not in progress",
item.GetType().Name,
- item.Id.ToString("N", CultureInfo.InvariantCulture)));
- }
+ item.Id.ToString("N", CultureInfo.InvariantCulture))),
+ (_, _) => progress);
+
+ RefreshProgress?.Invoke(this, new GenericEventArgs>(new Tuple(item, progress)));
}
private readonly SimplePriorityQueue> _refreshQueue =
diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
index d0ed61c833..9c986382f2 100644
--- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj
+++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
@@ -22,6 +22,7 @@
netstandard2.1
false
true
+ preview
From 3f4b9e9a81278c6f5c817036a7ae52b6f70557e4 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Fri, 28 Feb 2020 20:40:45 +0100
Subject: [PATCH 15/95] Add new 'nowebcontent' configuration flag
---
.../ConfigurationOptions.cs | 1 +
.../HttpServer/HttpListenerHost.cs | 2 +-
.../Extensions/ConfigurationExtensions.cs | 31 +++++++++++++++++++
.../Music/MusicBrainzAlbumProvider.cs | 2 +-
4 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs
index cc0d314edc..08a493cb79 100644
--- a/Emby.Server.Implementations/ConfigurationOptions.cs
+++ b/Emby.Server.Implementations/ConfigurationOptions.cs
@@ -15,6 +15,7 @@ namespace Emby.Server.Implementations
///
public static Dictionary DefaultConfiguration => new Dictionary
{
+ { NoWebContentKey, bool.FalseString },
{ HttpListenerHost.DefaultRedirectKey, "web/index.html" },
{ MusicBrainzAlbumProvider.BaseUrlKey, "https://www.musicbrainz.org" },
{ FfmpegProbeSizeKey, "1G" },
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 7f16c68343..546a59517d 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -31,7 +31,7 @@ namespace Emby.Server.Implementations.HttpServer
public class HttpListenerHost : IHttpServer, IDisposable
{
///
- /// The settings key for a setting that specifies the default redirect path
+ /// The key for a setting that specifies the default redirect path
/// to use for requests where the URL base prefix is invalid or missing.
///
public const string DefaultRedirectKey = "HttpListenerHost:DefaultRedirectPath";
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
index 76c9b4b26c..9dbc1a243f 100644
--- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
+++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
@@ -1,3 +1,4 @@
+using System;
using Microsoft.Extensions.Configuration;
namespace MediaBrowser.Controller.Extensions
@@ -7,6 +8,11 @@ namespace MediaBrowser.Controller.Extensions
///
public static class ConfigurationExtensions
{
+ ///
+ /// The key for a setting that indicates whether the application should host static web content.
+ ///
+ public const string NoWebContentKey = "nowebcontent";
+
///
/// The key for the FFmpeg probe size option.
///
@@ -17,6 +23,16 @@ namespace MediaBrowser.Controller.Extensions
///
public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration";
+ ///
+ /// Retrieves a config value indicating whether the application should not host
+ /// static web content from the .
+ ///
+ /// The configuration to retrieve the value from.
+ /// The parsed config value.
+ /// The config value is not a valid bool string. See .
+ public static bool IsNoWebContent(this IConfiguration configuration)
+ => configuration.ParseBoolean(NoWebContentKey);
+
///
/// Retrieves the FFmpeg probe size from the .
///
@@ -32,5 +48,20 @@ namespace MediaBrowser.Controller.Extensions
/// The FFmpeg analyse duration option.
public static string GetFFmpegAnalyzeDuration(this IConfiguration configuration)
=> configuration[FfmpegAnalyzeDurationKey];
+
+ ///
+ /// Convert the specified configuration string value its equivalent.
+ ///
+ /// The configuration to retrieve and parse the setting from.
+ /// The key to use to retrieve the string value from the configuration.
+ /// The parsed boolean value.
+ /// The config value is not a valid bool string. See .
+ public static bool ParseBoolean(this IConfiguration configuration, string key)
+ {
+ string configValue = configuration[key];
+ return bool.TryParse(configValue, out bool result) ?
+ result :
+ throw new FormatException($"Invalid value for configuration option '{key}' (expected a boolean): {configValue}");
+ }
}
}
diff --git a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
index ed7688e5a9..d217c6ad20 100644
--- a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
+++ b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
@@ -23,7 +23,7 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzAlbumProvider : IRemoteMetadataProvider, IHasOrder
{
///
- /// The settings key for a setting that specifies the base URL to use for sending requests to MusicBrainz.
+ /// The key for a setting that specifies the base URL to use for sending requests to MusicBrainz.
///
public const string BaseUrlKey = "MusicBrainz:BaseUrl";
From 29bad073ebeb10813c6468b6159ce3bd06398134 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Fri, 28 Feb 2020 20:49:04 +0100
Subject: [PATCH 16/95] Use config setting to decide if web content should be
hosted
Also fail server startup if web content is expected but missing
---
.../ApplicationHost.cs | 5 +---
.../EntryPoints/StartupWizard.cs | 4 ++-
Jellyfin.Server/Program.cs | 25 +++++++++++--------
.../IServerApplicationHost.cs | 5 ----
4 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 789b8724c3..8ea188724a 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -240,13 +240,10 @@ namespace Emby.Server.Implementations
public int HttpsPort { get; private set; }
///
- /// Gets the content root for the webhost. If the webhost is not serving static web content, this will be null.
+ /// Gets the content root for the webhost.
///
public string ContentRoot { get; private set; }
- ///
- public bool IsHostingContent => ContentRoot != null;
-
///
/// Gets the server configuration manager.
///
diff --git a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
index 6b7e2805bd..7c2b3cd5f2 100644
--- a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
+++ b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
@@ -2,7 +2,9 @@ using System.Threading.Tasks;
using Emby.Server.Implementations.Browser;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Controller.Extensions;
using MediaBrowser.Controller.Plugins;
+using Microsoft.Extensions.Configuration;
namespace Emby.Server.Implementations.EntryPoints
{
@@ -36,7 +38,7 @@ namespace Emby.Server.Implementations.EntryPoints
return Task.CompletedTask;
}
- if (!_appHost.IsHostingContent)
+ if (_appHost.Resolve().IsNoWebContent())
{
BrowserLauncher.OpenSwaggerPage(_appHost);
}
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 7e03b0c9ca..843eb9ea94 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -19,7 +19,7 @@ using Emby.Server.Implementations.Networking;
using Jellyfin.Drawing.Skia;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Drawing;
-using MediaBrowser.Model.Globalization;
+using MediaBrowser.Controller.Extensions;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -177,7 +177,7 @@ namespace Jellyfin.Server
ServiceCollection serviceCollection = new ServiceCollection();
await appHost.InitAsync(serviceCollection).ConfigureAwait(false);
- var host = CreateWebHostBuilder(appHost, serviceCollection).Build();
+ var host = CreateWebHostBuilder(appHost, serviceCollection, appConfig).Build();
// A bit hacky to re-use service provider since ASP.NET doesn't allow a custom service collection.
appHost.ServiceProvider = host.Services;
@@ -221,7 +221,7 @@ namespace Jellyfin.Server
}
}
- private static IWebHostBuilder CreateWebHostBuilder(ApplicationHost appHost, IServiceCollection serviceCollection)
+ private static IWebHostBuilder CreateWebHostBuilder(ApplicationHost appHost, IServiceCollection serviceCollection, IConfiguration appConfig)
{
var webhostBuilder = new WebHostBuilder()
.UseKestrel(options =>
@@ -268,9 +268,18 @@ namespace Jellyfin.Server
})
.UseStartup();
- // Set the root directory for static content, if one exists
- if (appHost.IsHostingContent)
+ if (!appConfig.IsNoWebContent())
{
+ // Fail startup if the web content does not exist
+ if (!Directory.Exists(appHost.ContentRoot) || !Directory.GetFiles(appHost.ContentRoot).Any())
+ {
+ throw new InvalidOperationException(
+ "The server is expected to host web content, but the provided content directory is either " +
+ $"invalid or empty: {appHost.ContentRoot}. If you do not want to host web content with the " +
+ $"server, you may set the '{MediaBrowser.Controller.Extensions.ConfigurationExtensions.NoWebContentKey}' flag.");
+ }
+
+ // Configure the web host to host the static web content
webhostBuilder.UseContentRoot(appHost.ContentRoot);
}
@@ -404,12 +413,6 @@ namespace Jellyfin.Server
}
}
- // Reset webDir if the directory does not exist, or is empty
- if (!Directory.Exists(webDir) || !Directory.GetFiles(webDir).Any())
- {
- webDir = null;
- }
-
// logDir
// IF --logdir
// ELSE IF $JELLYFIN_LOG_DIR
diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.cs
index 134ed110ba..25f0905eb8 100644
--- a/MediaBrowser.Controller/IServerApplicationHost.cs
+++ b/MediaBrowser.Controller/IServerApplicationHost.cs
@@ -16,11 +16,6 @@ namespace MediaBrowser.Controller
{
event EventHandler HasUpdateAvailableChanged;
- ///
- /// Gets a value indicating whether the server is hosting the static web content from jellyfin-web.
- ///
- bool IsHostingContent { get; }
-
///
/// Gets the system info.
///
From d437950ac30ee294ab275362abe711ae3c14ac32 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Wed, 11 Mar 2020 22:55:10 +0100
Subject: [PATCH 17/95] Parse config value correctly
---
.../Extensions/ConfigurationExtensions.cs | 17 +----------------
.../MediaBrowser.Controller.csproj | 1 +
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
index 9dbc1a243f..1a9ac09ee9 100644
--- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
+++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
@@ -31,7 +31,7 @@ namespace MediaBrowser.Controller.Extensions
/// The parsed config value.
/// The config value is not a valid bool string. See .
public static bool IsNoWebContent(this IConfiguration configuration)
- => configuration.ParseBoolean(NoWebContentKey);
+ => configuration.GetValue(NoWebContentKey);
///
/// Retrieves the FFmpeg probe size from the .
@@ -48,20 +48,5 @@ namespace MediaBrowser.Controller.Extensions
/// The FFmpeg analyse duration option.
public static string GetFFmpegAnalyzeDuration(this IConfiguration configuration)
=> configuration[FfmpegAnalyzeDurationKey];
-
- ///
- /// Convert the specified configuration string value its equivalent.
- ///
- /// The configuration to retrieve and parse the setting from.
- /// The key to use to retrieve the string value from the configuration.
- /// The parsed boolean value.
- /// The config value is not a valid bool string. See .
- public static bool ParseBoolean(this IConfiguration configuration, string key)
- {
- string configValue = configuration[key];
- return bool.TryParse(configValue, out bool result) ?
- result :
- throw new FormatException($"Invalid value for configuration option '{key}' (expected a boolean): {configValue}");
- }
}
}
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index 88e9055e84..bcca9e4a18 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -9,6 +9,7 @@
+
From 547f248a620c2de61d72703590f9c5c4720ba6e2 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 12:59:34 +0100
Subject: [PATCH 18/95] Update XML documentation for WebPath
---
.../AppBase/BaseApplicationPaths.cs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
index be2d198efc..8bcd087452 100644
--- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
+++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
@@ -1,11 +1,13 @@
using System;
using System.IO;
using MediaBrowser.Common.Configuration;
+using MediaBrowser.Controller.Extensions;
+using Microsoft.Extensions.Configuration;
namespace Emby.Server.Implementations.AppBase
{
///
- /// Provides a base class to hold common application paths used by both the Ui and Server.
+ /// Provides a base class to hold common application paths used by both the UI and Server.
/// This can be subclassed to add application-specific paths.
///
public abstract class BaseApplicationPaths : IApplicationPaths
@@ -40,7 +42,10 @@ namespace Emby.Server.Implementations.AppBase
///
/// Gets the path to the web UI resources folder.
///
- /// The web UI resources path, or null if the server is not hosting any web content.
+ /// The web UI resources path.
+ ///
+ /// This value is not relevant if is true.
+ ///
public string WebPath { get; }
///
From 4102e3afd0a9df29faea598769db2212a00d64ce Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 13:00:14 +0100
Subject: [PATCH 19/95] Rename IsNoWebContent to NoWebContent
---
Emby.Server.Implementations/EntryPoints/StartupWizard.cs | 2 +-
Jellyfin.Server/Program.cs | 3 ++-
MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
index 7c2b3cd5f2..bc6b8c956a 100644
--- a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
+++ b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
@@ -38,7 +38,7 @@ namespace Emby.Server.Implementations.EntryPoints
return Task.CompletedTask;
}
- if (_appHost.Resolve().IsNoWebContent())
+ if (_appHost.Resolve().NoWebContent())
{
BrowserLauncher.OpenSwaggerPage(_appHost);
}
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 9450fee705..6412db7518 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -287,7 +287,8 @@ namespace Jellyfin.Server
})
.UseStartup();
- if (!startupConfig.IsNoWebContent())
+ // Set up static content hosting unless it has been disabled via config
+ if (!startupConfig.NoWebContent())
{
// Fail startup if the web content does not exist
if (!Directory.Exists(appHost.ContentRoot) || !Directory.GetFiles(appHost.ContentRoot).Any())
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
index 1a9ac09ee9..e802eeed2a 100644
--- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
+++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
@@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.Extensions
/// The configuration to retrieve the value from.
/// The parsed config value.
/// The config value is not a valid bool string. See .
- public static bool IsNoWebContent(this IConfiguration configuration)
+ public static bool NoWebContent(this IConfiguration configuration)
=> configuration.GetValue(NoWebContentKey);
///
From a9c1ff91193d8f645225ee9f7001370fe304ae8d Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 13:00:34 +0100
Subject: [PATCH 20/95] Remove unnecessary method in BrowserLauncher
---
.../Browser/BrowserLauncher.cs | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
index b17c2b2700..752650ae18 100644
--- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs
+++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
@@ -8,25 +8,14 @@ namespace Emby.Server.Implementations.Browser
///
public static class BrowserLauncher
{
- ///
- /// Opens the dashboard page.
- ///
- /// The page.
- /// The app host.
- private static void OpenDashboardPage(string page, IServerApplicationHost appHost)
- {
- var url = appHost.GetLocalApiUrl("localhost") + "/web/" + page;
-
- OpenUrl(appHost, url);
- }
-
///
/// Opens the web client.
///
/// The app host.
public static void OpenWebApp(IServerApplicationHost appHost)
{
- OpenDashboardPage("index.html", appHost);
+ var url = appHost.GetLocalApiUrl("localhost") + "/web/index.html";
+ OpenUrl(appHost, url);
}
///
From 420e3619fb062727a914a4f73bf67edb9e9aaf6c Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 13:01:05 +0100
Subject: [PATCH 21/95] Use startup configuration to set the default redirect
path
---
Jellyfin.Server/Program.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 6412db7518..168ee081ee 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -278,7 +278,7 @@ namespace Jellyfin.Server
}
}
})
- .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(appPaths))
+ .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(appPaths, startupConfig))
.UseSerilog()
.ConfigureServices(services =>
{
@@ -499,11 +499,11 @@ namespace Jellyfin.Server
.Build();
}
- private static IConfigurationBuilder ConfigureAppConfiguration(this IConfigurationBuilder config, IApplicationPaths appPaths)
+ private static IConfigurationBuilder ConfigureAppConfiguration(this IConfigurationBuilder config, IApplicationPaths appPaths, IConfiguration startupConfig = null)
{
// Use the swagger API page as the default redirect path if not hosting the jellyfin-web content
var inMemoryDefaultConfig = ConfigurationOptions.DefaultConfiguration;
- if (string.IsNullOrEmpty(appPaths.WebPath))
+ if (startupConfig != null && startupConfig.NoWebContent())
{
inMemoryDefaultConfig[HttpListenerHost.DefaultRedirectKey] = "swagger/index.html";
}
From a67e32f8ecd46dfe2193ab3c81160bc830cd9349 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 13:14:57 +0100
Subject: [PATCH 22/95] Clean up and document BrowserLauncher correctly
---
.../Browser/BrowserLauncher.cs | 28 +++++++++----------
.../IServerApplicationHost.cs | 5 ++++
2 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
index 752650ae18..96096e142a 100644
--- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs
+++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
@@ -1,21 +1,21 @@
using System;
using MediaBrowser.Controller;
+using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Browser
{
///
- /// Class BrowserLauncher.
+ /// Assists in opening application URLs in an external browser.
///
public static class BrowserLauncher
{
///
- /// Opens the web client.
+ /// Opens the home page of the web client.
///
/// The app host.
public static void OpenWebApp(IServerApplicationHost appHost)
{
- var url = appHost.GetLocalApiUrl("localhost") + "/web/index.html";
- OpenUrl(appHost, url);
+ TryOpenUrl(appHost, "/web/index.html");
}
///
@@ -24,27 +24,25 @@ namespace Emby.Server.Implementations.Browser
/// The app host.
public static void OpenSwaggerPage(IServerApplicationHost appHost)
{
- var url = appHost.GetLocalApiUrl("localhost") + "/swagger/index.html";
- OpenUrl(appHost, url);
+ TryOpenUrl(appHost, "/swagger/index.html");
}
///
- /// Opens the URL.
+ /// Opens the specified URL in an external browser window. Any exceptions will be logged, but ignored.
///
- /// The application host instance.
+ /// The application host.
/// The URL.
- private static void OpenUrl(IServerApplicationHost appHost, string url)
+ private static void TryOpenUrl(IServerApplicationHost appHost, string url)
{
try
{
- appHost.LaunchUrl(url);
+ string baseUrl = appHost.GetLocalApiUrl("localhost");
+ appHost.LaunchUrl(baseUrl + url);
}
- catch (NotSupportedException)
- {
-
- }
- catch (Exception)
+ catch (Exception ex)
{
+ var logger = appHost.Resolve();
+ logger?.LogError(ex, "Failed to open browser window with URL {URL}", url);
}
}
}
diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.cs
index 25f0905eb8..608ffc61c2 100644
--- a/MediaBrowser.Controller/IServerApplicationHost.cs
+++ b/MediaBrowser.Controller/IServerApplicationHost.cs
@@ -82,6 +82,11 @@ namespace MediaBrowser.Controller
/// The local API URL.
string GetLocalApiUrl(IPAddress address);
+ ///
+ /// Open a URL in an external browser window.
+ ///
+ /// The URL to open.
+ /// is false.
void LaunchUrl(string url);
void EnableLoopback(string appName);
From 6a6293afc774001743985d615d651ca4a877bfd7 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 13:15:47 +0100
Subject: [PATCH 23/95] Make startup config nullable when configuring app
configuration
---
Jellyfin.Server/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 168ee081ee..c839867f12 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -499,7 +499,7 @@ namespace Jellyfin.Server
.Build();
}
- private static IConfigurationBuilder ConfigureAppConfiguration(this IConfigurationBuilder config, IApplicationPaths appPaths, IConfiguration startupConfig = null)
+ private static IConfigurationBuilder ConfigureAppConfiguration(this IConfigurationBuilder config, IApplicationPaths appPaths, IConfiguration? startupConfig = null)
{
// Use the swagger API page as the default redirect path if not hosting the jellyfin-web content
var inMemoryDefaultConfig = ConfigurationOptions.DefaultConfiguration;
From 6fbdf0d6a20d8bf230cbf2ba002612b49fa45b76 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 15:23:50 +0100
Subject: [PATCH 24/95] Construct ApplicationHost with DI framework instead of
manually
---
.../ApplicationHost.cs | 32 ++++++++-----------
.../HttpServer/HttpListenerHost.cs | 5 ++-
Jellyfin.Server/Program.cs | 3 +-
3 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 3d79cae1e5..7262268a97 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -613,7 +613,7 @@ namespace Emby.Server.Implementations
DiscoverTypes();
- await RegisterResources(serviceCollection, startupConfig).ConfigureAwait(false);
+ await RegisterServices(serviceCollection, startupConfig).ConfigureAwait(false);
ContentRoot = ServerConfigurationManager.Configuration.DashboardSourcePath;
if (string.IsNullOrEmpty(ContentRoot))
@@ -650,9 +650,9 @@ namespace Emby.Server.Implementations
}
///
- /// Registers resources that classes will depend on
+ /// Registers services/resources with the service collection that will be available via DI.
///
- protected async Task RegisterResources(IServiceCollection serviceCollection, IConfiguration startupConfig)
+ protected async Task RegisterServices(IServiceCollection serviceCollection, IConfiguration startupConfig)
{
serviceCollection.AddMemoryCache();
@@ -770,20 +770,8 @@ namespace Emby.Server.Implementations
CertificateInfo = GetCertificateInfo(true);
Certificate = GetCertificate(CertificateInfo);
- HttpServer = new HttpListenerHost(
- this,
- LoggerFactory.CreateLogger(),
- ServerConfigurationManager,
- startupConfig,
- NetworkManager,
- JsonSerializer,
- XmlSerializer,
- CreateHttpListener())
- {
- GlobalResponse = LocalizationManager.GetLocalizedString("StartupEmbyServerIsLoading")
- };
-
- serviceCollection.AddSingleton(HttpServer);
+ serviceCollection.AddSingleton();
+ serviceCollection.AddSingleton();
ImageProcessor = new ImageProcessor(LoggerFactory.CreateLogger(), ServerConfigurationManager.ApplicationPaths, FileSystemManager, ImageEncoder, () => LibraryManager, () => MediaEncoder);
serviceCollection.AddSingleton(ImageProcessor);
@@ -891,6 +879,14 @@ namespace Emby.Server.Implementations
((LibraryManager)LibraryManager).ItemRepository = ItemRepository;
}
+ ///
+ /// Create services registered with the service container that need to be initialized at application startup.
+ ///
+ public void InitializeServices()
+ {
+ HttpServer = Resolve();
+ }
+
public static void LogEnvironmentInfo(ILogger logger, IApplicationPaths appPaths)
{
// Distinct these to prevent users from reporting problems that aren't actually problems
@@ -1196,8 +1192,6 @@ namespace Emby.Server.Implementations
});
}
- protected IHttpListener CreateHttpListener() => new WebSocketSharpListener(LoggerFactory.CreateLogger());
-
private CertificateInfo GetCertificateInfo(bool generateCertificate)
{
// Custom cert
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 546a59517d..7633eec4ea 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -18,6 +18,7 @@ using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Events;
+using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http;
@@ -59,7 +60,8 @@ namespace Emby.Server.Implementations.HttpServer
INetworkManager networkManager,
IJsonSerializer jsonSerializer,
IXmlSerializer xmlSerializer,
- IHttpListener socketListener)
+ IHttpListener socketListener,
+ ILocalizationManager localizationManager)
{
_appHost = applicationHost;
_logger = logger;
@@ -76,6 +78,7 @@ namespace Emby.Server.Implementations.HttpServer
Instance = this;
ResponseFilters = Array.Empty>();
+ GlobalResponse = localizationManager.GetLocalizedString("StartupEmbyServerIsLoading");
}
public event EventHandler> WebSocketConnected;
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index c839867f12..cb886b8ce0 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -191,8 +191,9 @@ namespace Jellyfin.Server
var webHost = CreateWebHostBuilder(appHost, serviceCollection, startupConfig, appPaths).Build();
- // A bit hacky to re-use service provider since ASP.NET doesn't allow a custom service collection.
+ // Re-use the web host service provider in the app host since ASP.NET doesn't allow a custom service collection.
appHost.ServiceProvider = webHost.Services;
+ appHost.InitializeServices();
appHost.FindParts();
Migrations.MigrationRunner.Run(appHost, _loggerFactory);
From 7e3caec5836c0afeec58215ac33d625fa7f6fefa Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 15:29:39 +0100
Subject: [PATCH 25/95] Make PackageCreator.ModifyHtml() static and clean up
XML documentation
This eliminates the need to create a dummy instance to call this method
---
.../Api/DashboardService.cs | 2 +-
MediaBrowser.WebDashboard/Api/PackageCreator.cs | 16 +++++++++-------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 9e0aae7820..83cc6c6820 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -203,7 +203,7 @@ namespace MediaBrowser.WebDashboard.Api
return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => Task.FromResult(stream));
}
- return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => GetPackageCreator(DashboardUIPath).ModifyHtml("dummy.html", stream, null, _appHost.ApplicationVersionString, null));
+ return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => PackageCreator.ModifyHtml(false, stream, null, _appHost.ApplicationVersionString, null));
}
throw new ResourceNotFoundException();
diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs
index 133bf61e8c..e8eb0389f9 100644
--- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs
+++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs
@@ -28,7 +28,8 @@ namespace MediaBrowser.WebDashboard.Api
if (resourceStream != null && IsCoreHtml(virtualPath))
{
- resourceStream = await ModifyHtml(virtualPath, resourceStream, mode, appVersion, localizationCulture).ConfigureAwait(false);
+ bool isMainIndexPage = string.Equals(virtualPath, "index.html", StringComparison.OrdinalIgnoreCase);
+ resourceStream = await ModifyHtml(isMainIndexPage, resourceStream, mode, appVersion, localizationCulture).ConfigureAwait(false);
}
return resourceStream;
@@ -45,18 +46,19 @@ namespace MediaBrowser.WebDashboard.Api
}
///
- /// Modifies the HTML by adding common meta tags, css and js.
+ /// Modifies the source HTML stream by adding common meta tags, css and js.
///
- /// Task{Stream}.
- public async Task ModifyHtml(
- string path,
+ ///
+ /// A task that represents the async operation to read and modify the input stream.
+ /// The task result contains a stream containing the modified HTML content.
+ ///
+ public static async Task ModifyHtml(
+ bool isMainIndexPage,
Stream sourceStream,
string mode,
string appVersion,
string localizationCulture)
{
- var isMainIndexPage = string.Equals(path, "index.html", StringComparison.OrdinalIgnoreCase);
-
string html;
using (var reader = new StreamReader(sourceStream, Encoding.UTF8))
{
From 0996ce28987027afe5943ca9787d4a5695c2ee0a Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 15:31:43 +0100
Subject: [PATCH 26/95] Add --nowebcontent command line flag
Added without any functionality
---
Jellyfin.Server/StartupOptions.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs
index 1fb1c5af8e..42c5fa86e3 100644
--- a/Jellyfin.Server/StartupOptions.cs
+++ b/Jellyfin.Server/StartupOptions.cs
@@ -15,6 +15,12 @@ namespace Jellyfin.Server
[Option('d', "datadir", Required = false, HelpText = "Path to use for the data folder (database files, etc.).")]
public string? DataDir { get; set; }
+ ///
+ /// Gets or sets a value indicating whether the server should not host static web content.
+ ///
+ [Option("nowebcontent", Required = false, HelpText = "Indicates that the web server should not host any static web content.")]
+ public bool NoWebContent { get; set; }
+
///
/// Gets or sets the path to the web directory.
///
From 2a0153737131a404a8ccd386ad09ff4a1a697dfc Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 15:34:09 +0100
Subject: [PATCH 27/95] Merge command line options into framework configuration
---
Jellyfin.Server/Program.cs | 23 +++++++++++++++--------
Jellyfin.Server/StartupOptions.cs | 13 +++++++++++++
2 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index cb886b8ce0..bfb2fc6b57 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -113,9 +113,10 @@ namespace Jellyfin.Server
// $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager
Environment.SetEnvironmentVariable("JELLYFIN_LOG_DIR", appPaths.LogDirectoryPath);
- // Create an instance of the application configuration to use for application startup
await InitLoggingConfigFile(appPaths).ConfigureAwait(false);
- IConfiguration startupConfig = CreateAppConfiguration(appPaths);
+
+ // Create an instance of the application configuration to use for application startup
+ IConfiguration startupConfig = CreateAppConfiguration(options, appPaths);
// Initialize logging framework
InitializeLoggingFramework(startupConfig, appPaths);
@@ -189,7 +190,7 @@ namespace Jellyfin.Server
ServiceCollection serviceCollection = new ServiceCollection();
await appHost.InitAsync(serviceCollection, startupConfig).ConfigureAwait(false);
- var webHost = CreateWebHostBuilder(appHost, serviceCollection, startupConfig, appPaths).Build();
+ var webHost = CreateWebHostBuilder(appHost, serviceCollection, options, startupConfig, appPaths).Build();
// Re-use the web host service provider in the app host since ASP.NET doesn't allow a custom service collection.
appHost.ServiceProvider = webHost.Services;
@@ -238,6 +239,7 @@ namespace Jellyfin.Server
private static IWebHostBuilder CreateWebHostBuilder(
ApplicationHost appHost,
IServiceCollection serviceCollection,
+ StartupOptions commandLineOpts,
IConfiguration startupConfig,
IApplicationPaths appPaths)
{
@@ -279,7 +281,7 @@ namespace Jellyfin.Server
}
}
})
- .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(appPaths, startupConfig))
+ .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(commandLineOpts, appPaths, startupConfig))
.UseSerilog()
.ConfigureServices(services =>
{
@@ -493,14 +495,18 @@ namespace Jellyfin.Server
await resource.CopyToAsync(dst).ConfigureAwait(false);
}
- private static IConfiguration CreateAppConfiguration(IApplicationPaths appPaths)
+ private static IConfiguration CreateAppConfiguration(StartupOptions commandLineOpts, IApplicationPaths appPaths)
{
return new ConfigurationBuilder()
- .ConfigureAppConfiguration(appPaths)
+ .ConfigureAppConfiguration(commandLineOpts, appPaths)
.Build();
}
- private static IConfigurationBuilder ConfigureAppConfiguration(this IConfigurationBuilder config, IApplicationPaths appPaths, IConfiguration? startupConfig = null)
+ private static IConfigurationBuilder ConfigureAppConfiguration(
+ this IConfigurationBuilder config,
+ StartupOptions commandLineOpts,
+ IApplicationPaths appPaths,
+ IConfiguration? startupConfig = null)
{
// Use the swagger API page as the default redirect path if not hosting the jellyfin-web content
var inMemoryDefaultConfig = ConfigurationOptions.DefaultConfiguration;
@@ -514,7 +520,8 @@ namespace Jellyfin.Server
.AddInMemoryCollection(inMemoryDefaultConfig)
.AddJsonFile(LoggingConfigFileDefault, optional: false, reloadOnChange: true)
.AddJsonFile(LoggingConfigFileSystem, optional: true, reloadOnChange: true)
- .AddEnvironmentVariables("JELLYFIN_");
+ .AddEnvironmentVariables("JELLYFIN_")
+ .AddInMemoryCollection(commandLineOpts.ConvertToConfig());
}
///
diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs
index 42c5fa86e3..0f15488f40 100644
--- a/Jellyfin.Server/StartupOptions.cs
+++ b/Jellyfin.Server/StartupOptions.cs
@@ -1,5 +1,8 @@
+using System.Collections.Generic;
+using System.Globalization;
using CommandLine;
using Emby.Server.Implementations;
+using MediaBrowser.Controller.Extensions;
namespace Jellyfin.Server
{
@@ -72,5 +75,15 @@ namespace Jellyfin.Server
///
[Option("restartargs", Required = false, HelpText = "Arguments for restart script.")]
public string? RestartArgs { get; set; }
+
+ ///
+ /// Gets the command line options as a dictionary that can be used in the .NET configuration system.
+ ///
+ /// The configuration dictionary.
+ public Dictionary ConvertToConfig()
+ => new Dictionary
+ {
+ { ConfigurationExtensions.NoWebContentKey, NoWebContent.ToString(CultureInfo.InvariantCulture) }
+ };
}
}
From 602112fba433fa8919133d7ff292b0cd5a912aa2 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Sun, 15 Mar 2020 16:24:04 +0100
Subject: [PATCH 28/95] Return 404 for static web resources when the
'nowebcontent' flag is set
---
.../Api/DashboardService.cs | 26 ++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 83cc6c6820..11901c25fb 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -7,12 +7,14 @@ using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Controller.Extensions;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Services;
+using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.WebDashboard.Api
@@ -113,6 +115,7 @@ namespace MediaBrowser.WebDashboard.Api
private readonly IFileSystem _fileSystem;
private IResourceFileManager _resourceFileManager;
+ private readonly IConfiguration _appConfig;
///
/// Initializes a new instance of the class.
@@ -123,7 +126,8 @@ namespace MediaBrowser.WebDashboard.Api
IServerConfigurationManager serverConfigurationManager,
IFileSystem fileSystem,
ILogger logger,
- IHttpResultFactory resultFactory)
+ IHttpResultFactory resultFactory,
+ IConfiguration appConfig)
{
_appHost = appHost;
_serverConfigurationManager = serverConfigurationManager;
@@ -131,16 +135,22 @@ namespace MediaBrowser.WebDashboard.Api
_logger = logger;
_resultFactory = resultFactory;
_resourceFileManager = resourceFileManager;
+ _appConfig = appConfig;
}
///
- /// Gets the path for the web interface.
+ /// Gets the path of the directory containing the static web interface content, or null if the server is not
+ /// hosting the static web content.
///
- /// The path for the web interface.
public string DashboardUIPath
{
get
{
+ if (_appConfig.NoWebContent())
+ {
+ return null;
+ }
+
if (!string.IsNullOrEmpty(_serverConfigurationManager.Configuration.DashboardSourcePath))
{
return _serverConfigurationManager.Configuration.DashboardSourcePath;
@@ -301,6 +311,11 @@ namespace MediaBrowser.WebDashboard.Api
/// System.Object.
public async Task
---
From 83f4494b9eede06c1b0d1e702997e1f7cd95a18e Mon Sep 17 00:00:00 2001
From: sparky8251
Date: Sun, 22 Mar 2020 19:17:57 -0400
Subject: [PATCH 41/95] Clean up minor formatting issue
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 3ad5dd8cb4..681076e3e7 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
-
+
From da4855ce4f590d7dc60b81bbf841e58f9220aac3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dennis=20M=2E=20P=C3=B6pperl?=
Date: Mon, 23 Mar 2020 13:43:48 +0000
Subject: [PATCH 42/95] Translated using Weblate (German) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/de/
---
Emby.Server.Implementations/Localization/Core/de.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/de.json b/Emby.Server.Implementations/Localization/Core/de.json
index fa1e16bed7..50a9664d59 100644
--- a/Emby.Server.Implementations/Localization/Core/de.json
+++ b/Emby.Server.Implementations/Localization/Core/de.json
@@ -3,7 +3,7 @@
"AppDeviceValues": "Anw: {0}, Gerät: {1}",
"Application": "Anwendung",
"Artists": "Interpreten",
- "AuthenticationSucceededWithUserName": "{0} erfolgreich angemeldet",
+ "AuthenticationSucceededWithUserName": "{0} hat sich erfolgreich authentifziert",
"Books": "Bücher",
"CameraImageUploadedFrom": "Ein neues Foto wurde von {0} hochgeladen",
"Channels": "Kanäle",
From 4836d1674bdc076431c0ac18171c1b97c7e254ce Mon Sep 17 00:00:00 2001
From: Ian Walton
Date: Mon, 23 Mar 2020 12:39:12 -0400
Subject: [PATCH 43/95] Don't return closed stream for subtitles.
(jellyfin/jellyfin#2650)
---
MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
index 72db569744..6284e0fd9e 100644
--- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
@@ -183,9 +183,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
private async Task GetSubtitleStream(string path, MediaProtocol protocol, bool requiresCharset, CancellationToken cancellationToken)
{
- using (var stream = await GetStream(path, protocol, cancellationToken).ConfigureAwait(false))
+ if (requiresCharset)
{
- if (requiresCharset)
+ using (var stream = await GetStream(path, protocol, cancellationToken).ConfigureAwait(false))
{
var result = CharsetDetector.DetectFromStream(stream).Detected;
stream.Position = 0;
@@ -200,9 +200,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
return new MemoryStream(Encoding.UTF8.GetBytes(text));
}
}
-
- return stream;
}
+
+ return File.OpenRead(path);
}
private async Task GetReadableFile(
From 128b18750f04649df7f7374ba8b08168dd49a591 Mon Sep 17 00:00:00 2001
From: Luke Foust
Date: Mon, 23 Mar 2020 10:56:54 -0700
Subject: [PATCH 44/95] Prevent FormatException when mapping TV series
---
.../Plugins/TheTvdb/TvdbSeriesProvider.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs
index 97a5b3478e..f6cd249f51 100644
--- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs
+++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs
@@ -344,7 +344,11 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
series.ProductionYear = date.Year;
}
- series.RunTimeTicks = TimeSpan.FromMinutes(Convert.ToDouble(tvdbSeries.Runtime)).Ticks;
+ if (!string.IsNullOrEmpty(tvdbSeries.Runtime) && double.TryParse(tvdbSeries.Runtime, out double runtime))
+ {
+ series.RunTimeTicks = TimeSpan.FromMinutes(runtime).Ticks;
+ }
+
foreach (var genre in tvdbSeries.Genre)
{
series.AddGenre(genre);
From 5a30d9ecfb5674440c7483cbb1bb2b078221defe Mon Sep 17 00:00:00 2001
From: Jose
Date: Tue, 24 Mar 2020 09:58:04 +0100
Subject: [PATCH 45/95] Added support for netstandard2.0 besides netstandard2.1
(multi target framework) to allow usage from UWP (netstandard 2.1 not
available in UWP until .net 5)
---
MediaBrowser.Model/Extensions/StringHelper.cs | 6 ++++++
MediaBrowser.Model/MediaBrowser.Model.csproj | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/MediaBrowser.Model/Extensions/StringHelper.cs b/MediaBrowser.Model/Extensions/StringHelper.cs
index f97a07096c..f819a295c6 100644
--- a/MediaBrowser.Model/Extensions/StringHelper.cs
+++ b/MediaBrowser.Model/Extensions/StringHelper.cs
@@ -22,6 +22,11 @@ namespace MediaBrowser.Model.Extensions
return str;
}
+#if NETSTANDARD2_0
+ char[] a = str.ToCharArray();
+ a[0] = char.ToUpperInvariant(a[0]);
+ return new string(a);
+#else
return string.Create(
str.Length,
str,
@@ -33,6 +38,7 @@ namespace MediaBrowser.Model.Extensions
chars[i] = buf[i];
}
});
+#endif
}
}
}
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 8ca554c5a5..217f23440a 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -1,4 +1,4 @@
-
+
Jellyfin Contributors
@@ -8,7 +8,7 @@
- netstandard2.1
+ netstandard2.0;netstandard2.1
false
true
true
From e9d1eabd53105ae15bca08f5722bbaa0bfa49758 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Tue, 24 Mar 2020 16:12:06 +0100
Subject: [PATCH 46/95] Remove unused usings
---
DvdLib/Ifo/Dvd.cs | 2 +-
Emby.Dlna/Didl/DidlBuilder.cs | 32 +++++++++----------
Emby.Dlna/Didl/Filter.cs | 1 -
Emby.Dlna/Main/DlnaEntryPoint.cs | 4 +--
.../Activity/ActivityLogEntryPoint.cs | 1 -
.../ServerConfigurationManager.cs | 2 +-
.../Data/SqliteItemRepository.cs | 25 ++++++++-------
.../Data/SqliteUserRepository.cs | 2 +-
.../HttpServer/FileWriter.cs | 2 +-
.../IO/ManagedFileSystem.cs | 10 +++---
.../Library/Resolvers/TV/SeriesResolver.cs | 1 -
.../Library/UserManager.cs | 18 +++++------
.../HdHomerun/HdHomerunUdpStream.cs | 2 +-
.../LiveTv/TunerHosts/LiveStream.cs | 2 +-
.../Networking/NetworkManager.cs | 2 +-
.../Tasks/RefreshMediaLibraryTask.cs | 3 +-
.../Services/SwaggerService.cs | 4 +--
Jellyfin.Server/CoreAppHost.cs | 1 -
.../Routines/DisableTranscodingThrottling.cs | 2 --
Jellyfin.Server/Program.cs | 5 +--
MediaBrowser.Api/BaseApiService.cs | 2 +-
MediaBrowser.Api/ChannelService.cs | 2 +-
MediaBrowser.Api/EnvironmentService.cs | 2 +-
MediaBrowser.Api/Playback/MediaInfoService.cs | 18 +++++------
MediaBrowser.Api/TvShowsService.cs | 2 +-
MediaBrowser.Controller/Entities/BaseItem.cs | 1 -
MediaBrowser.Controller/Entities/Person.cs | 1 -
.../Entities/PersonInfo.cs | 1 -
.../Library/NameExtensions.cs | 2 +-
.../MediaEncoding/EncodingHelper.cs | 7 ++--
.../MediaEncoding/EncodingJobInfo.cs | 2 +-
.../Sorting/SortExtensions.cs | 1 -
.../Attachments/AttachmentExtractor.cs | 2 +-
.../Encoder/MediaEncoder.cs | 2 +-
.../Probing/ProbeResultNormalizer.cs | 2 +-
.../Subtitles/SubtitleEncoder.cs | 8 ++---
.../Dlna/ResolutionNormalizer.cs | 1 -
MediaBrowser.Model/Dlna/SearchCriteria.cs | 1 -
.../Entities/DisplayPreferences.cs | 2 +-
MediaBrowser.Model/Entities/MediaStream.cs | 6 ++--
MediaBrowser.Model/Entities/SeriesStatus.cs | 2 +-
MediaBrowser.Model/Entities/SortOrder.cs | 2 +-
.../Music/ArtistMetadataService.cs | 8 ++---
.../Plugins/MusicBrainz/AlbumProvider.cs | 3 +-
.../Plugins/TheTvdb/TvdbClientManager.cs | 8 ++---
.../Plugins/TheTvdb/TvdbEpisodeProvider.cs | 2 +-
.../Tmdb/Models/General/Profile.cs | 10 +++---
RSSDP/DisposableManagedObjectBase.cs | 2 +-
RSSDP/SsdpCommunicationsServer.cs | 4 +--
.../FirstTimeSetupOrElevatedHandlerTests.cs | 4 +--
.../RequiresElevationHandlerTests.cs | 4 +--
51 files changed, 112 insertions(+), 123 deletions(-)
diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs
index 157b2e197f..c0f9cf4107 100644
--- a/DvdLib/Ifo/Dvd.cs
+++ b/DvdLib/Ifo/Dvd.cs
@@ -33,7 +33,7 @@ namespace DvdLib.Ifo
continue;
}
- var nums = ifo.Name.Split(new [] { '_' }, StringSplitOptions.RemoveEmptyEntries);
+ var nums = ifo.Name.Split(new[] { '_' }, StringSplitOptions.RemoveEmptyEntries);
if (nums.Length >= 2 && ushort.TryParse(nums[1], out var ifoNumber))
{
ReadVTS(ifoNumber, ifo.FullName);
diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs
index 45335f90d7..efc86f333d 100644
--- a/Emby.Dlna/Didl/DidlBuilder.cs
+++ b/Emby.Dlna/Didl/DidlBuilder.cs
@@ -392,24 +392,24 @@ namespace Emby.Dlna.Didl
{
switch (itemStubType.Value)
{
- case StubType.Latest: return _localization.GetLocalizedString("Latest");
- case StubType.Playlists: return _localization.GetLocalizedString("Playlists");
- case StubType.AlbumArtists: return _localization.GetLocalizedString("HeaderAlbumArtists");
- case StubType.Albums: return _localization.GetLocalizedString("Albums");
- case StubType.Artists: return _localization.GetLocalizedString("Artists");
- case StubType.Songs: return _localization.GetLocalizedString("Songs");
- case StubType.Genres: return _localization.GetLocalizedString("Genres");
- case StubType.FavoriteAlbums: return _localization.GetLocalizedString("HeaderFavoriteAlbums");
- case StubType.FavoriteArtists: return _localization.GetLocalizedString("HeaderFavoriteArtists");
- case StubType.FavoriteSongs: return _localization.GetLocalizedString("HeaderFavoriteSongs");
+ case StubType.Latest: return _localization.GetLocalizedString("Latest");
+ case StubType.Playlists: return _localization.GetLocalizedString("Playlists");
+ case StubType.AlbumArtists: return _localization.GetLocalizedString("HeaderAlbumArtists");
+ case StubType.Albums: return _localization.GetLocalizedString("Albums");
+ case StubType.Artists: return _localization.GetLocalizedString("Artists");
+ case StubType.Songs: return _localization.GetLocalizedString("Songs");
+ case StubType.Genres: return _localization.GetLocalizedString("Genres");
+ case StubType.FavoriteAlbums: return _localization.GetLocalizedString("HeaderFavoriteAlbums");
+ case StubType.FavoriteArtists: return _localization.GetLocalizedString("HeaderFavoriteArtists");
+ case StubType.FavoriteSongs: return _localization.GetLocalizedString("HeaderFavoriteSongs");
case StubType.ContinueWatching: return _localization.GetLocalizedString("HeaderContinueWatching");
- case StubType.Movies: return _localization.GetLocalizedString("Movies");
- case StubType.Collections: return _localization.GetLocalizedString("Collections");
- case StubType.Favorites: return _localization.GetLocalizedString("Favorites");
- case StubType.NextUp: return _localization.GetLocalizedString("HeaderNextUp");
- case StubType.FavoriteSeries: return _localization.GetLocalizedString("HeaderFavoriteShows");
+ case StubType.Movies: return _localization.GetLocalizedString("Movies");
+ case StubType.Collections: return _localization.GetLocalizedString("Collections");
+ case StubType.Favorites: return _localization.GetLocalizedString("Favorites");
+ case StubType.NextUp: return _localization.GetLocalizedString("HeaderNextUp");
+ case StubType.FavoriteSeries: return _localization.GetLocalizedString("HeaderFavoriteShows");
case StubType.FavoriteEpisodes: return _localization.GetLocalizedString("HeaderFavoriteEpisodes");
- case StubType.Series: return _localization.GetLocalizedString("Shows");
+ case StubType.Series: return _localization.GetLocalizedString("Shows");
default: break;
}
}
diff --git a/Emby.Dlna/Didl/Filter.cs b/Emby.Dlna/Didl/Filter.cs
index f6217d91ef..412259e904 100644
--- a/Emby.Dlna/Didl/Filter.cs
+++ b/Emby.Dlna/Didl/Filter.cs
@@ -1,7 +1,6 @@
#pragma warning disable CS1591
using System;
-using MediaBrowser.Model.Extensions;
namespace Emby.Dlna.Didl
{
diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs
index 770d481680..ba416ce09a 100644
--- a/Emby.Dlna/Main/DlnaEntryPoint.cs
+++ b/Emby.Dlna/Main/DlnaEntryPoint.cs
@@ -262,8 +262,8 @@ namespace Emby.Dlna.Main
{
if (address.AddressFamily == AddressFamily.InterNetworkV6)
{
- // Not support IPv6 right now
- continue;
+ // Not support IPv6 right now
+ continue;
}
var fullService = "urn:schemas-upnp-org:device:MediaServer:1";
diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
index 332dfa95c8..d900520b2a 100644
--- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
+++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
@@ -8,7 +8,6 @@ using System.Text;
using System.Threading.Tasks;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Updates;
-using MediaBrowser.Controller;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Entities;
diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
index 30b654886b..f407317ec7 100644
--- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
+++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
@@ -132,7 +132,7 @@ namespace Emby.Server.Implementations.Configuration
var newPath = newConfig.MetadataPath;
if (!string.IsNullOrWhiteSpace(newPath)
- && !string.Equals(Configuration.MetadataPath, newPath, StringComparison.Ordinal))
+ && !string.Equals(Configuration.MetadataPath, newPath, StringComparison.Ordinal))
{
// Validate
if (!Directory.Exists(newPath))
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 0eb396af47..f77a6103b1 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -454,7 +454,7 @@ namespace Emby.Server.Implementations.Data
private static string GetSaveItemCommandText()
{
- var saveColumns = new []
+ var saveColumns = new[]
{
"guid",
"type",
@@ -560,7 +560,7 @@ namespace Emby.Server.Implementations.Data
throw new ArgumentNullException(nameof(item));
}
- SaveItems(new [] { item }, cancellationToken);
+ SaveItems(new[] { item }, cancellationToken);
}
public void SaveImages(BaseItem item)
@@ -1622,7 +1622,7 @@ namespace Emby.Server.Implementations.Data
{
IEnumerable GetLockedFields(string s)
{
- foreach (var i in s.Split(new [] { '|' }, StringSplitOptions.RemoveEmptyEntries))
+ foreach (var i in s.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries))
{
if (Enum.TryParse(i, true, out MetadataFields parsedValue))
{
@@ -1818,7 +1818,7 @@ namespace Emby.Server.Implementations.Data
{
if (!reader.IsDBNull(index))
{
- item.ProductionLocations = reader.GetString(index).Split(new [] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
+ item.ProductionLocations = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
}
index++;
}
@@ -2897,8 +2897,8 @@ namespace Emby.Server.Implementations.Data
BindSimilarParams(query, statement);
BindSearchParams(query, statement);
- // Running this again will bind the params
- GetWhereClauses(query, statement);
+ // Running this again will bind the params
+ GetWhereClauses(query, statement);
result.TotalRecordCount = statement.ExecuteQuery().SelectScalarInt().First();
}
@@ -2925,7 +2925,7 @@ namespace Emby.Server.Implementations.Data
prepend.Add(("SearchScore", SortOrder.Descending));
prepend.Add((ItemSortBy.SortName, SortOrder.Ascending));
}
-
+
if (hasSimilar)
{
prepend.Add(("SimilarityScore", SortOrder.Descending));
@@ -3266,8 +3266,8 @@ namespace Emby.Server.Implementations.Data
BindSimilarParams(query, statement);
BindSearchParams(query, statement);
- // Running this again will bind the params
- GetWhereClauses(query, statement);
+ // Running this again will bind the params
+ GetWhereClauses(query, statement);
foreach (var row in statement.ExecuteQuery())
{
@@ -3288,8 +3288,8 @@ namespace Emby.Server.Implementations.Data
BindSimilarParams(query, statement);
BindSearchParams(query, statement);
- // Running this again will bind the params
- GetWhereClauses(query, statement);
+ // Running this again will bind the params
+ GetWhereClauses(query, statement);
result.TotalRecordCount = statement.ExecuteQuery().SelectScalarInt().First();
}
@@ -6159,7 +6159,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
item.ColorTransfer = reader[34].ToString();
}
- if (item.Type == MediaStreamType.Subtitle){
+ if (item.Type == MediaStreamType.Subtitle)
+ {
item.localizedUndefined = _localization.GetLocalizedString("Undefined");
item.localizedDefault = _localization.GetLocalizedString("Default");
item.localizedForced = _localization.GetLocalizedString("Forced");
diff --git a/Emby.Server.Implementations/Data/SqliteUserRepository.cs b/Emby.Server.Implementations/Data/SqliteUserRepository.cs
index a042320c91..fee4b7f3c4 100644
--- a/Emby.Server.Implementations/Data/SqliteUserRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteUserRepository.cs
@@ -25,7 +25,7 @@ namespace Emby.Server.Implementations.Data
IServerApplicationPaths appPaths)
: base(logger)
{
- _jsonOptions = JsonDefaults.GetOptions();;
+ _jsonOptions = JsonDefaults.GetOptions(); ;
DbFilePath = Path.Combine(appPaths.DataPath, "users.db");
}
diff --git a/Emby.Server.Implementations/HttpServer/FileWriter.cs b/Emby.Server.Implementations/HttpServer/FileWriter.cs
index 82f1e5b529..0b61e40b05 100644
--- a/Emby.Server.Implementations/HttpServer/FileWriter.cs
+++ b/Emby.Server.Implementations/HttpServer/FileWriter.cs
@@ -11,8 +11,8 @@ using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Services;
-using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
namespace Emby.Server.Implementations.HttpServer
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
index 48599beb7b..7461ec4f1d 100644
--- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
@@ -587,11 +587,11 @@ namespace Emby.Server.Implementations.IO
// some drives on linux have no actual size or are used for other purposes
return DriveInfo.GetDrives().Where(d => d.IsReady && d.TotalSize != 0 && d.DriveType != DriveType.Ram)
.Select(d => new FileSystemMetadata
- {
- Name = d.Name,
- FullName = d.RootDirectory.FullName,
- IsDirectory = true
- }).ToList();
+ {
+ Name = d.Name,
+ FullName = d.RootDirectory.FullName,
+ IsDirectory = true
+ }).ToList();
}
public virtual IEnumerable GetDirectories(string path, bool recursive = false)
diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
index c759e71151..dd6bd8ee87 100644
--- a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
@@ -8,7 +8,6 @@ using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers;
-using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging;
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs
index 25d733a651..7b17cc913f 100644
--- a/Emby.Server.Implementations/Library/UserManager.cs
+++ b/Emby.Server.Implementations/Library/UserManager.cs
@@ -805,17 +805,17 @@ namespace Emby.Server.Implementations.Library
// Delete user config dir
lock (_configSyncLock)
- lock (_policySyncLock)
- {
- try
- {
- Directory.Delete(user.ConfigurationDirectoryPath, true);
- }
- catch (IOException ex)
+ lock (_policySyncLock)
{
- _logger.LogError(ex, "Error deleting user config dir: {Path}", user.ConfigurationDirectoryPath);
+ try
+ {
+ Directory.Delete(user.ConfigurationDirectoryPath, true);
+ }
+ catch (IOException ex)
+ {
+ _logger.LogError(ex, "Error deleting user config dir: {Path}", user.ConfigurationDirectoryPath);
+ }
}
- }
_users.TryRemove(user.Id, out _);
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
index 77669da39f..1bad389822 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
@@ -8,8 +8,8 @@ using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Common.Net;
using MediaBrowser.Common.Configuration;
+using MediaBrowser.Common.Net;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Dto;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
index 5354489f9c..9fa042090c 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
@@ -8,8 +8,8 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Controller.Library;
using MediaBrowser.Common.Configuration;
+using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.LiveTv;
diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs
index 1d8d3cf395..b3e88b6675 100644
--- a/Emby.Server.Implementations/Networking/NetworkManager.cs
+++ b/Emby.Server.Implementations/Networking/NetworkManager.cs
@@ -500,7 +500,7 @@ namespace Emby.Server.Implementations.Networking
{
if (ip.Address.Equals(address) && ip.IPv4Mask != null)
{
- return ip.IPv4Mask;
+ return ip.IPv4Mask;
}
}
}
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
index 0736780191..99e5ab2cf1 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
@@ -38,7 +38,8 @@ namespace Emby.Server.Implementations.ScheduledTasks
{
yield return new TaskTriggerInfo
{
- Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(12).Ticks
+ Type = TaskTriggerInfo.TriggerInterval,
+ IntervalTicks = TimeSpan.FromHours(12).Ticks
};
}
diff --git a/Emby.Server.Implementations/Services/SwaggerService.cs b/Emby.Server.Implementations/Services/SwaggerService.cs
index c30f32af94..5177251c3e 100644
--- a/Emby.Server.Implementations/Services/SwaggerService.cs
+++ b/Emby.Server.Implementations/Services/SwaggerService.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Emby.Server.Implementations.HttpServer;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Services;
-using Emby.Server.Implementations.HttpServer;
namespace Emby.Server.Implementations.Services
{
@@ -241,7 +241,7 @@ namespace Emby.Server.Implementations.Services
responses = responses,
- security = new [] { apiKeySecurity }
+ security = new[] { apiKeySecurity }
};
}
diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs
index ed5968ad6f..1d5313c13e 100644
--- a/Jellyfin.Server/CoreAppHost.cs
+++ b/Jellyfin.Server/CoreAppHost.cs
@@ -4,7 +4,6 @@ using Emby.Server.Implementations;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.IO;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Server
diff --git a/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs
index 673f0e4155..6f8e4a8ffb 100644
--- a/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs
+++ b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs
@@ -1,8 +1,6 @@
using System;
-using System.IO;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Configuration;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Server.Migrations.Routines
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index e9e852349c..9e8ac2e9ab 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -1,6 +1,5 @@
using System;
using System.Diagnostics;
-using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
@@ -18,7 +17,6 @@ using Emby.Server.Implementations.Networking;
using Jellyfin.Drawing.Skia;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Drawing;
-using MediaBrowser.Model.Globalization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -26,7 +24,6 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Serilog;
-using Serilog.Events;
using Serilog.Extensions.Logging;
using SQLitePCL;
using ILogger = Microsoft.Extensions.Logging.ILogger;
@@ -531,7 +528,7 @@ namespace Jellyfin.Server
}
catch (Exception ex)
{
- _logger.LogWarning(ex, "Skia not available. Will fallback to NullIMageEncoder.");
+ _logger.LogWarning(ex, "Skia not available. Will fallback to NullImageEncoder.");
}
return new NullImageEncoder();
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs
index 2b994d2799..112ee8f79a 100644
--- a/MediaBrowser.Api/BaseApiService.cs
+++ b/MediaBrowser.Api/BaseApiService.cs
@@ -9,8 +9,8 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Services;
using MediaBrowser.Model.Querying;
+using MediaBrowser.Model.Services;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api
diff --git a/MediaBrowser.Api/ChannelService.cs b/MediaBrowser.Api/ChannelService.cs
index 92c32f2ad5..6139ba1560 100644
--- a/MediaBrowser.Api/ChannelService.cs
+++ b/MediaBrowser.Api/ChannelService.cs
@@ -4,8 +4,8 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Api.UserLibrary;
-using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Channels;
+using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs
index 322b9805ba..36b03f09ce 100644
--- a/MediaBrowser.Api/EnvironmentService.cs
+++ b/MediaBrowser.Api/EnvironmentService.cs
@@ -177,7 +177,7 @@ namespace MediaBrowser.Api
}
public object Get(GetDefaultDirectoryBrowser request) =>
- ToOptimizedResult(new DefaultDirectoryBrowserInfo {Path = null});
+ ToOptimizedResult(new DefaultDirectoryBrowserInfo { Path = null });
///
/// Gets the specified request.
diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs
index 2aa5e2df1f..d74ec3ca63 100644
--- a/MediaBrowser.Api/Playback/MediaInfoService.cs
+++ b/MediaBrowser.Api/Playback/MediaInfoService.cs
@@ -5,8 +5,8 @@
using System;
using System.Buffers;
using System.Globalization;
-using System.Text.Json;
using System.Linq;
+using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Net;
@@ -470,7 +470,7 @@ namespace MediaBrowser.Api.Playback
else
{
options.MaxBitrate = GetMaxBitrate(maxBitrate, user);
-
+
if (item is Audio)
{
if (!user.Policy.EnableAudioPlaybackTranscoding)
@@ -486,10 +486,10 @@ namespace MediaBrowser.Api.Playback
}
}
- // The MediaSource supports direct stream, now test to see if the client supports it
- var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase)
- ? streamBuilder.BuildAudioItem(options)
- : streamBuilder.BuildVideoItem(options);
+ // The MediaSource supports direct stream, now test to see if the client supports it
+ var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase)
+ ? streamBuilder.BuildAudioItem(options)
+ : streamBuilder.BuildVideoItem(options);
if (streamInfo == null || !streamInfo.IsDirectStream)
{
@@ -516,7 +516,7 @@ namespace MediaBrowser.Api.Playback
{
if (streamInfo != null)
{
- streamInfo.PlaySessionId = playSessionId;
+ streamInfo.PlaySessionId = playSessionId;
streamInfo.StartPositionTicks = startTimeTicks;
mediaSource.TranscodingUrl = streamInfo.ToUrl("-", auth.Token).TrimStart('-');
mediaSource.TranscodingUrl += "&allowVideoStreamCopy=false";
@@ -526,10 +526,10 @@ namespace MediaBrowser.Api.Playback
}
mediaSource.TranscodingContainer = streamInfo.Container;
mediaSource.TranscodingSubProtocol = streamInfo.SubProtocol;
-
+
// Do this after the above so that StartPositionTicks is set
SetDeviceSpecificSubtitleInfo(streamInfo, mediaSource, auth.Token);
- }
+ }
}
else
{
diff --git a/MediaBrowser.Api/TvShowsService.cs b/MediaBrowser.Api/TvShowsService.cs
index b843f7096f..334d1db512 100644
--- a/MediaBrowser.Api/TvShowsService.cs
+++ b/MediaBrowser.Api/TvShowsService.cs
@@ -12,8 +12,8 @@ using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.TV;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Services;
using MediaBrowser.Model.Querying;
+using MediaBrowser.Model.Services;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index a9ec19e2fd..7380e6da15 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -15,7 +15,6 @@ using MediaBrowser.Controller.Extensions;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Providers;
-using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
diff --git a/MediaBrowser.Controller/Entities/Person.cs b/MediaBrowser.Controller/Entities/Person.cs
index 64e216e69f..9e4f9d47ed 100644
--- a/MediaBrowser.Controller/Entities/Person.cs
+++ b/MediaBrowser.Controller/Entities/Person.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text.Json.Serialization;
using MediaBrowser.Controller.Extensions;
using MediaBrowser.Controller.Providers;
-using MediaBrowser.Model.Entities;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Controller.Entities
diff --git a/MediaBrowser.Controller/Entities/PersonInfo.cs b/MediaBrowser.Controller/Entities/PersonInfo.cs
index e90c55a8ac..f3ec73b322 100644
--- a/MediaBrowser.Controller/Entities/PersonInfo.cs
+++ b/MediaBrowser.Controller/Entities/PersonInfo.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
using System.Collections.Generic;
using MediaBrowser.Model.Entities;
diff --git a/MediaBrowser.Controller/Library/NameExtensions.cs b/MediaBrowser.Controller/Library/NameExtensions.cs
index 6b0b7e53ac..24d0347e9d 100644
--- a/MediaBrowser.Controller/Library/NameExtensions.cs
+++ b/MediaBrowser.Controller/Library/NameExtensions.cs
@@ -1,6 +1,6 @@
using System;
-using System.Linq;
using System.Collections.Generic;
+using System.Linq;
using MediaBrowser.Controller.Extensions;
namespace MediaBrowser.Controller.Library
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 342c764146..663ec07011 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -1588,7 +1588,8 @@ namespace MediaBrowser.Controller.MediaEncoding
// Add parameters to use VAAPI with burn-in subttiles (GH issue #642)
if (state.SubtitleStream != null
&& state.SubtitleStream.IsTextSubtitleStream
- && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) {
+ && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode)
+ {
outputSizeParam += ",hwmap=mode=read+write+direct";
}
}
@@ -1953,7 +1954,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
var hwType = options.HardwareAccelerationType ?? string.Empty;
- if (string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding )
+ if (string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding)
{
filters.Add("hwdownload");
@@ -2637,7 +2638,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
- if(Environment.OSVersion.Version.Major > 6 || (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor > 1))
+ if (Environment.OSVersion.Version.Major > 6 || (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor > 1))
return "-hwaccel d3d11va";
else
return "-hwaccel dxva2";
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
index 38ef33cafd..1127a08ded 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
@@ -9,8 +9,8 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.MediaInfo;
-using MediaBrowser.Model.Session;
using MediaBrowser.Model.Net;
+using MediaBrowser.Model.Session;
namespace MediaBrowser.Controller.MediaEncoding
{
diff --git a/MediaBrowser.Controller/Sorting/SortExtensions.cs b/MediaBrowser.Controller/Sorting/SortExtensions.cs
index f5ee574a2d..2a68f46789 100644
--- a/MediaBrowser.Controller/Sorting/SortExtensions.cs
+++ b/MediaBrowser.Controller/Sorting/SortExtensions.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
namespace MediaBrowser.Controller.Sorting
{
diff --git a/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs b/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs
index c530c9fd81..43d33c716f 100644
--- a/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs
+++ b/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs
@@ -1,6 +1,6 @@
using System;
-using System.Diagnostics;
using System.Collections.Concurrent;
+using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 4123f0203a..8c46af7dbc 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -20,8 +20,8 @@ using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.System;
-using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.MediaEncoding.Encoder
{
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
index f8047af426..ded8dffd64 100644
--- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
+++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
@@ -539,7 +539,7 @@ namespace MediaBrowser.MediaEncoding.Probing
if (!string.IsNullOrWhiteSpace(streamInfo.CodecTagString))
{
- attachment.CodecTag = streamInfo.CodecTagString;
+ attachment.CodecTag = streamInfo.CodecTagString;
}
if (streamInfo.Tags != null)
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
index 72db569744..4deca120d1 100644
--- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
@@ -753,10 +753,10 @@ namespace MediaBrowser.MediaEncoding.Subtitles
return _httpClient.Get(opts);
- case MediaProtocol.File:
- return Task.FromResult(File.OpenRead(path));
- default:
- throw new ArgumentOutOfRangeException(nameof(protocol));
+ case MediaProtocol.File:
+ return Task.FromResult(File.OpenRead(path));
+ default:
+ throw new ArgumentOutOfRangeException(nameof(protocol));
}
}
}
diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
index 6a58b4adcb..8235b72d13 100644
--- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
+++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
@@ -1,7 +1,6 @@
#pragma warning disable CS1591
using System;
-using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.Dlna
{
diff --git a/MediaBrowser.Model/Dlna/SearchCriteria.cs b/MediaBrowser.Model/Dlna/SearchCriteria.cs
index dc6d201aed..394fb9af95 100644
--- a/MediaBrowser.Model/Dlna/SearchCriteria.cs
+++ b/MediaBrowser.Model/Dlna/SearchCriteria.cs
@@ -2,7 +2,6 @@
using System;
using System.Text.RegularExpressions;
-using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.Dlna
{
diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs
index 499baa0588..2cd8bd3065 100644
--- a/MediaBrowser.Model/Entities/DisplayPreferences.cs
+++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs
@@ -101,7 +101,7 @@ namespace MediaBrowser.Model.Entities
///
/// true if [show sidebar]; otherwise, false.
public bool ShowSidebar { get; set; }
-
+
///
/// Gets or sets the client
///
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 37f9d7c1ad..e7e8d7cecd 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -69,9 +69,9 @@ namespace MediaBrowser.Model.Entities
}
}
- public string localizedUndefined { get; set; }
- public string localizedDefault { get; set; }
- public string localizedForced { get; set; }
+ public string localizedUndefined { get; set; }
+ public string localizedDefault { get; set; }
+ public string localizedForced { get; set; }
public string DisplayTitle
{
diff --git a/MediaBrowser.Model/Entities/SeriesStatus.cs b/MediaBrowser.Model/Entities/SeriesStatus.cs
index 51351c1355..c77c4a8ad9 100644
--- a/MediaBrowser.Model/Entities/SeriesStatus.cs
+++ b/MediaBrowser.Model/Entities/SeriesStatus.cs
@@ -9,7 +9,7 @@ namespace MediaBrowser.Model.Entities
/// The continuing.
///
Continuing,
-
+
///
/// The ended.
///
diff --git a/MediaBrowser.Model/Entities/SortOrder.cs b/MediaBrowser.Model/Entities/SortOrder.cs
index e6cb6fd09e..f3abc06f33 100644
--- a/MediaBrowser.Model/Entities/SortOrder.cs
+++ b/MediaBrowser.Model/Entities/SortOrder.cs
@@ -9,7 +9,7 @@ namespace MediaBrowser.Model.Entities
/// The ascending.
///
Ascending,
-
+
///
/// The descending.
///
diff --git a/MediaBrowser.Providers/Music/ArtistMetadataService.cs b/MediaBrowser.Providers/Music/ArtistMetadataService.cs
index f90a631c65..5a30260a52 100644
--- a/MediaBrowser.Providers/Music/ArtistMetadataService.cs
+++ b/MediaBrowser.Providers/Music/ArtistMetadataService.cs
@@ -31,10 +31,10 @@ namespace MediaBrowser.Providers.Music
{
return item.IsAccessedByName
? item.GetTaggedItems(new InternalItemsQuery
- {
- Recursive = true,
- IsFolder = false
- })
+ {
+ Recursive = true,
+ IsFolder = false
+ })
: item.GetRecursiveChildren(i => i is IHasArtist && !i.IsFolder);
}
diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs
index bc973dee5a..31cdaf616a 100644
--- a/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs
+++ b/MediaBrowser.Providers/Plugins/MusicBrainz/AlbumProvider.cs
@@ -5,6 +5,7 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
+using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -775,7 +776,7 @@ namespace MediaBrowser.Providers.Music
_logger.LogDebug("GetMusicBrainzResponse: Time since previous request: {0} ms", _stopWatchMusicBrainz.ElapsedMilliseconds);
_stopWatchMusicBrainz.Restart();
- response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false);
+ response = await _httpClient.SendAsync(options, HttpMethod.Get).ConfigureAwait(false);
// We retry a finite number of times, and only whilst MB is indicating 503 (throttling)
}
diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs
index a12b4d3ada..b73834155c 100644
--- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs
@@ -60,21 +60,21 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
CancellationToken cancellationToken)
{
var cacheKey = GenerateKey("series", name, language);
- return TryGetValue(cacheKey, language,() => TvDbClient.Search.SearchSeriesByNameAsync(name, cancellationToken));
+ return TryGetValue(cacheKey, language, () => TvDbClient.Search.SearchSeriesByNameAsync(name, cancellationToken));
}
public Task> GetSeriesByIdAsync(int tvdbId, string language,
CancellationToken cancellationToken)
{
var cacheKey = GenerateKey("series", tvdbId, language);
- return TryGetValue(cacheKey, language,() => TvDbClient.Series.GetAsync(tvdbId, cancellationToken));
+ return TryGetValue(cacheKey, language, () => TvDbClient.Series.GetAsync(tvdbId, cancellationToken));
}
public Task> GetEpisodesAsync(int episodeTvdbId, string language,
CancellationToken cancellationToken)
{
var cacheKey = GenerateKey("episode", episodeTvdbId, language);
- return TryGetValue(cacheKey, language,() => TvDbClient.Episodes.GetAsync(episodeTvdbId, cancellationToken));
+ return TryGetValue(cacheKey, language, () => TvDbClient.Episodes.GetAsync(episodeTvdbId, cancellationToken));
}
public async Task> GetAllEpisodesAsync(int tvdbId, string language,
@@ -109,7 +109,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
CancellationToken cancellationToken)
{
var cacheKey = GenerateKey("series", imdbId, language);
- return TryGetValue(cacheKey, language,() => TvDbClient.Search.SearchSeriesByImdbIdAsync(imdbId, cancellationToken));
+ return TryGetValue(cacheKey, language, () => TvDbClient.Search.SearchSeriesByImdbIdAsync(imdbId, cancellationToken));
}
public Task> GetSeriesByZap2ItIdAsync(
diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs
index f58c58a2ea..08c2a74d2c 100644
--- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs
+++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs
@@ -201,7 +201,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
continue;
}
- var roles = new List {currentActor.Substring(roleStartIndex + 1)};
+ var roles = new List { currentActor.Substring(roleStartIndex + 1) };
// Fetch all roles
for (var j = i + 1; j < episode.GuestStars.Length; ++j)
diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Profile.cs b/MediaBrowser.Providers/Tmdb/Models/General/Profile.cs
index 73a049c732..f87d14850c 100644
--- a/MediaBrowser.Providers/Tmdb/Models/General/Profile.cs
+++ b/MediaBrowser.Providers/Tmdb/Models/General/Profile.cs
@@ -2,10 +2,10 @@ namespace MediaBrowser.Providers.Tmdb.Models.General
{
public class Profile
{
- public string File_Path { get; set; }
- public int Width { get; set; }
- public int Height { get; set; }
- public object Iso_639_1 { get; set; }
- public double Aspect_Ratio { get; set; }
+ public string File_Path { get; set; }
+ public int Width { get; set; }
+ public int Height { get; set; }
+ public object Iso_639_1 { get; set; }
+ public double Aspect_Ratio { get; set; }
}
}
diff --git a/RSSDP/DisposableManagedObjectBase.cs b/RSSDP/DisposableManagedObjectBase.cs
index bb36229c40..39589f0225 100644
--- a/RSSDP/DisposableManagedObjectBase.cs
+++ b/RSSDP/DisposableManagedObjectBase.cs
@@ -72,7 +72,7 @@ namespace Rssdp.Infrastructure
/// Sets the property to true. Does not explicitly throw an exception if called multiple times, but makes no promises about behaviour of derived classes.
///
///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification="We do exactly as asked, but CA doesn't seem to like us also setting the IsDisposed property. Too bad, it's a good idea and shouldn't cause an exception or anything likely to interfer with the dispose process.")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification = "We do exactly as asked, but CA doesn't seem to like us also setting the IsDisposed property. Too bad, it's a good idea and shouldn't cause an exception or anything likely to interfer with the dispose process.")]
public void Dispose()
{
IsDisposed = true;
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index 0aa985a261..18097ef241 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -8,9 +8,9 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Net;
-using Microsoft.Extensions.Logging;
-using MediaBrowser.Model.Net;
using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Model.Net;
+using Microsoft.Extensions.Logging;
namespace Rssdp.Infrastructure
{
diff --git a/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupOrElevatedPolicy/FirstTimeSetupOrElevatedHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupOrElevatedPolicy/FirstTimeSetupOrElevatedHandlerTests.cs
index 84cdbe360d..e40af703f9 100644
--- a/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupOrElevatedPolicy/FirstTimeSetupOrElevatedHandlerTests.cs
+++ b/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupOrElevatedPolicy/FirstTimeSetupOrElevatedHandlerTests.cs
@@ -23,7 +23,7 @@ namespace Jellyfin.Api.Tests.Auth.FirstTimeSetupOrElevatedPolicy
{
var fixture = new Fixture().Customize(new AutoMoqCustomization());
_configurationManagerMock = fixture.Freeze>();
- _requirements = new List {new FirstTimeSetupOrElevatedRequirement()};
+ _requirements = new List { new FirstTimeSetupOrElevatedRequirement() };
_sut = fixture.Create();
}
@@ -58,7 +58,7 @@ namespace Jellyfin.Api.Tests.Auth.FirstTimeSetupOrElevatedPolicy
private static ClaimsPrincipal SetupUser(string role)
{
- var claims = new[] {new Claim(ClaimTypes.Role, role)};
+ var claims = new[] { new Claim(ClaimTypes.Role, role) };
var identity = new ClaimsIdentity(claims);
return new ClaimsPrincipal(identity);
}
diff --git a/tests/Jellyfin.Api.Tests/Auth/RequiresElevationPolicy/RequiresElevationHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/RequiresElevationPolicy/RequiresElevationHandlerTests.cs
index e2beea1ad8..cd05a8328d 100644
--- a/tests/Jellyfin.Api.Tests/Auth/RequiresElevationPolicy/RequiresElevationHandlerTests.cs
+++ b/tests/Jellyfin.Api.Tests/Auth/RequiresElevationPolicy/RequiresElevationHandlerTests.cs
@@ -23,9 +23,9 @@ namespace Jellyfin.Api.Tests.Auth.RequiresElevationPolicy
[InlineData(UserRoles.Guest, false)]
public async Task ShouldHandleRolesCorrectly(string role, bool shouldSucceed)
{
- var requirements = new List {new RequiresElevationRequirement()};
+ var requirements = new List { new RequiresElevationRequirement() };
- var claims = new[] {new Claim(ClaimTypes.Role, role)};
+ var claims = new[] { new Claim(ClaimTypes.Role, role) };
var identity = new ClaimsIdentity(claims);
var user = new ClaimsPrincipal(identity);
From 7915c6ca73ef6a3d36a60b11f0f929d192aacc20 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Tue, 24 Mar 2020 16:16:13 +0100
Subject: [PATCH 47/95] Remove extra ;
---
Emby.Server.Implementations/Data/SqliteUserRepository.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Data/SqliteUserRepository.cs b/Emby.Server.Implementations/Data/SqliteUserRepository.cs
index fee4b7f3c4..0c3f26974f 100644
--- a/Emby.Server.Implementations/Data/SqliteUserRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteUserRepository.cs
@@ -25,7 +25,7 @@ namespace Emby.Server.Implementations.Data
IServerApplicationPaths appPaths)
: base(logger)
{
- _jsonOptions = JsonDefaults.GetOptions(); ;
+ _jsonOptions = JsonDefaults.GetOptions();
DbFilePath = Path.Combine(appPaths.DataPath, "users.db");
}
From 4bccaafb57abbc75858896374d42819f1c73fb20 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Tue, 24 Mar 2020 16:27:54 +0100
Subject: [PATCH 48/95] Use 'Length' instead of 'Any()' for an array
---
MediaBrowser.WebDashboard/Api/DashboardService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index a71d685fbb..1ca035f7bd 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -140,7 +140,7 @@ namespace MediaBrowser.WebDashboard.Api
if (appConfig.HostWebClient())
{
string webContentPath = DashboardUIPath;
- if (!Directory.Exists(webContentPath) || !Directory.GetFiles(webContentPath).Any())
+ if (!Directory.Exists(webContentPath) || Directory.GetFiles(webContentPath).Length == 0)
{
throw new InvalidOperationException(
"The server is expected to host the web client, but the provided content directory is either " +
From eb09d47ed252f0fc5af3ea33417f558d68a109e8 Mon Sep 17 00:00:00 2001
From: Bond-009
Date: Tue, 24 Mar 2020 17:43:11 +0100
Subject: [PATCH 49/95] Update Jellyfin.Server/Program.cs
Co-Authored-By: Mark Monteiro
---
Jellyfin.Server/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 9e8ac2e9ab..8a7420780c 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -528,7 +528,7 @@ namespace Jellyfin.Server
}
catch (Exception ex)
{
- _logger.LogWarning(ex, "Skia not available. Will fallback to NullImageEncoder.");
+ _logger.LogWarning(ex, $"Skia not available. Will fallback to {nameof(NullImageEncoder)}.");
}
return new NullImageEncoder();
From 37ff36226bbd4c942b87e1bf1d47682b78098868 Mon Sep 17 00:00:00 2001
From: Mathis
Date: Tue, 24 Mar 2020 21:59:24 +0000
Subject: [PATCH 50/95] Translated using Weblate (German) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/de/
---
Emby.Server.Implementations/Localization/Core/de.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/de.json b/Emby.Server.Implementations/Localization/Core/de.json
index 50a9664d59..b0a3af0569 100644
--- a/Emby.Server.Implementations/Localization/Core/de.json
+++ b/Emby.Server.Implementations/Localization/Core/de.json
@@ -1,6 +1,6 @@
{
"Albums": "Alben",
- "AppDeviceValues": "Anw: {0}, Gerät: {1}",
+ "AppDeviceValues": "App: {0}, Gerät: {1}",
"Application": "Anwendung",
"Artists": "Interpreten",
"AuthenticationSucceededWithUserName": "{0} hat sich erfolgreich authentifziert",
@@ -50,7 +50,7 @@
"NotificationOptionAudioPlayback": "Audiowiedergabe gestartet",
"NotificationOptionAudioPlaybackStopped": "Audiowiedergabe gestoppt",
"NotificationOptionCameraImageUploaded": "Foto hochgeladen",
- "NotificationOptionInstallationFailed": "Fehler bei der Installation",
+ "NotificationOptionInstallationFailed": "Installation fehlgeschlagen",
"NotificationOptionNewLibraryContent": "Neuer Inhalt hinzugefügt",
"NotificationOptionPluginError": "Plugin-Fehler",
"NotificationOptionPluginInstalled": "Plugin installiert",
From cb68fbeb0aed75031e07115da229a3888cb8787f Mon Sep 17 00:00:00 2001
From: crobibero
Date: Wed, 25 Mar 2020 10:53:03 -0600
Subject: [PATCH 51/95] Fix warnings in Emby.Naming
---
Emby.Naming/AudioBook/AudioBookFileInfo.cs | 14 ++++-----
Emby.Naming/AudioBook/AudioBookInfo.cs | 14 ++++-----
.../AudioBook/AudioBookListResolver.cs | 12 ++------
Emby.Naming/Common/MediaType.cs | 6 ++--
Emby.Naming/Subtitles/SubtitleInfo.cs | 8 ++---
Emby.Naming/Subtitles/SubtitleParser.cs | 4 ++-
Emby.Naming/TV/EpisodeInfo.cs | 14 ++++-----
Emby.Naming/TV/EpisodePathParser.cs | 10 +++++--
Emby.Naming/TV/SeasonPathParser.cs | 4 +--
Emby.Naming/TV/SeasonPathParserResult.cs | 4 +--
Emby.Naming/Video/CleanDateTimeParser.cs | 2 +-
Emby.Naming/Video/CleanDateTimeResult.cs | 4 +--
Emby.Naming/Video/CleanStringParser.cs | 2 +-
Emby.Naming/Video/ExtraResult.cs | 4 +--
Emby.Naming/Video/ExtraRule.cs | 8 ++---
Emby.Naming/Video/ExtraRuleType.cs | 6 ++--
Emby.Naming/Video/Format3DResult.cs | 6 ++--
Emby.Naming/Video/Format3DRule.cs | 4 +--
Emby.Naming/Video/StackResolver.cs | 21 ++++---------
Emby.Naming/Video/StubResult.cs | 4 +--
Emby.Naming/Video/StubTypeRule.cs | 4 +--
Emby.Naming/Video/VideoFileInfo.cs | 30 ++++++++++---------
Emby.Naming/Video/VideoInfo.cs | 14 ++++-----
Emby.Naming/Video/VideoListResolver.cs | 29 ++++++------------
Emby.Naming/Video/VideoResolver.cs | 6 ++--
MediaBrowser.Model/Entities/ChapterInfo.cs | 1 +
26 files changed, 108 insertions(+), 127 deletions(-)
diff --git a/Emby.Naming/AudioBook/AudioBookFileInfo.cs b/Emby.Naming/AudioBook/AudioBookFileInfo.cs
index 0bc6ec7e40..b54f8b33a2 100644
--- a/Emby.Naming/AudioBook/AudioBookFileInfo.cs
+++ b/Emby.Naming/AudioBook/AudioBookFileInfo.cs
@@ -3,41 +3,41 @@ using System;
namespace Emby.Naming.AudioBook
{
///
- /// Represents a single video file.
+ /// Represents a single video file.
///
public class AudioBookFileInfo : IComparable
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the container.
+ /// Gets or sets the container.
///
/// The container.
public string Container { get; set; }
///
- /// Gets or sets the part number.
+ /// Gets or sets the part number.
///
/// The part number.
public int? PartNumber { get; set; }
///
- /// Gets or sets the chapter number.
+ /// Gets or sets the chapter number.
///
/// The chapter number.
public int? ChapterNumber { get; set; }
///
- /// Gets or sets a value indicating whether this instance is a directory.
+ /// Gets or sets a value indicating whether this instance is a directory.
///
/// The type.
public bool IsDirectory { get; set; }
- ///
+ ///
public int CompareTo(AudioBookFileInfo other)
{
if (ReferenceEquals(this, other))
diff --git a/Emby.Naming/AudioBook/AudioBookInfo.cs b/Emby.Naming/AudioBook/AudioBookInfo.cs
index b0b5bd881f..c97b784385 100644
--- a/Emby.Naming/AudioBook/AudioBookInfo.cs
+++ b/Emby.Naming/AudioBook/AudioBookInfo.cs
@@ -3,12 +3,12 @@ using System.Collections.Generic;
namespace Emby.Naming.AudioBook
{
///
- /// Represents a complete video, including all parts and subtitles.
+ /// Represents a complete video, including all parts and subtitles.
///
public class AudioBookInfo
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
public AudioBookInfo()
{
@@ -18,30 +18,30 @@ namespace Emby.Naming.AudioBook
}
///
- /// Gets or sets the name.
+ /// Gets or sets the name.
///
/// The name.
public string Name { get; set; }
///
- /// Gets or sets the year.
+ /// Gets or sets the year.
///
public int? Year { get; set; }
///
- /// Gets or sets the files.
+ /// Gets or sets the files.
///
/// The files.
public List Files { get; set; }
///
- /// Gets or sets the extras.
+ /// Gets or sets the extras.
///
/// The extras.
public List Extras { get; set; }
///
- /// Gets or sets the alternate versions.
+ /// Gets or sets the alternate versions.
///
/// The alternate versions.
public List AlternateVersions { get; set; }
diff --git a/Emby.Naming/AudioBook/AudioBookListResolver.cs b/Emby.Naming/AudioBook/AudioBookListResolver.cs
index 081510f952..f4ba11a0d1 100644
--- a/Emby.Naming/AudioBook/AudioBookListResolver.cs
+++ b/Emby.Naming/AudioBook/AudioBookListResolver.cs
@@ -29,11 +29,7 @@ namespace Emby.Naming.AudioBook
// Filter out all extras, otherwise they could cause stacks to not be resolved
// See the unit test TestStackedWithTrailer
var metadata = audiobookFileInfos
- .Select(i => new FileSystemMetadata
- {
- FullName = i.Path,
- IsDirectory = i.IsDirectory
- });
+ .Select(i => new FileSystemMetadata { FullName = i.Path, IsDirectory = i.IsDirectory });
var stackResult = new StackResolver(_options)
.ResolveAudioBooks(metadata);
@@ -42,11 +38,7 @@ namespace Emby.Naming.AudioBook
{
var stackFiles = stack.Files.Select(i => audioBookResolver.Resolve(i, stack.IsDirectoryStack)).ToList();
stackFiles.Sort();
- var info = new AudioBookInfo
- {
- Files = stackFiles,
- Name = stack.Name
- };
+ var info = new AudioBookInfo { Files = stackFiles, Name = stack.Name };
yield return info;
}
diff --git a/Emby.Naming/Common/MediaType.cs b/Emby.Naming/Common/MediaType.cs
index cc18ce4cdd..bfedc50b60 100644
--- a/Emby.Naming/Common/MediaType.cs
+++ b/Emby.Naming/Common/MediaType.cs
@@ -5,17 +5,17 @@ namespace Emby.Naming.Common
public enum MediaType
{
///
- /// The audio
+ /// The audio
///
Audio = 0,
///
- /// The photo
+ /// The photo
///
Photo = 1,
///
- /// The video
+ /// The video
///
Video = 2
}
diff --git a/Emby.Naming/Subtitles/SubtitleInfo.cs b/Emby.Naming/Subtitles/SubtitleInfo.cs
index f39c496b7a..0aee439c1a 100644
--- a/Emby.Naming/Subtitles/SubtitleInfo.cs
+++ b/Emby.Naming/Subtitles/SubtitleInfo.cs
@@ -5,25 +5,25 @@ namespace Emby.Naming.Subtitles
public class SubtitleInfo
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the language.
+ /// Gets or sets the language.
///
/// The language.
public string Language { get; set; }
///
- /// Gets or sets a value indicating whether this instance is default.
+ /// Gets or sets a value indicating whether this instance is default.
///
/// true if this instance is default; otherwise, false.
public bool IsDefault { get; set; }
///
- /// Gets or sets a value indicating whether this instance is forced.
+ /// Gets or sets a value indicating whether this instance is forced.
///
/// true if this instance is forced; otherwise, false.
public bool IsForced { get; set; }
diff --git a/Emby.Naming/Subtitles/SubtitleParser.cs b/Emby.Naming/Subtitles/SubtitleParser.cs
index 082696da4f..5797c6bfa6 100644
--- a/Emby.Naming/Subtitles/SubtitleParser.cs
+++ b/Emby.Naming/Subtitles/SubtitleParser.cs
@@ -37,7 +37,9 @@ namespace Emby.Naming.Subtitles
IsForced = _options.SubtitleForcedFlags.Any(i => flags.Contains(i, StringComparer.OrdinalIgnoreCase))
};
- var parts = flags.Where(i => !_options.SubtitleDefaultFlags.Contains(i, StringComparer.OrdinalIgnoreCase) && !_options.SubtitleForcedFlags.Contains(i, StringComparer.OrdinalIgnoreCase))
+ var parts = flags.Where(i =>
+ !_options.SubtitleDefaultFlags.Contains(i, StringComparer.OrdinalIgnoreCase) &&
+ !_options.SubtitleForcedFlags.Contains(i, StringComparer.OrdinalIgnoreCase))
.ToList();
// Should have a name, language and file extension
diff --git a/Emby.Naming/TV/EpisodeInfo.cs b/Emby.Naming/TV/EpisodeInfo.cs
index 250df4e2d3..209f01c007 100644
--- a/Emby.Naming/TV/EpisodeInfo.cs
+++ b/Emby.Naming/TV/EpisodeInfo.cs
@@ -5,43 +5,43 @@ namespace Emby.Naming.TV
public class EpisodeInfo
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the container.
+ /// Gets or sets the container.
///
/// The container.
public string Container { get; set; }
///
- /// Gets or sets the name of the series.
+ /// Gets or sets the name of the series.
///
/// The name of the series.
public string SeriesName { get; set; }
///
- /// Gets or sets the format3 d.
+ /// Gets or sets the format3 d.
///
/// The format3 d.
public string Format3D { get; set; }
///
- /// Gets or sets a value indicating whether [is3 d].
+ /// Gets or sets a value indicating whether [is3 d].
///
/// true if [is3 d]; otherwise, false.
public bool Is3D { get; set; }
///
- /// Gets or sets a value indicating whether this instance is stub.
+ /// Gets or sets a value indicating whether this instance is stub.
///
/// true if this instance is stub; otherwise, false.
public bool IsStub { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs
index d3a822b173..a6af689c72 100644
--- a/Emby.Naming/TV/EpisodePathParser.cs
+++ b/Emby.Naming/TV/EpisodePathParser.cs
@@ -18,7 +18,13 @@ namespace Emby.Naming.TV
_options = options;
}
- public EpisodePathParserResult Parse(string path, bool isDirectory, bool? isNamed = null, bool? isOptimistic = null, bool? supportsAbsoluteNumbers = null, bool fillExtendedInfo = true)
+ public EpisodePathParserResult Parse(
+ string path,
+ bool isDirectory,
+ bool? isNamed = null,
+ bool? isOptimistic = null,
+ bool? supportsAbsoluteNumbers = null,
+ bool fillExtendedInfo = true)
{
// Added to be able to use regex patterns which require a file extension.
// There were no failed tests without this block, but to be safe, we can keep it until
@@ -64,7 +70,7 @@ namespace Emby.Naming.TV
{
result.SeriesName = result.SeriesName
.Trim()
- .Trim(new[] { '_', '.', '-' })
+ .Trim('_', '.', '-')
.Trim();
}
}
diff --git a/Emby.Naming/TV/SeasonPathParser.cs b/Emby.Naming/TV/SeasonPathParser.cs
index 2fa6b43531..d6c66fcc52 100644
--- a/Emby.Naming/TV/SeasonPathParser.cs
+++ b/Emby.Naming/TV/SeasonPathParser.cs
@@ -9,7 +9,7 @@ namespace Emby.Naming.TV
public static class SeasonPathParser
{
///
- /// A season folder must contain one of these somewhere in the name.
+ /// A season folder must contain one of these somewhere in the name.
///
private static readonly string[] _seasonFolderNames =
{
@@ -41,7 +41,7 @@ namespace Emby.Naming.TV
}
///
- /// Gets the season number from path.
+ /// Gets the season number from path.
///
/// The path.
/// if set to true [support special aliases].
diff --git a/Emby.Naming/TV/SeasonPathParserResult.cs b/Emby.Naming/TV/SeasonPathParserResult.cs
index 44090c059f..702ca6ac52 100644
--- a/Emby.Naming/TV/SeasonPathParserResult.cs
+++ b/Emby.Naming/TV/SeasonPathParserResult.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.TV
public class SeasonPathParserResult
{
///
- /// Gets or sets the season number.
+ /// Gets or sets the season number.
///
/// The season number.
public int? SeasonNumber { get; set; }
///
- /// Gets or sets a value indicating whether this is success.
+ /// Gets or sets a value indicating whether this is success.
///
/// true if success; otherwise, false.
public bool Success { get; set; }
diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs
index 579c9e91e1..78efeeabc3 100644
--- a/Emby.Naming/Video/CleanDateTimeParser.cs
+++ b/Emby.Naming/Video/CleanDateTimeParser.cs
@@ -8,7 +8,7 @@ using System.Text.RegularExpressions;
namespace Emby.Naming.Video
{
///
- /// .
+ /// .
///
public static class CleanDateTimeParser
{
diff --git a/Emby.Naming/Video/CleanDateTimeResult.cs b/Emby.Naming/Video/CleanDateTimeResult.cs
index 57eeaa7e32..22d0fe4e92 100644
--- a/Emby.Naming/Video/CleanDateTimeResult.cs
+++ b/Emby.Naming/Video/CleanDateTimeResult.cs
@@ -18,13 +18,13 @@ namespace Emby.Naming.Video
}
///
- /// Gets the name.
+ /// Gets the name.
///
/// The name.
public string Name { get; }
///
- /// Gets the year.
+ /// Gets the year.
///
/// The year.
public int? Year { get; }
diff --git a/Emby.Naming/Video/CleanStringParser.cs b/Emby.Naming/Video/CleanStringParser.cs
index 3f584d5847..225efc3ac2 100644
--- a/Emby.Naming/Video/CleanStringParser.cs
+++ b/Emby.Naming/Video/CleanStringParser.cs
@@ -8,7 +8,7 @@ using System.Text.RegularExpressions;
namespace Emby.Naming.Video
{
///
- /// .
+ /// .
///
public static class CleanStringParser
{
diff --git a/Emby.Naming/Video/ExtraResult.cs b/Emby.Naming/Video/ExtraResult.cs
index 15db32e876..0d7c0bab2b 100644
--- a/Emby.Naming/Video/ExtraResult.cs
+++ b/Emby.Naming/Video/ExtraResult.cs
@@ -7,13 +7,13 @@ namespace Emby.Naming.Video
public class ExtraResult
{
///
- /// Gets or sets the type of the extra.
+ /// Gets or sets the type of the extra.
///
/// The type of the extra.
public ExtraType? ExtraType { get; set; }
///
- /// Gets or sets the rule.
+ /// Gets or sets the rule.
///
/// The rule.
public ExtraRule Rule { get; set; }
diff --git a/Emby.Naming/Video/ExtraRule.cs b/Emby.Naming/Video/ExtraRule.cs
index cb58a39347..4f9504a659 100644
--- a/Emby.Naming/Video/ExtraRule.cs
+++ b/Emby.Naming/Video/ExtraRule.cs
@@ -8,25 +8,25 @@ namespace Emby.Naming.Video
public class ExtraRule
{
///
- /// Gets or sets the token.
+ /// Gets or sets the token.
///
/// The token.
public string Token { get; set; }
///
- /// Gets or sets the type of the extra.
+ /// Gets or sets the type of the extra.
///
/// The type of the extra.
public ExtraType ExtraType { get; set; }
///
- /// Gets or sets the type of the rule.
+ /// Gets or sets the type of the rule.
///
/// The type of the rule.
public ExtraRuleType RuleType { get; set; }
///
- /// Gets or sets the type of the media.
+ /// Gets or sets the type of the media.
///
/// The type of the media.
public MediaType MediaType { get; set; }
diff --git a/Emby.Naming/Video/ExtraRuleType.cs b/Emby.Naming/Video/ExtraRuleType.cs
index b021a04a31..10afd002f3 100644
--- a/Emby.Naming/Video/ExtraRuleType.cs
+++ b/Emby.Naming/Video/ExtraRuleType.cs
@@ -5,17 +5,17 @@ namespace Emby.Naming.Video
public enum ExtraRuleType
{
///
- /// The suffix
+ /// The suffix
///
Suffix = 0,
///
- /// The filename
+ /// The filename
///
Filename = 1,
///
- /// The regex
+ /// The regex
///
Regex = 2
}
diff --git a/Emby.Naming/Video/Format3DResult.cs b/Emby.Naming/Video/Format3DResult.cs
index fa0e9d3b80..6a9ade8228 100644
--- a/Emby.Naming/Video/Format3DResult.cs
+++ b/Emby.Naming/Video/Format3DResult.cs
@@ -12,19 +12,19 @@ namespace Emby.Naming.Video
}
///
- /// Gets or sets a value indicating whether [is3 d].
+ /// Gets or sets a value indicating whether [is3 d].
///
/// true if [is3 d]; otherwise, false.
public bool Is3D { get; set; }
///
- /// Gets or sets the format3 d.
+ /// Gets or sets the format3 d.
///
/// The format3 d.
public string Format3D { get; set; }
///
- /// Gets or sets the tokens.
+ /// Gets or sets the tokens.
///
/// The tokens.
public List Tokens { get; set; }
diff --git a/Emby.Naming/Video/Format3DRule.cs b/Emby.Naming/Video/Format3DRule.cs
index 310ec84e8f..633f40d282 100644
--- a/Emby.Naming/Video/Format3DRule.cs
+++ b/Emby.Naming/Video/Format3DRule.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.Video
public class Format3DRule
{
///
- /// Gets or sets the token.
+ /// Gets or sets the token.
///
/// The token.
public string Token { get; set; }
///
- /// Gets or sets the preceeding token.
+ /// Gets or sets the preceeding token.
///
/// The preceeding token.
public string PreceedingToken { get; set; }
diff --git a/Emby.Naming/Video/StackResolver.cs b/Emby.Naming/Video/StackResolver.cs
index ee05904c75..a943839f2b 100644
--- a/Emby.Naming/Video/StackResolver.cs
+++ b/Emby.Naming/Video/StackResolver.cs
@@ -21,31 +21,20 @@ namespace Emby.Naming.Video
public IEnumerable ResolveDirectories(IEnumerable files)
{
- return Resolve(files.Select(i => new FileSystemMetadata
- {
- FullName = i,
- IsDirectory = true
- }));
+ return Resolve(files.Select(i => new FileSystemMetadata { FullName = i, IsDirectory = true }));
}
public IEnumerable ResolveFiles(IEnumerable files)
{
- return Resolve(files.Select(i => new FileSystemMetadata
- {
- FullName = i,
- IsDirectory = false
- }));
+ return Resolve(files.Select(i => new FileSystemMetadata { FullName = i, IsDirectory = false }));
}
public IEnumerable ResolveAudioBooks(IEnumerable files)
{
- foreach (var directory in files.GroupBy(file => file.IsDirectory ? file.FullName : Path.GetDirectoryName(file.FullName)))
+ foreach (var directory in files.GroupBy(file =>
+ file.IsDirectory ? file.FullName : Path.GetDirectoryName(file.FullName)))
{
- var stack = new FileStack()
- {
- Name = Path.GetFileName(directory.Key),
- IsDirectoryStack = false
- };
+ var stack = new FileStack { Name = Path.GetFileName(directory.Key), IsDirectoryStack = false };
foreach (var file in directory)
{
if (file.IsDirectory)
diff --git a/Emby.Naming/Video/StubResult.cs b/Emby.Naming/Video/StubResult.cs
index 1b8e99b0dc..fdde6fc279 100644
--- a/Emby.Naming/Video/StubResult.cs
+++ b/Emby.Naming/Video/StubResult.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.Video
public struct StubResult
{
///
- /// Gets or sets a value indicating whether this instance is stub.
+ /// Gets or sets a value indicating whether this instance is stub.
///
/// true if this instance is stub; otherwise, false.
public bool IsStub { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
diff --git a/Emby.Naming/Video/StubTypeRule.cs b/Emby.Naming/Video/StubTypeRule.cs
index 8285cb51a3..88ee586834 100644
--- a/Emby.Naming/Video/StubTypeRule.cs
+++ b/Emby.Naming/Video/StubTypeRule.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.Video
public class StubTypeRule
{
///
- /// Gets or sets the token.
+ /// Gets or sets the token.
///
/// The token.
public string Token { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
diff --git a/Emby.Naming/Video/VideoFileInfo.cs b/Emby.Naming/Video/VideoFileInfo.cs
index aa4f3a35c3..475843c96c 100644
--- a/Emby.Naming/Video/VideoFileInfo.cs
+++ b/Emby.Naming/Video/VideoFileInfo.cs
@@ -3,81 +3,83 @@ using MediaBrowser.Model.Entities;
namespace Emby.Naming.Video
{
///
- /// Represents a single video file.
+ /// Represents a single video file.
///
public class VideoFileInfo
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the container.
+ /// Gets or sets the container.
///
/// The container.
public string Container { get; set; }
///
- /// Gets or sets the name.
+ /// Gets or sets the name.
///
/// The name.
public string Name { get; set; }
///
- /// Gets or sets the year.
+ /// Gets or sets the year.
///
/// The year.
public int? Year { get; set; }
///
- /// Gets or sets the type of the extra, e.g. trailer, theme song, behind the scenes, etc.
+ /// Gets or sets the type of the extra, e.g. trailer, theme song, behind the scenes, etc.
///
/// The type of the extra.
public ExtraType? ExtraType { get; set; }
///
- /// Gets or sets the extra rule.
+ /// Gets or sets the extra rule.
///
/// The extra rule.
public ExtraRule ExtraRule { get; set; }
///
- /// Gets or sets the format3 d.
+ /// Gets or sets the format3 d.
///
/// The format3 d.
public string Format3D { get; set; }
///
- /// Gets or sets a value indicating whether [is3 d].
+ /// Gets or sets a value indicating whether [is3 d].
///
/// true if [is3 d]; otherwise, false.
public bool Is3D { get; set; }
///
- /// Gets or sets a value indicating whether this instance is stub.
+ /// Gets or sets a value indicating whether this instance is stub.
///
/// true if this instance is stub; otherwise, false.
public bool IsStub { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
///
- /// Gets or sets a value indicating whether this instance is a directory.
+ /// Gets or sets a value indicating whether this instance is a directory.
///
/// The type.
public bool IsDirectory { get; set; }
///
- /// Gets the file name without extension.
+ /// Gets the file name without extension.
///
/// The file name without extension.
- public string FileNameWithoutExtension => !IsDirectory ? System.IO.Path.GetFileNameWithoutExtension(Path) : System.IO.Path.GetFileName(Path);
+ public string FileNameWithoutExtension => !IsDirectory
+ ? System.IO.Path.GetFileNameWithoutExtension(Path)
+ : System.IO.Path.GetFileName(Path);
///
public override string ToString()
diff --git a/Emby.Naming/Video/VideoInfo.cs b/Emby.Naming/Video/VideoInfo.cs
index ea74c40e2a..3b2137fb76 100644
--- a/Emby.Naming/Video/VideoInfo.cs
+++ b/Emby.Naming/Video/VideoInfo.cs
@@ -4,12 +4,12 @@ using System.Collections.Generic;
namespace Emby.Naming.Video
{
///
- /// Represents a complete video, including all parts and subtitles.
+ /// Represents a complete video, including all parts and subtitles.
///
public class VideoInfo
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The name.
public VideoInfo(string name)
@@ -22,31 +22,31 @@ namespace Emby.Naming.Video
}
///
- /// Gets or sets the name.
+ /// Gets or sets the name.
///
/// The name.
public string Name { get; set; }
///
- /// Gets or sets the year.
+ /// Gets or sets the year.
///
/// The year.
public int? Year { get; set; }
///
- /// Gets or sets the files.
+ /// Gets or sets the files.
///
/// The files.
public IReadOnlyList Files { get; set; }
///
- /// Gets or sets the extras.
+ /// Gets or sets the extras.
///
/// The extras.
public IReadOnlyList Extras { get; set; }
///
- /// Gets or sets the alternate versions.
+ /// Gets or sets the alternate versions.
///
/// The alternate versions.
public IReadOnlyList AlternateVersions { get; set; }
diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs
index d4b02cf2a6..29b42cdc1d 100644
--- a/Emby.Naming/Video/VideoListResolver.cs
+++ b/Emby.Naming/Video/VideoListResolver.cs
@@ -33,11 +33,7 @@ namespace Emby.Naming.Video
// See the unit test TestStackedWithTrailer
var nonExtras = videoInfos
.Where(i => i.ExtraType == null)
- .Select(i => new FileSystemMetadata
- {
- FullName = i.Path,
- IsDirectory = i.IsDirectory
- });
+ .Select(i => new FileSystemMetadata { FullName = i.Path, IsDirectory = i.IsDirectory });
var stackResult = new StackResolver(_options)
.Resolve(nonExtras).ToList();
@@ -57,11 +53,7 @@ namespace Emby.Naming.Video
info.Year = info.Files[0].Year;
- var extraBaseNames = new List
- {
- stack.Name,
- Path.GetFileNameWithoutExtension(stack.Files[0])
- };
+ var extraBaseNames = new List { stack.Name, Path.GetFileNameWithoutExtension(stack.Files[0]) };
var extras = GetExtras(remainingFiles, extraBaseNames);
@@ -83,10 +75,7 @@ namespace Emby.Naming.Video
foreach (var media in standaloneMedia)
{
- var info = new VideoInfo(media.Name)
- {
- Files = new List { media }
- };
+ var info = new VideoInfo(media.Name) { Files = new List { media } };
info.Year = info.Files[0].Year;
@@ -162,8 +151,7 @@ namespace Emby.Naming.Video
// Whatever files are left, just add them
list.AddRange(remainingFiles.Select(i => new VideoInfo(i.Name)
{
- Files = new List { i },
- Year = i.Year
+ Files = new List { i }, Year = i.Year
}));
return list;
@@ -183,7 +171,7 @@ namespace Emby.Naming.Video
if (!string.IsNullOrEmpty(folderName)
&& folderName.Length > 1
&& videos.All(i => i.Files.Count == 1
- && IsEligibleForMultiVersion(folderName, i.Files[0].Path))
+ && IsEligibleForMultiVersion(folderName, i.Files[0].Path))
&& HaveSameYear(videos))
{
var ordered = videos.OrderBy(i => i.Name).ToList();
@@ -222,8 +210,8 @@ namespace Emby.Naming.Video
{
testFilename = testFilename.Substring(folderName.Length).Trim();
return string.IsNullOrEmpty(testFilename)
- || testFilename[0] == '-'
- || string.IsNullOrWhiteSpace(Regex.Replace(testFilename, @"\[([^]]*)\]", string.Empty));
+ || testFilename[0] == '-'
+ || string.IsNullOrWhiteSpace(Regex.Replace(testFilename, @"\[([^]]*)\]", string.Empty));
}
return false;
@@ -239,7 +227,8 @@ namespace Emby.Naming.Video
return remainingFiles
.Where(i => i.ExtraType == null)
- .Where(i => baseNames.Any(b => i.FileNameWithoutExtension.StartsWith(b, StringComparison.OrdinalIgnoreCase)))
+ .Where(i => baseNames.Any(b =>
+ i.FileNameWithoutExtension.StartsWith(b, StringComparison.OrdinalIgnoreCase)))
.ToList();
}
}
diff --git a/Emby.Naming/Video/VideoResolver.cs b/Emby.Naming/Video/VideoResolver.cs
index 0b75a8cce9..7dbd2ec7f4 100644
--- a/Emby.Naming/Video/VideoResolver.cs
+++ b/Emby.Naming/Video/VideoResolver.cs
@@ -18,7 +18,7 @@ namespace Emby.Naming.Video
}
///
- /// Resolves the directory.
+ /// Resolves the directory.
///
/// The path.
/// VideoFileInfo.
@@ -28,7 +28,7 @@ namespace Emby.Naming.Video
}
///
- /// Resolves the file.
+ /// Resolves the file.
///
/// The path.
/// VideoFileInfo.
@@ -38,7 +38,7 @@ namespace Emby.Naming.Video
}
///
- /// Resolves the specified path.
+ /// Resolves the specified path.
///
/// The path.
/// if set to true [is folder].
diff --git a/MediaBrowser.Model/Entities/ChapterInfo.cs b/MediaBrowser.Model/Entities/ChapterInfo.cs
index 2903ef61b4..bea7ec1dba 100644
--- a/MediaBrowser.Model/Entities/ChapterInfo.cs
+++ b/MediaBrowser.Model/Entities/ChapterInfo.cs
@@ -26,6 +26,7 @@ namespace MediaBrowser.Model.Entities
///
/// The image path.
public string ImagePath { get; set; }
+
public DateTime ImageDateModified { get; set; }
public string ImageTag { get; set; }
From ca85bef7c57108977d0f9813940f1ca942902d30 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Wed, 25 Mar 2020 18:52:14 +0100
Subject: [PATCH 52/95] Move check for web client directory to application
startup in Program.cs
---
Jellyfin.Server/Program.cs | 16 ++++++++++
.../Api/DashboardService.cs | 29 +++++++++++--------
2 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index d9ca141363..2939d33782 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -20,6 +20,7 @@ using Jellyfin.Drawing.Skia;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Extensions;
+using MediaBrowser.WebDashboard.Api;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -185,8 +186,23 @@ namespace Jellyfin.Server
new ManagedFileSystem(_loggerFactory.CreateLogger(), appPaths),
GetImageEncoder(appPaths),
new NetworkManager(_loggerFactory.CreateLogger()));
+
try
{
+ // If hosting the web client, validate the client content path
+ if (startupConfig.HostWebClient())
+ {
+ string webContentPath = DashboardService.GetDashboardUIPath(startupConfig, appHost.ServerConfigurationManager);
+ if (!Directory.Exists(webContentPath) || Directory.GetFiles(webContentPath).Length == 0)
+ {
+ throw new InvalidOperationException(
+ "The server is expected to host the web client, but the provided content directory is either " +
+ $"invalid or empty: {webContentPath}. If you do not want to host the web client with the " +
+ "server, you may set the '--nowebclient' command line flag, or set" +
+ $"'{MediaBrowser.Controller.Extensions.ConfigurationExtensions.HostWebClientKey}=false' in your config settings.");
+ }
+ }
+
ServiceCollection serviceCollection = new ServiceCollection();
await appHost.InitAsync(serviceCollection, startupConfig).ConfigureAwait(false);
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 1ca035f7bd..938ab513b5 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -161,22 +161,27 @@ namespace MediaBrowser.WebDashboard.Api
/// Gets the path of the directory containing the static web interface content, or null if the server is not
/// hosting the web client.
///
- public string DashboardUIPath
+ public string DashboardUIPath => GetDashboardUIPath(_appConfig, _serverConfigurationManager);
+
+ ///
+ /// Gets the path of the directory containing the static web interface content.
+ ///
+ /// The app configuration.
+ /// The server configuration manager.
+ /// The directory path, or null if the server is not hosting the web client.
+ public static string GetDashboardUIPath(IConfiguration appConfig, IServerConfigurationManager serverConfigManager)
{
- get
+ if (!appConfig.HostWebClient())
{
- if (!_appConfig.HostWebClient())
- {
- return null;
- }
-
- if (!string.IsNullOrEmpty(_serverConfigurationManager.Configuration.DashboardSourcePath))
- {
- return _serverConfigurationManager.Configuration.DashboardSourcePath;
- }
+ return null;
+ }
- return _serverConfigurationManager.ApplicationPaths.WebPath;
+ if (!string.IsNullOrEmpty(serverConfigManager.Configuration.DashboardSourcePath))
+ {
+ return serverConfigManager.Configuration.DashboardSourcePath;
}
+
+ return serverConfigManager.ApplicationPaths.WebPath;
}
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "request", Justification = "Required for ServiceStack")]
From d1fe28fac6ebd178c1ae450f030a1952f5edfaed Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Wed, 25 Mar 2020 19:16:12 +0100
Subject: [PATCH 53/95] Check for null before disposing
---
Emby.Server.Implementations/ApplicationHost.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 35b2cba9f1..d6a572818a 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1803,7 +1803,7 @@ namespace Emby.Server.Implementations
}
_userRepository?.Dispose();
- _displayPreferencesRepository.Dispose();
+ _displayPreferencesRepository?.Dispose();
}
_userRepository = null;
From aa9737afb35d4fa0b6f08444466aa044cd9ad0d3 Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Wed, 25 Mar 2020 20:09:48 +0100
Subject: [PATCH 54/95] Update .NET Core to 3.1.3
---
.../Emby.Server.Implementations.csproj | 6 +++---
Jellyfin.Api/Jellyfin.Api.csproj | 2 +-
Jellyfin.Server/Jellyfin.Server.csproj | 4 ++--
MediaBrowser.Common/MediaBrowser.Common.csproj | 4 ++--
MediaBrowser.Controller/MediaBrowser.Controller.csproj | 4 ++--
MediaBrowser.Model/MediaBrowser.Model.csproj | 2 +-
MediaBrowser.Providers/MediaBrowser.Providers.csproj | 4 ++--
tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj | 2 +-
8 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
index a7c0ab96a4..d302d89843 100644
--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj
+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
@@ -29,9 +29,9 @@
-
-
-
+
+
+
diff --git a/Jellyfin.Api/Jellyfin.Api.csproj b/Jellyfin.Api/Jellyfin.Api.csproj
index aaffc32eb4..8f23ef9d03 100644
--- a/Jellyfin.Api/Jellyfin.Api.csproj
+++ b/Jellyfin.Api/Jellyfin.Api.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj
index a7b2de0d06..02ae202b47 100644
--- a/Jellyfin.Server/Jellyfin.Server.csproj
+++ b/Jellyfin.Server/Jellyfin.Server.csproj
@@ -36,8 +36,8 @@
-
-
+
+
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj
index 77eacf913d..548c214dd5 100644
--- a/MediaBrowser.Common/MediaBrowser.Common.csproj
+++ b/MediaBrowser.Common/MediaBrowser.Common.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index 136048440b..662ab25356 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 217f23440a..0fdfe57619 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
index 359644a782..9a366364db 100644
--- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj
+++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj
index b3aa85202c..77b0561efd 100644
--- a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj
+++ b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj
@@ -11,7 +11,7 @@
-
+
From 261a2e19891072329981b34a9c63116a9fcfb0f6 Mon Sep 17 00:00:00 2001
From: crobibero
Date: Wed, 25 Mar 2020 14:31:03 -0600
Subject: [PATCH 55/95] revert xml docs indentation
---
Emby.Naming/AudioBook/AudioBookFileInfo.cs | 12 +++++-----
Emby.Naming/AudioBook/AudioBookInfo.cs | 14 ++++++------
Emby.Naming/Common/MediaType.cs | 6 ++---
Emby.Naming/Subtitles/SubtitleInfo.cs | 8 +++----
Emby.Naming/TV/EpisodeInfo.cs | 14 ++++++------
Emby.Naming/TV/SeasonPathParser.cs | 4 ++--
Emby.Naming/TV/SeasonPathParserResult.cs | 4 ++--
Emby.Naming/Video/CleanDateTimeParser.cs | 2 +-
Emby.Naming/Video/CleanDateTimeResult.cs | 4 ++--
Emby.Naming/Video/CleanStringParser.cs | 2 +-
Emby.Naming/Video/ExtraResult.cs | 4 ++--
Emby.Naming/Video/ExtraRule.cs | 8 +++----
Emby.Naming/Video/ExtraRuleType.cs | 6 ++---
Emby.Naming/Video/Format3DResult.cs | 6 ++---
Emby.Naming/Video/Format3DRule.cs | 4 ++--
Emby.Naming/Video/StubResult.cs | 4 ++--
Emby.Naming/Video/StubTypeRule.cs | 4 ++--
Emby.Naming/Video/VideoFileInfo.cs | 26 +++++++++++-----------
Emby.Naming/Video/VideoInfo.cs | 14 ++++++------
Emby.Naming/Video/VideoResolver.cs | 6 ++---
20 files changed, 76 insertions(+), 76 deletions(-)
diff --git a/Emby.Naming/AudioBook/AudioBookFileInfo.cs b/Emby.Naming/AudioBook/AudioBookFileInfo.cs
index b54f8b33a2..c4863b50ab 100644
--- a/Emby.Naming/AudioBook/AudioBookFileInfo.cs
+++ b/Emby.Naming/AudioBook/AudioBookFileInfo.cs
@@ -3,36 +3,36 @@ using System;
namespace Emby.Naming.AudioBook
{
///
- /// Represents a single video file.
+ /// Represents a single video file.
///
public class AudioBookFileInfo : IComparable
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the container.
+ /// Gets or sets the container.
///
/// The container.
public string Container { get; set; }
///
- /// Gets or sets the part number.
+ /// Gets or sets the part number.
///
/// The part number.
public int? PartNumber { get; set; }
///
- /// Gets or sets the chapter number.
+ /// Gets or sets the chapter number.
///
/// The chapter number.
public int? ChapterNumber { get; set; }
///
- /// Gets or sets a value indicating whether this instance is a directory.
+ /// Gets or sets a value indicating whether this instance is a directory.
///
/// The type.
public bool IsDirectory { get; set; }
diff --git a/Emby.Naming/AudioBook/AudioBookInfo.cs b/Emby.Naming/AudioBook/AudioBookInfo.cs
index c97b784385..b0b5bd881f 100644
--- a/Emby.Naming/AudioBook/AudioBookInfo.cs
+++ b/Emby.Naming/AudioBook/AudioBookInfo.cs
@@ -3,12 +3,12 @@ using System.Collections.Generic;
namespace Emby.Naming.AudioBook
{
///
- /// Represents a complete video, including all parts and subtitles.
+ /// Represents a complete video, including all parts and subtitles.
///
public class AudioBookInfo
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
public AudioBookInfo()
{
@@ -18,30 +18,30 @@ namespace Emby.Naming.AudioBook
}
///
- /// Gets or sets the name.
+ /// Gets or sets the name.
///
/// The name.
public string Name { get; set; }
///
- /// Gets or sets the year.
+ /// Gets or sets the year.
///
public int? Year { get; set; }
///
- /// Gets or sets the files.
+ /// Gets or sets the files.
///
/// The files.
public List Files { get; set; }
///
- /// Gets or sets the extras.
+ /// Gets or sets the extras.
///
/// The extras.
public List Extras { get; set; }
///
- /// Gets or sets the alternate versions.
+ /// Gets or sets the alternate versions.
///
/// The alternate versions.
public List AlternateVersions { get; set; }
diff --git a/Emby.Naming/Common/MediaType.cs b/Emby.Naming/Common/MediaType.cs
index bfedc50b60..cc18ce4cdd 100644
--- a/Emby.Naming/Common/MediaType.cs
+++ b/Emby.Naming/Common/MediaType.cs
@@ -5,17 +5,17 @@ namespace Emby.Naming.Common
public enum MediaType
{
///
- /// The audio
+ /// The audio
///
Audio = 0,
///
- /// The photo
+ /// The photo
///
Photo = 1,
///
- /// The video
+ /// The video
///
Video = 2
}
diff --git a/Emby.Naming/Subtitles/SubtitleInfo.cs b/Emby.Naming/Subtitles/SubtitleInfo.cs
index 0aee439c1a..f39c496b7a 100644
--- a/Emby.Naming/Subtitles/SubtitleInfo.cs
+++ b/Emby.Naming/Subtitles/SubtitleInfo.cs
@@ -5,25 +5,25 @@ namespace Emby.Naming.Subtitles
public class SubtitleInfo
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the language.
+ /// Gets or sets the language.
///
/// The language.
public string Language { get; set; }
///
- /// Gets or sets a value indicating whether this instance is default.
+ /// Gets or sets a value indicating whether this instance is default.
///
/// true if this instance is default; otherwise, false.
public bool IsDefault { get; set; }
///
- /// Gets or sets a value indicating whether this instance is forced.
+ /// Gets or sets a value indicating whether this instance is forced.
///
/// true if this instance is forced; otherwise, false.
public bool IsForced { get; set; }
diff --git a/Emby.Naming/TV/EpisodeInfo.cs b/Emby.Naming/TV/EpisodeInfo.cs
index 209f01c007..250df4e2d3 100644
--- a/Emby.Naming/TV/EpisodeInfo.cs
+++ b/Emby.Naming/TV/EpisodeInfo.cs
@@ -5,43 +5,43 @@ namespace Emby.Naming.TV
public class EpisodeInfo
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the container.
+ /// Gets or sets the container.
///
/// The container.
public string Container { get; set; }
///
- /// Gets or sets the name of the series.
+ /// Gets or sets the name of the series.
///
/// The name of the series.
public string SeriesName { get; set; }
///
- /// Gets or sets the format3 d.
+ /// Gets or sets the format3 d.
///
/// The format3 d.
public string Format3D { get; set; }
///
- /// Gets or sets a value indicating whether [is3 d].
+ /// Gets or sets a value indicating whether [is3 d].
///
/// true if [is3 d]; otherwise, false.
public bool Is3D { get; set; }
///
- /// Gets or sets a value indicating whether this instance is stub.
+ /// Gets or sets a value indicating whether this instance is stub.
///
/// true if this instance is stub; otherwise, false.
public bool IsStub { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
diff --git a/Emby.Naming/TV/SeasonPathParser.cs b/Emby.Naming/TV/SeasonPathParser.cs
index d6c66fcc52..2fa6b43531 100644
--- a/Emby.Naming/TV/SeasonPathParser.cs
+++ b/Emby.Naming/TV/SeasonPathParser.cs
@@ -9,7 +9,7 @@ namespace Emby.Naming.TV
public static class SeasonPathParser
{
///
- /// A season folder must contain one of these somewhere in the name.
+ /// A season folder must contain one of these somewhere in the name.
///
private static readonly string[] _seasonFolderNames =
{
@@ -41,7 +41,7 @@ namespace Emby.Naming.TV
}
///
- /// Gets the season number from path.
+ /// Gets the season number from path.
///
/// The path.
/// if set to true [support special aliases].
diff --git a/Emby.Naming/TV/SeasonPathParserResult.cs b/Emby.Naming/TV/SeasonPathParserResult.cs
index 702ca6ac52..a142fafea0 100644
--- a/Emby.Naming/TV/SeasonPathParserResult.cs
+++ b/Emby.Naming/TV/SeasonPathParserResult.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.TV
public class SeasonPathParserResult
{
///
- /// Gets or sets the season number.
+ /// Gets or sets the season number.
///
/// The season number.
public int? SeasonNumber { get; set; }
///
- /// Gets or sets a value indicating whether this is success.
+ /// Gets or sets a value indicating whether this is success.
///
/// true if success; otherwise, false.
public bool Success { get; set; }
diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs
index 78efeeabc3..579c9e91e1 100644
--- a/Emby.Naming/Video/CleanDateTimeParser.cs
+++ b/Emby.Naming/Video/CleanDateTimeParser.cs
@@ -8,7 +8,7 @@ using System.Text.RegularExpressions;
namespace Emby.Naming.Video
{
///
- /// .
+ /// .
///
public static class CleanDateTimeParser
{
diff --git a/Emby.Naming/Video/CleanDateTimeResult.cs b/Emby.Naming/Video/CleanDateTimeResult.cs
index 22d0fe4e92..57eeaa7e32 100644
--- a/Emby.Naming/Video/CleanDateTimeResult.cs
+++ b/Emby.Naming/Video/CleanDateTimeResult.cs
@@ -18,13 +18,13 @@ namespace Emby.Naming.Video
}
///
- /// Gets the name.
+ /// Gets the name.
///
/// The name.
public string Name { get; }
///
- /// Gets the year.
+ /// Gets the year.
///
/// The year.
public int? Year { get; }
diff --git a/Emby.Naming/Video/CleanStringParser.cs b/Emby.Naming/Video/CleanStringParser.cs
index 225efc3ac2..3f584d5847 100644
--- a/Emby.Naming/Video/CleanStringParser.cs
+++ b/Emby.Naming/Video/CleanStringParser.cs
@@ -8,7 +8,7 @@ using System.Text.RegularExpressions;
namespace Emby.Naming.Video
{
///
- /// .
+ /// .
///
public static class CleanStringParser
{
diff --git a/Emby.Naming/Video/ExtraResult.cs b/Emby.Naming/Video/ExtraResult.cs
index 0d7c0bab2b..15db32e876 100644
--- a/Emby.Naming/Video/ExtraResult.cs
+++ b/Emby.Naming/Video/ExtraResult.cs
@@ -7,13 +7,13 @@ namespace Emby.Naming.Video
public class ExtraResult
{
///
- /// Gets or sets the type of the extra.
+ /// Gets or sets the type of the extra.
///
/// The type of the extra.
public ExtraType? ExtraType { get; set; }
///
- /// Gets or sets the rule.
+ /// Gets or sets the rule.
///
/// The rule.
public ExtraRule Rule { get; set; }
diff --git a/Emby.Naming/Video/ExtraRule.cs b/Emby.Naming/Video/ExtraRule.cs
index 4f9504a659..cb58a39347 100644
--- a/Emby.Naming/Video/ExtraRule.cs
+++ b/Emby.Naming/Video/ExtraRule.cs
@@ -8,25 +8,25 @@ namespace Emby.Naming.Video
public class ExtraRule
{
///
- /// Gets or sets the token.
+ /// Gets or sets the token.
///
/// The token.
public string Token { get; set; }
///
- /// Gets or sets the type of the extra.
+ /// Gets or sets the type of the extra.
///
/// The type of the extra.
public ExtraType ExtraType { get; set; }
///
- /// Gets or sets the type of the rule.
+ /// Gets or sets the type of the rule.
///
/// The type of the rule.
public ExtraRuleType RuleType { get; set; }
///
- /// Gets or sets the type of the media.
+ /// Gets or sets the type of the media.
///
/// The type of the media.
public MediaType MediaType { get; set; }
diff --git a/Emby.Naming/Video/ExtraRuleType.cs b/Emby.Naming/Video/ExtraRuleType.cs
index 10afd002f3..b021a04a31 100644
--- a/Emby.Naming/Video/ExtraRuleType.cs
+++ b/Emby.Naming/Video/ExtraRuleType.cs
@@ -5,17 +5,17 @@ namespace Emby.Naming.Video
public enum ExtraRuleType
{
///
- /// The suffix
+ /// The suffix
///
Suffix = 0,
///
- /// The filename
+ /// The filename
///
Filename = 1,
///
- /// The regex
+ /// The regex
///
Regex = 2
}
diff --git a/Emby.Naming/Video/Format3DResult.cs b/Emby.Naming/Video/Format3DResult.cs
index 6a9ade8228..fa0e9d3b80 100644
--- a/Emby.Naming/Video/Format3DResult.cs
+++ b/Emby.Naming/Video/Format3DResult.cs
@@ -12,19 +12,19 @@ namespace Emby.Naming.Video
}
///
- /// Gets or sets a value indicating whether [is3 d].
+ /// Gets or sets a value indicating whether [is3 d].
///
/// true if [is3 d]; otherwise, false.
public bool Is3D { get; set; }
///
- /// Gets or sets the format3 d.
+ /// Gets or sets the format3 d.
///
/// The format3 d.
public string Format3D { get; set; }
///
- /// Gets or sets the tokens.
+ /// Gets or sets the tokens.
///
/// The tokens.
public List Tokens { get; set; }
diff --git a/Emby.Naming/Video/Format3DRule.cs b/Emby.Naming/Video/Format3DRule.cs
index 633f40d282..310ec84e8f 100644
--- a/Emby.Naming/Video/Format3DRule.cs
+++ b/Emby.Naming/Video/Format3DRule.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.Video
public class Format3DRule
{
///
- /// Gets or sets the token.
+ /// Gets or sets the token.
///
/// The token.
public string Token { get; set; }
///
- /// Gets or sets the preceeding token.
+ /// Gets or sets the preceeding token.
///
/// The preceeding token.
public string PreceedingToken { get; set; }
diff --git a/Emby.Naming/Video/StubResult.cs b/Emby.Naming/Video/StubResult.cs
index fdde6fc279..1b8e99b0dc 100644
--- a/Emby.Naming/Video/StubResult.cs
+++ b/Emby.Naming/Video/StubResult.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.Video
public struct StubResult
{
///
- /// Gets or sets a value indicating whether this instance is stub.
+ /// Gets or sets a value indicating whether this instance is stub.
///
/// true if this instance is stub; otherwise, false.
public bool IsStub { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
diff --git a/Emby.Naming/Video/StubTypeRule.cs b/Emby.Naming/Video/StubTypeRule.cs
index 88ee586834..8285cb51a3 100644
--- a/Emby.Naming/Video/StubTypeRule.cs
+++ b/Emby.Naming/Video/StubTypeRule.cs
@@ -5,13 +5,13 @@ namespace Emby.Naming.Video
public class StubTypeRule
{
///
- /// Gets or sets the token.
+ /// Gets or sets the token.
///
/// The token.
public string Token { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
diff --git a/Emby.Naming/Video/VideoFileInfo.cs b/Emby.Naming/Video/VideoFileInfo.cs
index 475843c96c..11e789b663 100644
--- a/Emby.Naming/Video/VideoFileInfo.cs
+++ b/Emby.Naming/Video/VideoFileInfo.cs
@@ -3,78 +3,78 @@ using MediaBrowser.Model.Entities;
namespace Emby.Naming.Video
{
///
- /// Represents a single video file.
+ /// Represents a single video file.
///
public class VideoFileInfo
{
///
- /// Gets or sets the path.
+ /// Gets or sets the path.
///
/// The path.
public string Path { get; set; }
///
- /// Gets or sets the container.
+ /// Gets or sets the container.
///
/// The container.
public string Container { get; set; }
///
- /// Gets or sets the name.
+ /// Gets or sets the name.
///
/// The name.
public string Name { get; set; }
///
- /// Gets or sets the year.
+ /// Gets or sets the year.
///
/// The year.
public int? Year { get; set; }
///
- /// Gets or sets the type of the extra, e.g. trailer, theme song, behind the scenes, etc.
+ /// Gets or sets the type of the extra, e.g. trailer, theme song, behind the scenes, etc.
///
/// The type of the extra.
public ExtraType? ExtraType { get; set; }
///
- /// Gets or sets the extra rule.
+ /// Gets or sets the extra rule.
///
/// The extra rule.
public ExtraRule ExtraRule { get; set; }
///
- /// Gets or sets the format3 d.
+ /// Gets or sets the format3 d.
///
/// The format3 d.
public string Format3D { get; set; }
///
- /// Gets or sets a value indicating whether [is3 d].
+ /// Gets or sets a value indicating whether [is3 d].
///
/// true if [is3 d]; otherwise, false.
public bool Is3D { get; set; }
///
- /// Gets or sets a value indicating whether this instance is stub.
+ /// Gets or sets a value indicating whether this instance is stub.
///
/// true if this instance is stub; otherwise, false.
public bool IsStub { get; set; }
///
- /// Gets or sets the type of the stub.
+ /// Gets or sets the type of the stub.
///
/// The type of the stub.
public string StubType { get; set; }
///
- /// Gets or sets a value indicating whether this instance is a directory.
+ /// Gets or sets a value indicating whether this instance is a directory.
///
/// The type.
public bool IsDirectory { get; set; }
///
- /// Gets the file name without extension.
+ /// Gets the file name without extension.
///
/// The file name without extension.
public string FileNameWithoutExtension => !IsDirectory
diff --git a/Emby.Naming/Video/VideoInfo.cs b/Emby.Naming/Video/VideoInfo.cs
index 3b2137fb76..ea74c40e2a 100644
--- a/Emby.Naming/Video/VideoInfo.cs
+++ b/Emby.Naming/Video/VideoInfo.cs
@@ -4,12 +4,12 @@ using System.Collections.Generic;
namespace Emby.Naming.Video
{
///
- /// Represents a complete video, including all parts and subtitles.
+ /// Represents a complete video, including all parts and subtitles.
///
public class VideoInfo
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The name.
public VideoInfo(string name)
@@ -22,31 +22,31 @@ namespace Emby.Naming.Video
}
///
- /// Gets or sets the name.
+ /// Gets or sets the name.
///
/// The name.
public string Name { get; set; }
///
- /// Gets or sets the year.
+ /// Gets or sets the year.
///
/// The year.
public int? Year { get; set; }
///
- /// Gets or sets the files.
+ /// Gets or sets the files.
///
/// The files.
public IReadOnlyList Files { get; set; }
///
- /// Gets or sets the extras.
+ /// Gets or sets the extras.
///
/// The extras.
public IReadOnlyList Extras { get; set; }
///
- /// Gets or sets the alternate versions.
+ /// Gets or sets the alternate versions.
///
/// The alternate versions.
public IReadOnlyList AlternateVersions { get; set; }
diff --git a/Emby.Naming/Video/VideoResolver.cs b/Emby.Naming/Video/VideoResolver.cs
index 7dbd2ec7f4..0b75a8cce9 100644
--- a/Emby.Naming/Video/VideoResolver.cs
+++ b/Emby.Naming/Video/VideoResolver.cs
@@ -18,7 +18,7 @@ namespace Emby.Naming.Video
}
///
- /// Resolves the directory.
+ /// Resolves the directory.
///
/// The path.
/// VideoFileInfo.
@@ -28,7 +28,7 @@ namespace Emby.Naming.Video
}
///
- /// Resolves the file.
+ /// Resolves the file.
///
/// The path.
/// VideoFileInfo.
@@ -38,7 +38,7 @@ namespace Emby.Naming.Video
}
///
- /// Resolves the specified path.
+ /// Resolves the specified path.
///
/// The path.
/// if set to true [is folder].
From 18906d0205f99e27141b45282fd28ae9a97e93e4 Mon Sep 17 00:00:00 2001
From: crobibero
Date: Wed, 25 Mar 2020 14:33:44 -0600
Subject: [PATCH 56/95] implement suggestions
---
Emby.Naming/Video/StackResolver.cs | 8 ++++++--
Emby.Naming/Video/VideoListResolver.cs | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Emby.Naming/Video/StackResolver.cs b/Emby.Naming/Video/StackResolver.cs
index a943839f2b..f733cd2620 100644
--- a/Emby.Naming/Video/StackResolver.cs
+++ b/Emby.Naming/Video/StackResolver.cs
@@ -31,8 +31,12 @@ namespace Emby.Naming.Video
public IEnumerable ResolveAudioBooks(IEnumerable files)
{
- foreach (var directory in files.GroupBy(file =>
- file.IsDirectory ? file.FullName : Path.GetDirectoryName(file.FullName)))
+ var groupedDirectoryFiles = files.GroupBy(file =>
+ file.IsDirectory
+ ? file.FullName
+ : Path.GetDirectoryName(file.FullName));
+
+ foreach (var directory in groupedDirectoryFiles)
{
var stack = new FileStack { Name = Path.GetFileName(directory.Key), IsDirectoryStack = false };
foreach (var file in directory)
diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs
index 29b42cdc1d..125228b361 100644
--- a/Emby.Naming/Video/VideoListResolver.cs
+++ b/Emby.Naming/Video/VideoListResolver.cs
@@ -151,7 +151,8 @@ namespace Emby.Naming.Video
// Whatever files are left, just add them
list.AddRange(remainingFiles.Select(i => new VideoInfo(i.Name)
{
- Files = new List { i }, Year = i.Year
+ Files = new List { i },
+ Year = i.Year
}));
return list;
From bd5c66b2a6bb3ec725de33e646d3617bbe66267a Mon Sep 17 00:00:00 2001
From: crobibero
Date: Wed, 25 Mar 2020 18:29:47 -0600
Subject: [PATCH 57/95] implement suggestions
---
Emby.Naming/Video/VideoListResolver.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs
index 125228b361..7f755fd25e 100644
--- a/Emby.Naming/Video/VideoListResolver.cs
+++ b/Emby.Naming/Video/VideoListResolver.cs
@@ -172,7 +172,7 @@ namespace Emby.Naming.Video
if (!string.IsNullOrEmpty(folderName)
&& folderName.Length > 1
&& videos.All(i => i.Files.Count == 1
- && IsEligibleForMultiVersion(folderName, i.Files[0].Path))
+ && IsEligibleForMultiVersion(folderName, i.Files[0].Path))
&& HaveSameYear(videos))
{
var ordered = videos.OrderBy(i => i.Name).ToList();
@@ -211,8 +211,8 @@ namespace Emby.Naming.Video
{
testFilename = testFilename.Substring(folderName.Length).Trim();
return string.IsNullOrEmpty(testFilename)
- || testFilename[0] == '-'
- || string.IsNullOrWhiteSpace(Regex.Replace(testFilename, @"\[([^]]*)\]", string.Empty));
+ || testFilename[0] == '-'
+ || string.IsNullOrWhiteSpace(Regex.Replace(testFilename, @"\[([^]]*)\]", string.Empty));
}
return false;
From 0d2a355c00f9309631953af675aeb8e47b32575e Mon Sep 17 00:00:00 2001
From: Vasily
Date: Thu, 26 Mar 2020 17:40:28 +0300
Subject: [PATCH 58/95] Make variables binding correspond with column names
---
Emby.Server.Implementations/Data/SqliteItemRepository.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 0eb396af47..3f2d33de25 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -6288,8 +6288,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
statement.TryBind("@Codec" + index, attachment.Codec);
statement.TryBind("@CodecTag" + index, attachment.CodecTag);
statement.TryBind("@Comment" + index, attachment.Comment);
- statement.TryBind("@FileName" + index, attachment.FileName);
- statement.TryBind("@MimeType" + index, attachment.MimeType);
+ statement.TryBind("@Filename" + index, attachment.FileName);
+ statement.TryBind("@MIMEType" + index, attachment.MimeType);
}
statement.Reset();
From ea49514723802ea10a2053d868956b287e92f1ef Mon Sep 17 00:00:00 2001
From: Cody Robibero
Date: Thu, 26 Mar 2020 09:31:23 -0600
Subject: [PATCH 59/95] Update Emby.Naming/Subtitles/SubtitleParser.cs
Co-Authored-By: dkanada
---
Emby.Naming/Subtitles/SubtitleParser.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Emby.Naming/Subtitles/SubtitleParser.cs b/Emby.Naming/Subtitles/SubtitleParser.cs
index 5797c6bfa6..88ec3e2d60 100644
--- a/Emby.Naming/Subtitles/SubtitleParser.cs
+++ b/Emby.Naming/Subtitles/SubtitleParser.cs
@@ -37,9 +37,8 @@ namespace Emby.Naming.Subtitles
IsForced = _options.SubtitleForcedFlags.Any(i => flags.Contains(i, StringComparer.OrdinalIgnoreCase))
};
- var parts = flags.Where(i =>
- !_options.SubtitleDefaultFlags.Contains(i, StringComparer.OrdinalIgnoreCase) &&
- !_options.SubtitleForcedFlags.Contains(i, StringComparer.OrdinalIgnoreCase))
+ var parts = flags.Where(i => !_options.SubtitleDefaultFlags.Contains(i, StringComparer.OrdinalIgnoreCase)
+ && !_options.SubtitleForcedFlags.Contains(i, StringComparer.OrdinalIgnoreCase))
.ToList();
// Should have a name, language and file extension
From b10f268c43a6a0f49ded5e0175815d2c3f66631f Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 26 Mar 2020 17:15:35 +0000
Subject: [PATCH 60/95] Bump Microsoft.NET.Test.Sdk from 16.4.0 to 16.5.0
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.4.0 to 16.5.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.4.0...v16.5.0)
Signed-off-by: dependabot-preview[bot]
---
tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj | 2 +-
tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj | 2 +-
.../Jellyfin.Controller.Tests/Jellyfin.Controller.Tests.csproj | 2 +-
.../Jellyfin.MediaEncoding.Tests.csproj | 2 +-
tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj
index 77b0561efd..bb0357c067 100644
--- a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj
+++ b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj b/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj
index 86bb11bd4c..c81b820d9a 100644
--- a/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj
+++ b/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/tests/Jellyfin.Controller.Tests/Jellyfin.Controller.Tests.csproj b/tests/Jellyfin.Controller.Tests/Jellyfin.Controller.Tests.csproj
index c63f2e8c63..06c10afe1b 100644
--- a/tests/Jellyfin.Controller.Tests/Jellyfin.Controller.Tests.csproj
+++ b/tests/Jellyfin.Controller.Tests/Jellyfin.Controller.Tests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj b/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj
index b5e4a1287b..52d28206d8 100644
--- a/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj
+++ b/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj b/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj
index 9602d9e58a..4a583bcc76 100644
--- a/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj
+++ b/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj
@@ -7,7 +7,7 @@
-
+
From 0778eb20aac878fd49a5ba0375f3e3d69693e62f Mon Sep 17 00:00:00 2001
From: ferferga
Date: Thu, 26 Mar 2020 20:28:30 +0100
Subject: [PATCH 61/95] Translate Scheduled Tasks (names and descriptions)
---
.../Localization/Core/en-US.json | 19 ++++++++++++++++++-
.../Localization/Core/es.json | 19 ++++++++++++++++++-
.../ScheduledTasks/Tasks/ChapterImagesTask.cs | 8 +++++---
.../Tasks/DeleteCacheFileTask.cs | 8 +++++---
.../ScheduledTasks/Tasks/DeleteLogFileTask.cs | 8 +++++---
.../Tasks/DeleteTranscodeFileTask.cs | 8 +++++---
.../Tasks/PeopleValidationTask.cs | 8 +++++---
.../ScheduledTasks/Tasks/PluginUpdateTask.cs | 8 +++++---
.../Tasks/RefreshMediaLibraryTask.cs | 8 +++++---
9 files changed, 71 insertions(+), 23 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json
index aa855ed21f..2e247b2cce 100644
--- a/Emby.Server.Implementations/Localization/Core/en-US.json
+++ b/Emby.Server.Implementations/Localization/Core/en-US.json
@@ -92,5 +92,22 @@
"UserStoppedPlayingItemWithValues": "{0} has finished playing {1} on {2}",
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library",
"ValueSpecialEpisodeName": "Special - {0}",
- "VersionNumber": "Version {0}"
+ "VersionNumber": "Version {0}",
+ "TasksMaintenance": "Maintenance",
+ "TasksLibrary": "Library",
+ "TasksApplication": "Application",
+ "TaskCleanCache": "Clean Cache Directory",
+ "TaskCleanCacheDescription": "Deletes cache files no longer needed by the system.",
+ "TaskRefreshChapterImages": "Extract Chapter Images",
+ "TaskRefreshChapterImagesDescription": "Creates thumbnails for videos that have chapters.",
+ "TaskRefreshLibrary": "Scan Media Library",
+ "TaskRefreshLibraryDescription": "Scans your media library for new files and refreshes metadata.",
+ "TaskCleanLogs": "Clean Log Directory",
+ "TaskCleanLogsDescription": "Deletes log files that are more than {0} days old.",
+ "TaskRefreshPeople": "Refresh People",
+ "TaskRefreshPeopleDescription": "Updates metadata for actors and directors in your media library.",
+ "TaskUpdatePlugins": "Update Plugins",
+ "TaskUpdatePluginsDescription": "Downloads and installs updates for plugins that are configured to update automatically.",
+ "TaskCleanTranscode": "Clean Transcode Directory",
+ "TaskCleanTranscodeDescription": "Deletes transcode files more than one day old."
}
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index 2dcc2c1c8a..d68bdea113 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -93,5 +93,22 @@
"UserStoppedPlayingItemWithValues": "{0} ha terminado de reproducir {1} en {2}",
"ValueHasBeenAddedToLibrary": "{0} ha sido añadido a tu biblioteca multimedia",
"ValueSpecialEpisodeName": "Especial - {0}",
- "VersionNumber": "Versión {0}"
+ "VersionNumber": "Versión {0}",
+ "TasksMaintenance": "Mantenimiento",
+ "TasksLibrary": "Librería",
+ "TasksApplication": "Aplicación",
+ "TaskCleanCache": "Eliminar archivos temporales",
+ "TaskCleanCacheDescription": "Elimina los archivos temporales que ya no son necesarios para el servidor",
+ "TaskRefreshChapterImages": "Extraer imágenes de los capítulos",
+ "TaskRefreshChapterImagesDescription": "Crea las miniaturas de los vídeos que tengan capítulos",
+ "TaskRefreshLibrary": "Escanear la biblioteca",
+ "TaskRefreshLibraryDescription": "Añade los archivos que se hayan añadido a la biblioteca y actualiza las etiquetas de los ya presentes",
+ "TaskCleanLogs": "Limpiar registros",
+ "TaskCleanLogsDescription": "Elimina los archivos de registros que tengan más de {0} días",
+ "TaskRefreshPeople": "Actualizar personas",
+ "TaskRefreshPeopleDescription": "Actualiza las etiquetas de los intérpretes y directores presentes en tus bibliotecas",
+ "TaskUpdatePlugins": "Actualizar extensiones",
+ "TaskUpdatePluginsDescription": "Actualiza las extensiones que están configuradas para actualizarse automáticamente",
+ "TaskCleanTranscode": "Limpiar las transcodificaciones",
+ "TaskCleanTranscodeDescription": "Elimina los archivos temporales creados mientras se transcodificaba el contenido"
}
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
index 5822c467b7..e0dae3ded1 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
@@ -15,6 +15,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.ScheduledTasks
{
@@ -39,6 +40,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
private readonly IEncodingManager _encodingManager;
private readonly IFileSystem _fileSystem;
+ private readonly ILocalizationManager _localization;
///
/// Initializes a new instance of the class.
@@ -159,11 +161,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
}
- public string Name => "Extract Chapter Images";
+ public string Name => _localization.GetLocalizedString("TaskRefreshChapterImages");
- public string Description => "Creates thumbnails for videos that have chapters.";
+ public string Description => _localization.GetLocalizedString("TaskRefreshChapterImagesDescription");
- public string Category => "Library";
+ public string Category => _localization.GetLocalizedString("TasksLibrary");
public string Key => "RefreshChapterImages";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
index b7668c872a..7925f18388 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
@@ -8,6 +8,7 @@ using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
{
@@ -25,6 +26,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
private readonly ILogger _logger;
private readonly IFileSystem _fileSystem;
+ private readonly ILocalizationManager _localization;
///
/// Initializes a new instance of the class.
@@ -161,11 +163,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
}
}
- public string Name => "Clean Cache Directory";
+ public string Name => _localization.GetLocalizedString("TaskCleanCache");
- public string Description => "Deletes cache files no longer needed by the system.";
+ public string Description => _localization.GetLocalizedString("TaskCleanCacheDescription");
- public string Category => "Maintenance";
+ public string Category => _localization.GetLocalizedString("TasksMaintenance");
public string Key => "DeleteCacheFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
index 9f9c6353a1..e9306ea68a 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Tasks;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
{
@@ -21,6 +22,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
private IConfigurationManager ConfigurationManager { get; set; }
private readonly IFileSystem _fileSystem;
+ private readonly ILocalizationManager _localization;
///
/// Initializes a new instance of the class.
@@ -79,11 +81,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
return Task.CompletedTask;
}
- public string Name => "Clean Log Directory";
+ public string Name => _localization.GetLocalizedString("TaskCleanLogs");
- public string Description => string.Format("Deletes log files that are more than {0} days old.", ConfigurationManager.CommonConfiguration.LogFileRetentionDays);
+ public string Description => string.Format(_localization.GetLocalizedString("TaskCleanLogsDescription"), ConfigurationManager.CommonConfiguration.LogFileRetentionDays);
- public string Category => "Maintenance";
+ public string Category => _localization.GetLocalizedString("TasksMaintenance");
public string Key => "CleanLogFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
index 37136f4386..84e5708445 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
@@ -8,6 +8,7 @@ using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
{
@@ -19,6 +20,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
private readonly ILogger _logger;
private readonly IConfigurationManager _configurationManager;
private readonly IFileSystem _fileSystem;
+ private readonly ILocalizationManager _localization;
///
/// Initializes a new instance of the class.
@@ -128,11 +130,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
}
}
- public string Name => "Clean Transcode Directory";
+ public string Name => _localization.GetLocalizedString("TaskCleanTranscode");
- public string Description => "Deletes transcode files more than one day old.";
+ public string Description => _localization.GetLocalizedString("TaskCleanTranscodeDescription");
- public string Category => "Maintenance";
+ public string Category => _localization.GetLocalizedString("TasksMaintenance");
public string Key => "DeleteTranscodeFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
index eaf17aace1..6e90cde1a9 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.ScheduledTasks
{
@@ -19,6 +20,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
private readonly ILibraryManager _libraryManager;
private readonly IServerApplicationHost _appHost;
+ private readonly ILocalizationManager _localization;
///
/// Initializes a new instance of the class.
@@ -57,11 +59,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
return _libraryManager.ValidatePeople(cancellationToken, progress);
}
- public string Name => "Refresh People";
+ public string Name => _localization.GetLocalizedString("TaskRefreshPeople");
- public string Description => "Updates metadata for actors and directors in your media library.";
+ public string Description => _localization.GetLocalizedString("TaskRefreshPeopleDescription");
- public string Category => "Library";
+ public string Category => _localization.GetLocalizedString("TasksLibrary");
public string Key => "RefreshPeople";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index 9d87316e43..7dcfa3c9d7 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -8,6 +8,7 @@ using MediaBrowser.Common.Updates;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.ScheduledTasks
{
@@ -22,6 +23,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
private readonly ILogger _logger;
private readonly IInstallationManager _installationManager;
+ private readonly ILocalizationManager _localization;
public PluginUpdateTask(ILogger logger, IInstallationManager installationManager)
{
@@ -96,13 +98,13 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
///
- public string Name => "Update Plugins";
+ public string Name => _localization.GetLocalizedString("TaskUpdatePlugins");
///
- public string Description => "Downloads and installs updates for plugins that are configured to update automatically.";
+ public string Description => _localization.GetLocalizedString("TaskUpdatePluginsDescription");
///
- public string Category => "Application";
+ public string Category => _localization.GetLocalizedString("TasksApplication");
///
public string Key => "PluginUpdates";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
index 0736780191..257dc0af4e 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
@@ -6,6 +6,7 @@ using Emby.Server.Implementations.Library;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.ScheduledTasks
{
@@ -19,6 +20,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
///
private readonly ILibraryManager _libraryManager;
private readonly IServerConfigurationManager _config;
+ private readonly ILocalizationManager _localization;
///
/// Initializes a new instance of the class.
@@ -57,11 +59,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
return ((LibraryManager)_libraryManager).ValidateMediaLibraryInternal(progress, cancellationToken);
}
- public string Name => "Scan Media Library";
+ public string Name => _localization.GetLocalizedString("TaskRefreshLibrary");
- public string Description => "Scans your media library for new files and refreshes metadata.";
+ public string Description => _localization.GetLocalizedString("TaskRefreshLibraryDescription");
- public string Category => "Library";
+ public string Category => _localization.GetLocalizedString("TasksLibrary");
public string Key => "RefreshLibrary";
From 30c1170a55c9fa191d3dd26a6229d0776b366ec4 Mon Sep 17 00:00:00 2001
From: ferferga
Date: Thu, 26 Mar 2020 20:29:00 +0100
Subject: [PATCH 62/95] Remove comments
---
.../ScheduledTasks/Tasks/PluginUpdateTask.cs | 7 -------
1 file changed, 7 deletions(-)
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index 7dcfa3c9d7..b5bacc48ec 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -97,25 +97,18 @@ namespace Emby.Server.Implementations.ScheduledTasks
progress.Report(100);
}
- ///
public string Name => _localization.GetLocalizedString("TaskUpdatePlugins");
- ///
public string Description => _localization.GetLocalizedString("TaskUpdatePluginsDescription");
- ///
public string Category => _localization.GetLocalizedString("TasksApplication");
- ///
public string Key => "PluginUpdates";
- ///
public bool IsHidden => false;
- ///
public bool IsEnabled => true;
- ///
public bool IsLogged => true;
}
}
From d0b3dc1485ddffe14fcd5370e0544648809eaf91 Mon Sep 17 00:00:00 2001
From: ferferga
Date: Thu, 26 Mar 2020 20:32:28 +0100
Subject: [PATCH 63/95] Remove an unused string
---
Emby.Server.Implementations/Localization/Core/af.json | 1 -
Emby.Server.Implementations/Localization/Core/ar.json | 1 -
Emby.Server.Implementations/Localization/Core/bg-BG.json | 1 -
Emby.Server.Implementations/Localization/Core/bn.json | 1 -
Emby.Server.Implementations/Localization/Core/ca.json | 1 -
Emby.Server.Implementations/Localization/Core/cs.json | 1 -
Emby.Server.Implementations/Localization/Core/da.json | 1 -
Emby.Server.Implementations/Localization/Core/de.json | 1 -
Emby.Server.Implementations/Localization/Core/el.json | 1 -
Emby.Server.Implementations/Localization/Core/en-GB.json | 1 -
Emby.Server.Implementations/Localization/Core/en-US.json | 1 -
Emby.Server.Implementations/Localization/Core/es-AR.json | 1 -
Emby.Server.Implementations/Localization/Core/es-MX.json | 1 -
Emby.Server.Implementations/Localization/Core/es.json | 1 -
Emby.Server.Implementations/Localization/Core/fa.json | 1 -
Emby.Server.Implementations/Localization/Core/fi.json | 1 -
Emby.Server.Implementations/Localization/Core/fil.json | 1 -
Emby.Server.Implementations/Localization/Core/fr-CA.json | 1 -
Emby.Server.Implementations/Localization/Core/fr.json | 1 -
Emby.Server.Implementations/Localization/Core/gsw.json | 1 -
Emby.Server.Implementations/Localization/Core/he.json | 1 -
Emby.Server.Implementations/Localization/Core/hr.json | 1 -
Emby.Server.Implementations/Localization/Core/hu.json | 1 -
Emby.Server.Implementations/Localization/Core/id.json | 1 -
Emby.Server.Implementations/Localization/Core/is.json | 1 -
Emby.Server.Implementations/Localization/Core/it.json | 1 -
Emby.Server.Implementations/Localization/Core/ja.json | 1 -
Emby.Server.Implementations/Localization/Core/kk.json | 1 -
Emby.Server.Implementations/Localization/Core/ko.json | 1 -
Emby.Server.Implementations/Localization/Core/lt-LT.json | 1 -
Emby.Server.Implementations/Localization/Core/lv.json | 1 -
Emby.Server.Implementations/Localization/Core/mk.json | 1 -
Emby.Server.Implementations/Localization/Core/ms.json | 1 -
Emby.Server.Implementations/Localization/Core/nb.json | 1 -
Emby.Server.Implementations/Localization/Core/nl.json | 1 -
Emby.Server.Implementations/Localization/Core/pl.json | 1 -
Emby.Server.Implementations/Localization/Core/pt-BR.json | 1 -
Emby.Server.Implementations/Localization/Core/pt-PT.json | 1 -
Emby.Server.Implementations/Localization/Core/pt.json | 1 -
Emby.Server.Implementations/Localization/Core/ro.json | 1 -
Emby.Server.Implementations/Localization/Core/ru.json | 1 -
Emby.Server.Implementations/Localization/Core/sk.json | 1 -
Emby.Server.Implementations/Localization/Core/sl-SI.json | 1 -
Emby.Server.Implementations/Localization/Core/sr.json | 1 -
Emby.Server.Implementations/Localization/Core/sv.json | 1 -
Emby.Server.Implementations/Localization/Core/tr.json | 1 -
Emby.Server.Implementations/Localization/Core/zh-CN.json | 1 -
Emby.Server.Implementations/Localization/Core/zh-HK.json | 1 -
Emby.Server.Implementations/Localization/Core/zh-TW.json | 1 -
49 files changed, 49 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/af.json b/Emby.Server.Implementations/Localization/Core/af.json
index dcec268017..1363eaf854 100644
--- a/Emby.Server.Implementations/Localization/Core/af.json
+++ b/Emby.Server.Implementations/Localization/Core/af.json
@@ -41,7 +41,6 @@
"User": "Gebruiker",
"TvShows": "TV Programme",
"System": "Stelsel",
- "SubtitlesDownloadedForItem": "Ondertitels afgelaai vir {0}",
"SubtitleDownloadFailureFromForItem": "Ondertitels het misluk om af te laai van {0} vir {1}",
"StartupEmbyServerIsLoading": "Jellyfin Bediener is besig om te laai. Probeer weer in 'n kort tyd.",
"ServerNameNeedsToBeRestarted": "{0} moet herbegin word",
diff --git a/Emby.Server.Implementations/Localization/Core/ar.json b/Emby.Server.Implementations/Localization/Core/ar.json
index fa0e48bafc..4952fc160c 100644
--- a/Emby.Server.Implementations/Localization/Core/ar.json
+++ b/Emby.Server.Implementations/Localization/Core/ar.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "سيرفر Jellyfin قيد التشغيل . الرجاء المحاولة بعد قليل.",
"SubtitleDownloadFailureForItem": "عملية إنزال الترجمة فشلت لـ{0}",
"SubtitleDownloadFailureFromForItem": "الترجمات فشلت في التحميل من {0} الى {1}",
- "SubtitlesDownloadedForItem": "تم تحميل الترجمات الى {0}",
"Sync": "مزامنة",
"System": "النظام",
"TvShows": "البرامج التلفزيونية",
diff --git a/Emby.Server.Implementations/Localization/Core/bg-BG.json b/Emby.Server.Implementations/Localization/Core/bg-BG.json
index 8a1bbaa161..345f384605 100644
--- a/Emby.Server.Implementations/Localization/Core/bg-BG.json
+++ b/Emby.Server.Implementations/Localization/Core/bg-BG.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Сървърът зарежда. Моля, опитайте отново след малко.",
"SubtitleDownloadFailureForItem": "Неуспешно изтегляне на субтитри за {0}",
"SubtitleDownloadFailureFromForItem": "Поднадписите за {1} от {0} не можаха да се изтеглят",
- "SubtitlesDownloadedForItem": "Изтеглени са субтитри за {0}",
"Sync": "Синхронизиране",
"System": "Система",
"TvShows": "Телевизионни сериали",
diff --git a/Emby.Server.Implementations/Localization/Core/bn.json b/Emby.Server.Implementations/Localization/Core/bn.json
index a7219a7254..ef7792356a 100644
--- a/Emby.Server.Implementations/Localization/Core/bn.json
+++ b/Emby.Server.Implementations/Localization/Core/bn.json
@@ -38,7 +38,6 @@
"TvShows": "টিভি শোগুলো",
"System": "সিস্টেম",
"Sync": "সিংক",
- "SubtitlesDownloadedForItem": "{0} এর জন্য সাবটাইটেল ডাউনলোড করা হয়েছে",
"SubtitleDownloadFailureFromForItem": "{2} থেকে {1} এর জন্য সাবটাইটেল ডাউনলোড ব্যর্থ",
"StartupEmbyServerIsLoading": "জেলিফিন সার্ভার লোড হচ্ছে। দয়া করে একটু পরে আবার চেষ্টা করুন।",
"Songs": "গানগুলো",
diff --git a/Emby.Server.Implementations/Localization/Core/ca.json b/Emby.Server.Implementations/Localization/Core/ca.json
index 44e7cf0ce6..2d82993675 100644
--- a/Emby.Server.Implementations/Localization/Core/ca.json
+++ b/Emby.Server.Implementations/Localization/Core/ca.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "El Servidor d'Jellyfin està carregant. Si et plau, prova de nou en breus.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Els subtítols no s'han pogut baixar de {0} per {1}",
- "SubtitlesDownloadedForItem": "Subtítols descarregats per a {0}",
"Sync": "Sincronitzar",
"System": "System",
"TvShows": "Espectacles de TV",
diff --git a/Emby.Server.Implementations/Localization/Core/cs.json b/Emby.Server.Implementations/Localization/Core/cs.json
index 86fbac3805..f3136c0322 100644
--- a/Emby.Server.Implementations/Localization/Core/cs.json
+++ b/Emby.Server.Implementations/Localization/Core/cs.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server je spouštěn. Zkuste to prosím v brzké době znovu.",
"SubtitleDownloadFailureForItem": "Stahování titulků selhalo pro {0}",
"SubtitleDownloadFailureFromForItem": "Stažení titulků pro {1} z {0} selhalo",
- "SubtitlesDownloadedForItem": "Staženy titulky pro {0}",
"Sync": "Synchronizace",
"System": "Systém",
"TvShows": "TV seriály",
diff --git a/Emby.Server.Implementations/Localization/Core/da.json b/Emby.Server.Implementations/Localization/Core/da.json
index c421db87d4..94437d237b 100644
--- a/Emby.Server.Implementations/Localization/Core/da.json
+++ b/Emby.Server.Implementations/Localization/Core/da.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server er i gang med at starte op. Prøv venligst igen om lidt.",
"SubtitleDownloadFailureForItem": "Fejlet i download af undertekster for {0}",
"SubtitleDownloadFailureFromForItem": "Undertekster kunne ikke downloades fra {0} til {1}",
- "SubtitlesDownloadedForItem": "Undertekster downloadet for {0}",
"Sync": "Synk",
"System": "System",
"TvShows": "TV serier",
diff --git a/Emby.Server.Implementations/Localization/Core/de.json b/Emby.Server.Implementations/Localization/Core/de.json
index b0a3af0569..578c42f9e4 100644
--- a/Emby.Server.Implementations/Localization/Core/de.json
+++ b/Emby.Server.Implementations/Localization/Core/de.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin-Server startet, bitte versuche es gleich noch einmal.",
"SubtitleDownloadFailureForItem": "Download der Untertitel fehlgeschlagen für {0}",
"SubtitleDownloadFailureFromForItem": "Untertitel von {0} für {1} konnten nicht heruntergeladen werden",
- "SubtitlesDownloadedForItem": "Untertitel heruntergeladen für {0}",
"Sync": "Synchronisation",
"System": "System",
"TvShows": "TV-Sendungen",
diff --git a/Emby.Server.Implementations/Localization/Core/el.json b/Emby.Server.Implementations/Localization/Core/el.json
index 580b423302..53e2f58de8 100644
--- a/Emby.Server.Implementations/Localization/Core/el.json
+++ b/Emby.Server.Implementations/Localization/Core/el.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Ο Jellyfin Server φορτώνει. Παρακαλώ δοκιμάστε σε λίγο.",
"SubtitleDownloadFailureForItem": "Οι υπότιτλοι απέτυχαν να κατέβουν για {0}",
"SubtitleDownloadFailureFromForItem": "Αποτυχίες μεταφόρτωσης υποτίτλων από {0} για {1}",
- "SubtitlesDownloadedForItem": "Οι υπότιτλοι κατέβηκαν για {0}",
"Sync": "Συγχρονισμός",
"System": "Σύστημα",
"TvShows": "Τηλεοπτικές Σειρές",
diff --git a/Emby.Server.Implementations/Localization/Core/en-GB.json b/Emby.Server.Implementations/Localization/Core/en-GB.json
index 67d4068cf3..dc4f0b212a 100644
--- a/Emby.Server.Implementations/Localization/Core/en-GB.json
+++ b/Emby.Server.Implementations/Localization/Core/en-GB.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server is loading. Please try again shortly.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}",
- "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}",
"Sync": "Sync",
"System": "System",
"TvShows": "TV Shows",
diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json
index 2e247b2cce..d25c5f2c3f 100644
--- a/Emby.Server.Implementations/Localization/Core/en-US.json
+++ b/Emby.Server.Implementations/Localization/Core/en-US.json
@@ -75,7 +75,6 @@
"Songs": "Songs",
"StartupEmbyServerIsLoading": "Jellyfin Server is loading. Please try again shortly.",
"SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}",
- "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}",
"Sync": "Sync",
"System": "System",
"TvShows": "TV Shows",
diff --git a/Emby.Server.Implementations/Localization/Core/es-AR.json b/Emby.Server.Implementations/Localization/Core/es-AR.json
index dc73ba6b34..154c72bc68 100644
--- a/Emby.Server.Implementations/Localization/Core/es-AR.json
+++ b/Emby.Server.Implementations/Localization/Core/es-AR.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server se está cargando. Vuelve a intentarlo en breve.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Fallo de descarga de subtítulos desde {0} para {1}",
- "SubtitlesDownloadedForItem": "Descargar subtítulos para {0}",
"Sync": "Sincronizar",
"System": "Sistema",
"TvShows": "Series de TV",
diff --git a/Emby.Server.Implementations/Localization/Core/es-MX.json b/Emby.Server.Implementations/Localization/Core/es-MX.json
index 99fda7aa63..24fde8e62f 100644
--- a/Emby.Server.Implementations/Localization/Core/es-MX.json
+++ b/Emby.Server.Implementations/Localization/Core/es-MX.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "El servidor Jellyfin esta cargando. Por favor intente de nuevo dentro de poco.",
"SubtitleDownloadFailureForItem": "Falló la descarga de subtítulos para {0}",
"SubtitleDownloadFailureFromForItem": "Falló la descarga de subtitulos desde {0} para {1}",
- "SubtitlesDownloadedForItem": "Subtítulos descargados para {0}",
"Sync": "Sincronizar",
"System": "Sistema",
"TvShows": "Programas de TV",
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index d68bdea113..6460caebf7 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server se está cargando. Vuelve a intentarlo en breve.",
"SubtitleDownloadFailureForItem": "Error al descargar subtítulos para {0}",
"SubtitleDownloadFailureFromForItem": "Fallo de descarga de subtítulos desde {0} para {1}",
- "SubtitlesDownloadedForItem": "Descargar subtítulos para {0}",
"Sync": "Sincronizar",
"System": "Sistema",
"TvShows": "Programas de televisión",
diff --git a/Emby.Server.Implementations/Localization/Core/fa.json b/Emby.Server.Implementations/Localization/Core/fa.json
index faa658ed58..16fe18ef33 100644
--- a/Emby.Server.Implementations/Localization/Core/fa.json
+++ b/Emby.Server.Implementations/Localization/Core/fa.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "سرور Jellyfin در حال بارگیری است. لطفا کمی بعد دوباره تلاش کنید.",
"SubtitleDownloadFailureForItem": "دانلود زیرنویس برای {0} ناموفق بود",
"SubtitleDownloadFailureFromForItem": "زیرنویس برای دانلود با مشکل مواجه شده از {0} برای {1}",
- "SubtitlesDownloadedForItem": "زیرنویس {0} دانلود شد",
"Sync": "همگامسازی",
"System": "سیستم",
"TvShows": "سریال های تلویزیونی",
diff --git a/Emby.Server.Implementations/Localization/Core/fi.json b/Emby.Server.Implementations/Localization/Core/fi.json
index a38103d25a..bf5fc05c4d 100644
--- a/Emby.Server.Implementations/Localization/Core/fi.json
+++ b/Emby.Server.Implementations/Localization/Core/fi.json
@@ -69,7 +69,6 @@
"UserCreatedWithName": "Luotiin käyttäjä {0}",
"TvShows": "TV-Ohjelmat",
"Sync": "Synkronoi",
- "SubtitlesDownloadedForItem": "Tekstitys ladattu {0}",
"SubtitleDownloadFailureFromForItem": "Tekstityksen lataaminen epäonnistui {0} - {1}",
"StartupEmbyServerIsLoading": "Jellyfin palvelin latautuu. Kokeile hetken kuluttua uudelleen.",
"Songs": "Kappaleet",
diff --git a/Emby.Server.Implementations/Localization/Core/fil.json b/Emby.Server.Implementations/Localization/Core/fil.json
index 66db059d97..86a6d18367 100644
--- a/Emby.Server.Implementations/Localization/Core/fil.json
+++ b/Emby.Server.Implementations/Localization/Core/fil.json
@@ -16,7 +16,6 @@
"TvShows": "Pelikula",
"System": "Sistema",
"Sync": "Pag-sync",
- "SubtitlesDownloadedForItem": "Naidownload na ang subtitles {0}",
"SubtitleDownloadFailureFromForItem": "Hindi naidownload ang subtitles {0} para sa {1}",
"StartupEmbyServerIsLoading": "Nagloload ang Jellyfin Server. Sandaling maghintay.",
"Songs": "Kanta",
diff --git a/Emby.Server.Implementations/Localization/Core/fr-CA.json b/Emby.Server.Implementations/Localization/Core/fr-CA.json
index 4b4db39a8b..dcc8f17a45 100644
--- a/Emby.Server.Implementations/Localization/Core/fr-CA.json
+++ b/Emby.Server.Implementations/Localization/Core/fr-CA.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Le serveur Jellyfin est en cours de chargement. Veuillez réessayer dans quelques instants.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Échec du téléchargement des sous-titres depuis {0} pour {1}",
- "SubtitlesDownloadedForItem": "Les sous-titres de {0} ont été téléchargés",
"Sync": "Synchroniser",
"System": "Système",
"TvShows": "Séries Télé",
diff --git a/Emby.Server.Implementations/Localization/Core/fr.json b/Emby.Server.Implementations/Localization/Core/fr.json
index 7dfee10854..d93c803a35 100644
--- a/Emby.Server.Implementations/Localization/Core/fr.json
+++ b/Emby.Server.Implementations/Localization/Core/fr.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Le serveur Jellyfin est en cours de chargement. Veuillez réessayer dans quelques instants.",
"SubtitleDownloadFailureForItem": "Le téléchargement des sous-titres pour {0} a échoué.",
"SubtitleDownloadFailureFromForItem": "Échec du téléchargement des sous-titres depuis {0} pour {1}",
- "SubtitlesDownloadedForItem": "Les sous-titres de {0} ont été téléchargés",
"Sync": "Synchroniser",
"System": "Système",
"TvShows": "Séries Télé",
diff --git a/Emby.Server.Implementations/Localization/Core/gsw.json b/Emby.Server.Implementations/Localization/Core/gsw.json
index 69c1574014..9611e33f57 100644
--- a/Emby.Server.Implementations/Localization/Core/gsw.json
+++ b/Emby.Server.Implementations/Localization/Core/gsw.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server ladt. Bitte grad noeinisch probiere.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Ondertetle vo {0} för {1} hend ned chönne abeglade wärde",
- "SubtitlesDownloadedForItem": "Ondertetle abeglade för {0}",
"Sync": "Synchronisation",
"System": "System",
"TvShows": "Färnsehserie",
diff --git a/Emby.Server.Implementations/Localization/Core/he.json b/Emby.Server.Implementations/Localization/Core/he.json
index 5618719dd3..1ce8b08a0a 100644
--- a/Emby.Server.Implementations/Localization/Core/he.json
+++ b/Emby.Server.Implementations/Localization/Core/he.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "שרת Jellyfin בהליכי טעינה. אנא נסה שנית בעוד זמן קצר.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}",
- "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}",
"Sync": "סנכרן",
"System": "System",
"TvShows": "סדרות טלוויזיה",
diff --git a/Emby.Server.Implementations/Localization/Core/hr.json b/Emby.Server.Implementations/Localization/Core/hr.json
index f284b3cd98..6947178d7a 100644
--- a/Emby.Server.Implementations/Localization/Core/hr.json
+++ b/Emby.Server.Implementations/Localization/Core/hr.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server se učitava. Pokušajte ponovo kasnije.",
"SubtitleDownloadFailureForItem": "Titlovi prijevoda nisu preuzeti za {0}",
"SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}",
- "SubtitlesDownloadedForItem": "Titlovi prijevoda preuzeti za {0}",
"Sync": "Sink.",
"System": "Sistem",
"TvShows": "TV Shows",
diff --git a/Emby.Server.Implementations/Localization/Core/hu.json b/Emby.Server.Implementations/Localization/Core/hu.json
index 6017aa7f90..8f1288a559 100644
--- a/Emby.Server.Implementations/Localization/Core/hu.json
+++ b/Emby.Server.Implementations/Localization/Core/hu.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "A Jellyfin Szerver betöltődik. Kérlek, próbáld újra hamarosan.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Nem sikerült a felirat letöltése innen: {0} ehhez: {1}",
- "SubtitlesDownloadedForItem": "Letöltött feliratok a következőhöz: {0}",
"Sync": "Szinkronizál",
"System": "Rendszer",
"TvShows": "TV műsorok",
diff --git a/Emby.Server.Implementations/Localization/Core/id.json b/Emby.Server.Implementations/Localization/Core/id.json
index 68fffbf0ad..eabdb9138a 100644
--- a/Emby.Server.Implementations/Localization/Core/id.json
+++ b/Emby.Server.Implementations/Localization/Core/id.json
@@ -54,7 +54,6 @@
"User": "Pengguna",
"System": "Sistem",
"Sync": "Sinkron",
- "SubtitlesDownloadedForItem": "Talop telah diunduh untuk {0}",
"Shows": "Tayangan",
"ServerNameNeedsToBeRestarted": "{0} perlu dimuat ulang",
"ScheduledTaskStartedWithName": "{0} dimulai",
diff --git a/Emby.Server.Implementations/Localization/Core/is.json b/Emby.Server.Implementations/Localization/Core/is.json
index 3490a73022..ef2a57e8e8 100644
--- a/Emby.Server.Implementations/Localization/Core/is.json
+++ b/Emby.Server.Implementations/Localization/Core/is.json
@@ -86,7 +86,6 @@
"UserOfflineFromDevice": "{0} hefur aftengst frá {1}",
"UserLockedOutWithName": "Notanda {0} hefur verið hindraður aðgangur",
"UserDownloadingItemWithValues": "{0} Hleður niður {1}",
- "SubtitlesDownloadedForItem": "Skjátextum halað niður fyrir {0}",
"SubtitleDownloadFailureFromForItem": "Tókst ekki að hala niður skjátextum frá {0} til {1}",
"ProviderValue": "Veitandi: {0}",
"MessageNamedServerConfigurationUpdatedWithValue": "Stilling {0} hefur verið uppfærð á netþjón",
diff --git a/Emby.Server.Implementations/Localization/Core/it.json b/Emby.Server.Implementations/Localization/Core/it.json
index 395924af4b..b9348e058f 100644
--- a/Emby.Server.Implementations/Localization/Core/it.json
+++ b/Emby.Server.Implementations/Localization/Core/it.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin server si sta avviando. Per favore riprova più tardi.",
"SubtitleDownloadFailureForItem": "Impossibile scaricare i sottotitoli per {0}",
"SubtitleDownloadFailureFromForItem": "Impossibile scaricare i sottotitoli da {0} per {1}",
- "SubtitlesDownloadedForItem": "Sottotitoli scaricati per {0}",
"Sync": "Sincronizza",
"System": "Sistema",
"TvShows": "Serie TV",
diff --git a/Emby.Server.Implementations/Localization/Core/ja.json b/Emby.Server.Implementations/Localization/Core/ja.json
index 4aa0637c59..1ec4a06689 100644
--- a/Emby.Server.Implementations/Localization/Core/ja.json
+++ b/Emby.Server.Implementations/Localization/Core/ja.json
@@ -75,7 +75,6 @@
"Songs": "曲",
"StartupEmbyServerIsLoading": "Jellyfin Server は現在読み込み中です。しばらくしてからもう一度お試しください。",
"SubtitleDownloadFailureFromForItem": "{0} から {1}の字幕のダウンロードに失敗しました",
- "SubtitlesDownloadedForItem": "{0} の字幕がダウンロードされました",
"Sync": "同期",
"System": "システム",
"TvShows": "テレビ番組",
diff --git a/Emby.Server.Implementations/Localization/Core/kk.json b/Emby.Server.Implementations/Localization/Core/kk.json
index cbee711551..5618ff4a8f 100644
--- a/Emby.Server.Implementations/Localization/Core/kk.json
+++ b/Emby.Server.Implementations/Localization/Core/kk.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server júktelýde. Áreketti kóp uzamaı qaıtalańyz.",
"SubtitleDownloadFailureForItem": "Субтитрлер {0} үшін жүктеліп алынуы сәтсіз",
"SubtitleDownloadFailureFromForItem": "{1} úshin sýbtıtrlerdi {0} kózinen júktep alý sátsiz",
- "SubtitlesDownloadedForItem": "{0} úshin sýbtıtrler júktelip alyndy",
"Sync": "Úndestirý",
"System": "Júıe",
"TvShows": "TD-kórsetimder",
diff --git a/Emby.Server.Implementations/Localization/Core/ko.json b/Emby.Server.Implementations/Localization/Core/ko.json
index 0320a0a1b7..c4b22901ef 100644
--- a/Emby.Server.Implementations/Localization/Core/ko.json
+++ b/Emby.Server.Implementations/Localization/Core/ko.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin 서버를 불러오고 있습니다. 잠시 후에 다시 시도하십시오.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "{0}에서 {1} 자막 다운로드에 실패했습니다",
- "SubtitlesDownloadedForItem": "{0} 자막 다운로드 완료",
"Sync": "동기화",
"System": "시스템",
"TvShows": "TV 쇼",
diff --git a/Emby.Server.Implementations/Localization/Core/lt-LT.json b/Emby.Server.Implementations/Localization/Core/lt-LT.json
index e8e1b7740e..01a740187d 100644
--- a/Emby.Server.Implementations/Localization/Core/lt-LT.json
+++ b/Emby.Server.Implementations/Localization/Core/lt-LT.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server kraunasi. Netrukus pabandykite dar kartą.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "{1} subtitrai buvo nesėkmingai parsiųsti iš {0}",
- "SubtitlesDownloadedForItem": "{0} subtitrai parsiųsti",
"Sync": "Sinchronizuoti",
"System": "System",
"TvShows": "TV Serialai",
diff --git a/Emby.Server.Implementations/Localization/Core/lv.json b/Emby.Server.Implementations/Localization/Core/lv.json
index 8b8d46b2e0..e4a06c0f09 100644
--- a/Emby.Server.Implementations/Localization/Core/lv.json
+++ b/Emby.Server.Implementations/Localization/Core/lv.json
@@ -31,7 +31,6 @@
"TvShows": "TV Raidījumi",
"Sync": "Sinhronizācija",
"System": "Sistēma",
- "SubtitlesDownloadedForItem": "Subtitri lejupielādēti priekš {0}",
"StartupEmbyServerIsLoading": "Jellyfin Serveris lādējas. Lūdzu mēģiniet vēlreiz pēc brīža.",
"Songs": "Dziesmas",
"Shows": "Raidījumi",
diff --git a/Emby.Server.Implementations/Localization/Core/mk.json b/Emby.Server.Implementations/Localization/Core/mk.json
index 684a97aade..8df137302f 100644
--- a/Emby.Server.Implementations/Localization/Core/mk.json
+++ b/Emby.Server.Implementations/Localization/Core/mk.json
@@ -86,7 +86,6 @@
"TvShows": "ТВ Серии",
"System": "Систем",
"Sync": "Синхронизација",
- "SubtitlesDownloadedForItem": "Спуштање превод за {0}",
"SubtitleDownloadFailureFromForItem": "Преводот неуспешно се спушти од {0} за {1}",
"StartupEmbyServerIsLoading": "Jellyfin Server се пушта. Ве молиме причекајте.",
"Songs": "Песни",
diff --git a/Emby.Server.Implementations/Localization/Core/ms.json b/Emby.Server.Implementations/Localization/Core/ms.json
index 1d86257f84..79d078d4a8 100644
--- a/Emby.Server.Implementations/Localization/Core/ms.json
+++ b/Emby.Server.Implementations/Localization/Core/ms.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server is loading. Please try again shortly.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Subtitles failed to download from {0} for {1}",
- "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}",
"Sync": "Sync",
"System": "Sistem",
"TvShows": "TV Shows",
diff --git a/Emby.Server.Implementations/Localization/Core/nb.json b/Emby.Server.Implementations/Localization/Core/nb.json
index f9fa1b68cd..1757359976 100644
--- a/Emby.Server.Implementations/Localization/Core/nb.json
+++ b/Emby.Server.Implementations/Localization/Core/nb.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server laster. Prøv igjen snart.",
"SubtitleDownloadFailureForItem": "En feil oppstå under nedlasting av undertekster for {0}",
"SubtitleDownloadFailureFromForItem": "Kunne ikke laste ned undertekster fra {0} for {1}",
- "SubtitlesDownloadedForItem": "Undertekster lastet ned for {0}",
"Sync": "Synkroniser",
"System": "System",
"TvShows": "TV-serier",
diff --git a/Emby.Server.Implementations/Localization/Core/nl.json b/Emby.Server.Implementations/Localization/Core/nl.json
index e22f95ab46..bc36cbdd37 100644
--- a/Emby.Server.Implementations/Localization/Core/nl.json
+++ b/Emby.Server.Implementations/Localization/Core/nl.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server is aan het laden, probeer het later opnieuw.",
"SubtitleDownloadFailureForItem": "Downloaden van ondertiteling voor {0} is mislukt",
"SubtitleDownloadFailureFromForItem": "Ondertitels konden niet gedownload worden van {0} voor {1}",
- "SubtitlesDownloadedForItem": "Ondertiteling voor {0} is gedownload",
"Sync": "Synchronisatie",
"System": "Systeem",
"TvShows": "TV-series",
diff --git a/Emby.Server.Implementations/Localization/Core/pl.json b/Emby.Server.Implementations/Localization/Core/pl.json
index e72f1a2621..e9d9bbf2e1 100644
--- a/Emby.Server.Implementations/Localization/Core/pl.json
+++ b/Emby.Server.Implementations/Localization/Core/pl.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Trwa wczytywanie serwera Jellyfin. Spróbuj ponownie za chwilę.",
"SubtitleDownloadFailureForItem": "Pobieranie napisów dla {0} zakończone niepowodzeniem",
"SubtitleDownloadFailureFromForItem": "Nieudane pobieranie napisów z {0} dla {1}",
- "SubtitlesDownloadedForItem": "Pobrano napisy dla {0}",
"Sync": "Synchronizacja",
"System": "System",
"TvShows": "Seriale",
diff --git a/Emby.Server.Implementations/Localization/Core/pt-BR.json b/Emby.Server.Implementations/Localization/Core/pt-BR.json
index 41a389e3b1..10ca4f9326 100644
--- a/Emby.Server.Implementations/Localization/Core/pt-BR.json
+++ b/Emby.Server.Implementations/Localization/Core/pt-BR.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "O Servidor Jellyfin está carregando. Por favor, tente novamente mais tarde.",
"SubtitleDownloadFailureForItem": "Download de legendas falhou para {0}",
"SubtitleDownloadFailureFromForItem": "Houve um problema ao baixar as legendas de {0} para {1}",
- "SubtitlesDownloadedForItem": "Legendas baixadas para {0}",
"Sync": "Sincronizar",
"System": "Sistema",
"TvShows": "Séries",
diff --git a/Emby.Server.Implementations/Localization/Core/pt-PT.json b/Emby.Server.Implementations/Localization/Core/pt-PT.json
index b12d391c17..ebf35c4920 100644
--- a/Emby.Server.Implementations/Localization/Core/pt-PT.json
+++ b/Emby.Server.Implementations/Localization/Core/pt-PT.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "O servidor Jellyfin está a iniciar. Tente novamente mais tarde.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Falha na transferência de legendas a partir de {0} para {1}",
- "SubtitlesDownloadedForItem": "Transferidas legendas para {0}",
"Sync": "Sincronização",
"System": "Sistema",
"TvShows": "Programas TV",
diff --git a/Emby.Server.Implementations/Localization/Core/pt.json b/Emby.Server.Implementations/Localization/Core/pt.json
index 9ee3c37a8a..3d5f7cab24 100644
--- a/Emby.Server.Implementations/Localization/Core/pt.json
+++ b/Emby.Server.Implementations/Localization/Core/pt.json
@@ -31,7 +31,6 @@
"User": "Utilizador",
"TvShows": "Séries",
"System": "Sistema",
- "SubtitlesDownloadedForItem": "Legendas transferidas para {0}",
"SubtitleDownloadFailureFromForItem": "Falha na transferência de legendas de {0} para {1}",
"StartupEmbyServerIsLoading": "O servidor Jellyfin está a iniciar. Tente novamente dentro de momentos.",
"ServerNameNeedsToBeRestarted": "{0} necessita ser reiniciado",
diff --git a/Emby.Server.Implementations/Localization/Core/ro.json b/Emby.Server.Implementations/Localization/Core/ro.json
index 71bffffc6b..db863ebc5d 100644
--- a/Emby.Server.Implementations/Localization/Core/ro.json
+++ b/Emby.Server.Implementations/Localization/Core/ro.json
@@ -17,7 +17,6 @@
"TvShows": "Spectacole TV",
"System": "Sistem",
"Sync": "Sincronizare",
- "SubtitlesDownloadedForItem": "Subtitrari descarcate pentru {0}",
"SubtitleDownloadFailureFromForItem": "Subtitrările nu au putut fi descărcate de la {0} pentru {1}",
"StartupEmbyServerIsLoading": "Se încarcă serverul Jellyfin. Încercați din nou în scurt timp.",
"Songs": "Melodii",
diff --git a/Emby.Server.Implementations/Localization/Core/ru.json b/Emby.Server.Implementations/Localization/Core/ru.json
index 7cf957a945..c46aa5c30d 100644
--- a/Emby.Server.Implementations/Localization/Core/ru.json
+++ b/Emby.Server.Implementations/Localization/Core/ru.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server загружается. Повторите попытку в ближайшее время.",
"SubtitleDownloadFailureForItem": "Субтитры к {0} не удалось загрузить",
"SubtitleDownloadFailureFromForItem": "Субтитры к {1} не удалось загрузить с {0}",
- "SubtitlesDownloadedForItem": "Субтитры к {0} загружены",
"Sync": "Синхро",
"System": "Система",
"TvShows": "ТВ",
diff --git a/Emby.Server.Implementations/Localization/Core/sk.json b/Emby.Server.Implementations/Localization/Core/sk.json
index 1988bda526..11ead33d48 100644
--- a/Emby.Server.Implementations/Localization/Core/sk.json
+++ b/Emby.Server.Implementations/Localization/Core/sk.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server sa spúšťa. Prosím, skúste to o chvíľu znova.",
"SubtitleDownloadFailureForItem": "Sťahovanie titulkov pre {0} zlyhalo",
"SubtitleDownloadFailureFromForItem": "Sťahovanie titulkov z {0} pre {1} zlyhalo",
- "SubtitlesDownloadedForItem": "Titulky pre {0} stiahnuté",
"Sync": "Synchronizácia",
"System": "Systém",
"TvShows": "TV seriály",
diff --git a/Emby.Server.Implementations/Localization/Core/sl-SI.json b/Emby.Server.Implementations/Localization/Core/sl-SI.json
index 0fc8379def..b60dd33bd5 100644
--- a/Emby.Server.Implementations/Localization/Core/sl-SI.json
+++ b/Emby.Server.Implementations/Localization/Core/sl-SI.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server se nalaga. Poskusi ponovno kasneje.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "Neuspešen prenos podnapisov iz {0} za {1}",
- "SubtitlesDownloadedForItem": "Podnapisi preneseni za {0}",
"Sync": "Sinhroniziraj",
"System": "System",
"TvShows": "TV serije",
diff --git a/Emby.Server.Implementations/Localization/Core/sr.json b/Emby.Server.Implementations/Localization/Core/sr.json
index da0088991b..9d3445ba6e 100644
--- a/Emby.Server.Implementations/Localization/Core/sr.json
+++ b/Emby.Server.Implementations/Localization/Core/sr.json
@@ -17,7 +17,6 @@
"TvShows": "ТВ серије",
"System": "Систем",
"Sync": "Усклади",
- "SubtitlesDownloadedForItem": "Титлови преузети за {0}",
"SubtitleDownloadFailureFromForItem": "Неуспело преузимање титлова за {1} са {0}",
"StartupEmbyServerIsLoading": "Џелифин сервер се подиже. Покушајте поново убрзо.",
"Songs": "Песме",
diff --git a/Emby.Server.Implementations/Localization/Core/sv.json b/Emby.Server.Implementations/Localization/Core/sv.json
index b2934545d3..96891f9945 100644
--- a/Emby.Server.Implementations/Localization/Core/sv.json
+++ b/Emby.Server.Implementations/Localization/Core/sv.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Server arbetar. Pröva igen snart.",
"SubtitleDownloadFailureForItem": "Nerladdning av undertexter för {0} misslyckades",
"SubtitleDownloadFailureFromForItem": "Undertexter kunde inte laddas ner från {0} för {1}",
- "SubtitlesDownloadedForItem": "Undertexter har laddats ner till {0}",
"Sync": "Synk",
"System": "System",
"TvShows": "TV-serier",
diff --git a/Emby.Server.Implementations/Localization/Core/tr.json b/Emby.Server.Implementations/Localization/Core/tr.json
index d3552225b4..1d13b03541 100644
--- a/Emby.Server.Implementations/Localization/Core/tr.json
+++ b/Emby.Server.Implementations/Localization/Core/tr.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin Sunucusu yükleniyor. Lütfen kısa süre sonra tekrar deneyin.",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "{1} için alt yazılar {0} 'dan indirilemedi",
- "SubtitlesDownloadedForItem": "{0} için altyazılar indirildi",
"Sync": "Eşitle",
"System": "Sistem",
"TvShows": "Diziler",
diff --git a/Emby.Server.Implementations/Localization/Core/zh-CN.json b/Emby.Server.Implementations/Localization/Core/zh-CN.json
index 85ebce0f5d..69a06a35dc 100644
--- a/Emby.Server.Implementations/Localization/Core/zh-CN.json
+++ b/Emby.Server.Implementations/Localization/Core/zh-CN.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin 服务器加载中。请稍后再试。",
"SubtitleDownloadFailureForItem": "为 {0} 下载字幕失败",
"SubtitleDownloadFailureFromForItem": "无法从 {0} 下载 {1} 的字幕",
- "SubtitlesDownloadedForItem": "已为 {0} 下载了字幕",
"Sync": "同步",
"System": "系统",
"TvShows": "电视剧",
diff --git a/Emby.Server.Implementations/Localization/Core/zh-HK.json b/Emby.Server.Implementations/Localization/Core/zh-HK.json
index f3d9e5fce8..224748e611 100644
--- a/Emby.Server.Implementations/Localization/Core/zh-HK.json
+++ b/Emby.Server.Implementations/Localization/Core/zh-HK.json
@@ -76,7 +76,6 @@
"StartupEmbyServerIsLoading": "Jellyfin 伺服器載入中,請稍後再試。",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"SubtitleDownloadFailureFromForItem": "無法從 {0} 下載 {1} 的字幕",
- "SubtitlesDownloadedForItem": "已為 {0} 下載了字幕",
"Sync": "同步",
"System": "System",
"TvShows": "電視節目",
diff --git a/Emby.Server.Implementations/Localization/Core/zh-TW.json b/Emby.Server.Implementations/Localization/Core/zh-TW.json
index acd211f22a..21034b76f3 100644
--- a/Emby.Server.Implementations/Localization/Core/zh-TW.json
+++ b/Emby.Server.Implementations/Localization/Core/zh-TW.json
@@ -72,7 +72,6 @@
"Shows": "節目",
"Songs": "歌曲",
"StartupEmbyServerIsLoading": "Jellyfin Server正在啟動,請稍後再試一次。",
- "SubtitlesDownloadedForItem": "已為 {0} 下載字幕",
"Sync": "同步",
"System": "系統",
"TvShows": "電視節目",
From 105fc3dc29d389e108d2a8a9e0842694e3e1bd63 Mon Sep 17 00:00:00 2001
From: ferferga
Date: Thu, 26 Mar 2020 21:40:41 +0100
Subject: [PATCH 64/95] Apply suggestions
---
Emby.Server.Implementations/Localization/Core/en-US.json | 6 +++---
Emby.Server.Implementations/Localization/Core/es.json | 6 +++---
.../ScheduledTasks/Tasks/ChapterImagesTask.cs | 2 +-
.../ScheduledTasks/Tasks/DeleteCacheFileTask.cs | 2 +-
.../ScheduledTasks/Tasks/DeleteLogFileTask.cs | 2 +-
.../ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs | 2 +-
.../ScheduledTasks/Tasks/PeopleValidationTask.cs | 2 +-
.../ScheduledTasks/Tasks/PluginUpdateTask.cs | 2 +-
.../ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs | 2 +-
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json
index d25c5f2c3f..f10bc1caf6 100644
--- a/Emby.Server.Implementations/Localization/Core/en-US.json
+++ b/Emby.Server.Implementations/Localization/Core/en-US.json
@@ -92,9 +92,9 @@
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library",
"ValueSpecialEpisodeName": "Special - {0}",
"VersionNumber": "Version {0}",
- "TasksMaintenance": "Maintenance",
- "TasksLibrary": "Library",
- "TasksApplication": "Application",
+ "TasksCategoryMaintenance": "Maintenance",
+ "TasksCategoryLibrary": "Library",
+ "TasksCategoryApplication": "Application",
"TaskCleanCache": "Clean Cache Directory",
"TaskCleanCacheDescription": "Deletes cache files no longer needed by the system.",
"TaskRefreshChapterImages": "Extract Chapter Images",
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index 6460caebf7..e92ce460e5 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -93,9 +93,9 @@
"ValueHasBeenAddedToLibrary": "{0} ha sido añadido a tu biblioteca multimedia",
"ValueSpecialEpisodeName": "Especial - {0}",
"VersionNumber": "Versión {0}",
- "TasksMaintenance": "Mantenimiento",
- "TasksLibrary": "Librería",
- "TasksApplication": "Aplicación",
+ "TasksCategoryMaintenance": "Mantenimiento",
+ "TasksCategoryLibrary": "Librería",
+ "TasksCategoryApplication": "Aplicación",
"TaskCleanCache": "Eliminar archivos temporales",
"TaskCleanCacheDescription": "Elimina los archivos temporales que ya no son necesarios para el servidor",
"TaskRefreshChapterImages": "Extraer imágenes de los capítulos",
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
index e0dae3ded1..81149ba2e6 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
@@ -165,7 +165,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskRefreshChapterImagesDescription");
- public string Category => _localization.GetLocalizedString("TasksLibrary");
+ public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
public string Key => "RefreshChapterImages";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
index 7925f18388..e7e174fb1a 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
@@ -167,7 +167,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public string Description => _localization.GetLocalizedString("TaskCleanCacheDescription");
- public string Category => _localization.GetLocalizedString("TasksMaintenance");
+ public string Category => _localization.GetLocalizedString("TasksCategoryMaintenance");
public string Key => "DeleteCacheFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
index e9306ea68a..1c3cefbce4 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
@@ -85,7 +85,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public string Description => string.Format(_localization.GetLocalizedString("TaskCleanLogsDescription"), ConfigurationManager.CommonConfiguration.LogFileRetentionDays);
- public string Category => _localization.GetLocalizedString("TasksMaintenance");
+ public string Category => _localization.GetLocalizedString("TasksCategoryMaintenance");
public string Key => "CleanLogFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
index 84e5708445..e4b3de8224 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
@@ -134,7 +134,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public string Description => _localization.GetLocalizedString("TaskCleanTranscodeDescription");
- public string Category => _localization.GetLocalizedString("TasksMaintenance");
+ public string Category => _localization.GetLocalizedString("TasksCategoryMaintenance");
public string Key => "DeleteTranscodeFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
index 6e90cde1a9..90a8f7c1b8 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
@@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskRefreshPeopleDescription");
- public string Category => _localization.GetLocalizedString("TasksLibrary");
+ public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
public string Key => "RefreshPeople";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index b5bacc48ec..0a26cbf6d9 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -101,7 +101,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskUpdatePluginsDescription");
- public string Category => _localization.GetLocalizedString("TasksApplication");
+ public string Category => _localization.GetLocalizedString("TasksCategoryApplication");
public string Key => "PluginUpdates";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
index 257dc0af4e..08b51a72fc 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
@@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskRefreshLibraryDescription");
- public string Category => _localization.GetLocalizedString("TasksLibrary");
+ public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
public string Key => "RefreshLibrary";
From 28f07df65730afc0910b3066ba36dcd5138308bd Mon Sep 17 00:00:00 2001
From: ferferga
Date: Thu, 26 Mar 2020 22:26:25 +0100
Subject: [PATCH 65/95] Fix NullReferenceException at startup
---
.../ScheduledTasks/Tasks/ChapterImagesTask.cs | 10 +++++++++-
.../ScheduledTasks/Tasks/DeleteCacheFileTask.cs | 4 +++-
.../ScheduledTasks/Tasks/DeleteLogFileTask.cs | 3 ++-
.../ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs | 4 +++-
.../ScheduledTasks/Tasks/PeopleValidationTask.cs | 3 ++-
.../ScheduledTasks/Tasks/PluginUpdateTask.cs | 3 ++-
.../ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs | 3 ++-
7 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
index 81149ba2e6..36677dbeca 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
@@ -45,7 +45,14 @@ namespace Emby.Server.Implementations.ScheduledTasks
///
/// Initializes a new instance of the class.
///
- public ChapterImagesTask(ILoggerFactory loggerFactory, ILibraryManager libraryManager, IItemRepository itemRepo, IApplicationPaths appPaths, IEncodingManager encodingManager, IFileSystem fileSystem)
+ public ChapterImagesTask(
+ ILoggerFactory loggerFactory,
+ ILibraryManager libraryManager,
+ IItemRepository itemRepo,
+ IApplicationPaths appPaths,
+ IEncodingManager encodingManager,
+ IFileSystem fileSystem,
+ ILocalizationManager localization)
{
_logger = loggerFactory.CreateLogger(GetType().Name);
_libraryManager = libraryManager;
@@ -53,6 +60,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
_appPaths = appPaths;
_encodingManager = encodingManager;
_fileSystem = fileSystem;
+ _localization = localization;
}
///
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
index e7e174fb1a..d24c8224e3 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
@@ -34,11 +34,13 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public DeleteCacheFileTask(
IApplicationPaths appPaths,
ILogger logger,
- IFileSystem fileSystem)
+ IFileSystem fileSystem,
+ ILocalizationManager localization)
{
ApplicationPaths = appPaths;
_logger = logger;
_fileSystem = fileSystem;
+ _localization = localization;
}
///
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
index 1c3cefbce4..30065cee78 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
@@ -28,10 +28,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
/// Initializes a new instance of the class.
///
/// The configuration manager.
- public DeleteLogFileTask(IConfigurationManager configurationManager, IFileSystem fileSystem)
+ public DeleteLogFileTask(IConfigurationManager configurationManager, IFileSystem fileSystem, ILocalizationManager localization)
{
ConfigurationManager = configurationManager;
_fileSystem = fileSystem;
+ _localization = localization;
}
///
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
index e4b3de8224..572158a139 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
@@ -28,11 +28,13 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public DeleteTranscodeFileTask(
ILogger logger,
IFileSystem fileSystem,
- IConfigurationManager configurationManager)
+ IConfigurationManager configurationManager,
+ ILocalizationManager localization)
{
_logger = logger;
_fileSystem = fileSystem;
_configurationManager = configurationManager;
+ _localization = localization;
}
///
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
index 90a8f7c1b8..49c21f523d 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
@@ -27,10 +27,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
///
/// The library manager.
/// The server application host
- public PeopleValidationTask(ILibraryManager libraryManager, IServerApplicationHost appHost)
+ public PeopleValidationTask(ILibraryManager libraryManager, IServerApplicationHost appHost, ILocalizationManager localization)
{
_libraryManager = libraryManager;
_appHost = appHost;
+ _localization = localization;
}
///
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index 0a26cbf6d9..a82588a0e1 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -25,10 +25,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
private readonly IInstallationManager _installationManager;
private readonly ILocalizationManager _localization;
- public PluginUpdateTask(ILogger logger, IInstallationManager installationManager)
+ public PluginUpdateTask(ILogger logger, IInstallationManager installationManager, ILocalizationManager localization)
{
_logger = logger;
_installationManager = installationManager;
+ _localization = localization;
}
///
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
index 08b51a72fc..da534e9a74 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
@@ -26,10 +26,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
/// Initializes a new instance of the class.
///
/// The library manager.
- public RefreshMediaLibraryTask(ILibraryManager libraryManager, IServerConfigurationManager config)
+ public RefreshMediaLibraryTask(ILibraryManager libraryManager, IServerConfigurationManager config, ILocalizationManager localization)
{
_libraryManager = libraryManager;
_config = config;
+ _localization = localization;
}
///
From 07f4893ba65481907dfc88e556a5f5077c8a2087 Mon Sep 17 00:00:00 2001
From: ferferga
Date: Thu, 26 Mar 2020 22:36:11 +0100
Subject: [PATCH 66/95] Translated RefreshChannelScheduledTask as well
---
.../Channels/RefreshChannelsScheduledTask.cs | 12 ++++++++----
.../Localization/Core/en-US.json | 5 ++++-
.../Localization/Core/es.json | 5 ++++-
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
index 891b81a36c..21f3fccc79 100644
--- a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
+++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
@@ -9,6 +9,7 @@ using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
+using MediaBrowser.Model.Globalization;
namespace Emby.Server.Implementations.Channels
{
@@ -18,27 +19,30 @@ namespace Emby.Server.Implementations.Channels
private readonly IUserManager _userManager;
private readonly ILogger _logger;
private readonly ILibraryManager _libraryManager;
+ private readonly ILocalizationManager _localization;
public RefreshChannelsScheduledTask(
IChannelManager channelManager,
IUserManager userManager,
ILogger logger,
- ILibraryManager libraryManager)
+ ILibraryManager libraryManager,
+ ILocalizationManager localization)
{
_channelManager = channelManager;
_userManager = userManager;
_logger = logger;
_libraryManager = libraryManager;
+ _localization = localization;
}
///
- public string Name => "Refresh Channels";
+ public string Name => _localization.GetLocalizedString("TasksRefreshChannels");
///
- public string Description => "Refreshes internet channel information.";
+ public string Description => _localization.GetLocalizedString("TasksRefreshChannelsDescription");
///
- public string Category => "Internet Channels";
+ public string Category => _localization.GetLocalizedString("TasksCategoryChannels");
///
public bool IsHidden => ((ChannelManager)_channelManager).Channels.Length == 0;
diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json
index f10bc1caf6..48358332d0 100644
--- a/Emby.Server.Implementations/Localization/Core/en-US.json
+++ b/Emby.Server.Implementations/Localization/Core/en-US.json
@@ -95,6 +95,7 @@
"TasksCategoryMaintenance": "Maintenance",
"TasksCategoryLibrary": "Library",
"TasksCategoryApplication": "Application",
+ "TasksCategoryChannels": "Canales de internet",
"TaskCleanCache": "Clean Cache Directory",
"TaskCleanCacheDescription": "Deletes cache files no longer needed by the system.",
"TaskRefreshChapterImages": "Extract Chapter Images",
@@ -108,5 +109,7 @@
"TaskUpdatePlugins": "Update Plugins",
"TaskUpdatePluginsDescription": "Downloads and installs updates for plugins that are configured to update automatically.",
"TaskCleanTranscode": "Clean Transcode Directory",
- "TaskCleanTranscodeDescription": "Deletes transcode files more than one day old."
+ "TaskCleanTranscodeDescription": "Deletes transcode files more than one day old.",
+ "TaskRefreshChannels": "Refresh Channels",
+ "TaskRefreshChannelsDescription": "Refreshes internet channel information."
}
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index e92ce460e5..8084b6ea66 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -96,6 +96,7 @@
"TasksCategoryMaintenance": "Mantenimiento",
"TasksCategoryLibrary": "Librería",
"TasksCategoryApplication": "Aplicación",
+ "TasksCategoryChannels": "Canales de internet",
"TaskCleanCache": "Eliminar archivos temporales",
"TaskCleanCacheDescription": "Elimina los archivos temporales que ya no son necesarios para el servidor",
"TaskRefreshChapterImages": "Extraer imágenes de los capítulos",
@@ -109,5 +110,7 @@
"TaskUpdatePlugins": "Actualizar extensiones",
"TaskUpdatePluginsDescription": "Actualiza las extensiones que están configuradas para actualizarse automáticamente",
"TaskCleanTranscode": "Limpiar las transcodificaciones",
- "TaskCleanTranscodeDescription": "Elimina los archivos temporales creados mientras se transcodificaba el contenido"
+ "TaskCleanTranscodeDescription": "Elimina los archivos temporales creados mientras se transcodificaba el contenido",
+ "TaskRefreshChannels": "Actualizar canales",
+ "TaskRefreshChannelsDescription": "Actualiza la información de los canales de internet"
}
From a2a53ec8791b08be3e85f55c6c056db2792d93ba Mon Sep 17 00:00:00 2001
From: ferferga
Date: Thu, 26 Mar 2020 22:49:54 +0100
Subject: [PATCH 67/95] Same with SubtitleScheduledTasks
---
.../Localization/Core/en-US.json | 4 +++-
.../Localization/Core/es.json | 4 +++-
.../MediaInfo/SubtitleScheduledTask.cs | 12 ++++++++----
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json
index 48358332d0..25d45d5865 100644
--- a/Emby.Server.Implementations/Localization/Core/en-US.json
+++ b/Emby.Server.Implementations/Localization/Core/en-US.json
@@ -111,5 +111,7 @@
"TaskCleanTranscode": "Clean Transcode Directory",
"TaskCleanTranscodeDescription": "Deletes transcode files more than one day old.",
"TaskRefreshChannels": "Refresh Channels",
- "TaskRefreshChannelsDescription": "Refreshes internet channel information."
+ "TaskRefreshChannelsDescription": "Refreshes internet channel information.",
+ "TaskDownloadMissingSubtitles": "Download missing subtitles",
+ "TaskDownloadMissingSubtitlesDescription": "Searches the internet for missing subtitles based on metadata configuration."
}
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index 8084b6ea66..41a845a310 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -112,5 +112,7 @@
"TaskCleanTranscode": "Limpiar las transcodificaciones",
"TaskCleanTranscodeDescription": "Elimina los archivos temporales creados mientras se transcodificaba el contenido",
"TaskRefreshChannels": "Actualizar canales",
- "TaskRefreshChannelsDescription": "Actualiza la información de los canales de internet"
+ "TaskRefreshChannelsDescription": "Actualiza la información de los canales de internet",
+ "TaskDownloadMissingSubtitles": "Descargar los subtítulos que faltan",
+ "TaskDownloadMissingSubtitlesDescription": "Busca en internet los subtítulos que falten en el contenido de tus bibliotecas, basándose en la configuración de idioma"
}
diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
index 3a936632a0..f4f1ba47c1 100644
--- a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
+++ b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
@@ -14,6 +14,7 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
+using MediaBrowser.Model.Globalization;
namespace MediaBrowser.Providers.MediaInfo
{
@@ -25,6 +26,7 @@ namespace MediaBrowser.Providers.MediaInfo
private readonly IMediaSourceManager _mediaSourceManager;
private readonly ILogger _logger;
private readonly IJsonSerializer _json;
+ private readonly ILocalizationManager _localization;
public SubtitleScheduledTask(
ILibraryManager libraryManager,
@@ -32,7 +34,8 @@ namespace MediaBrowser.Providers.MediaInfo
IServerConfigurationManager config,
ISubtitleManager subtitleManager,
ILogger logger,
- IMediaSourceManager mediaSourceManager)
+ IMediaSourceManager mediaSourceManager,
+ ILocalizationManager localization)
{
_libraryManager = libraryManager;
_config = config;
@@ -40,6 +43,7 @@ namespace MediaBrowser.Providers.MediaInfo
_logger = logger;
_mediaSourceManager = mediaSourceManager;
_json = json;
+ _localization = localization;
}
private SubtitleOptions GetOptions()
@@ -204,11 +208,11 @@ namespace MediaBrowser.Providers.MediaInfo
};
}
- public string Name => "Download missing subtitles";
+ public string Name => _localization.GetLocalizedString("TaskDownloadMissingSubtitles");
- public string Description => "Searches the internet for missing subtitles based on metadata configuration.";
+ public string Description => _localization.GetLocalizedString("TaskDownloadMissingSubtitlesDescription");
- public string Category => "Library";
+ public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
public string Key => "DownloadSubtitles";
From 797b2fbf1d83735bdfe0946fd297f8968ac78944 Mon Sep 17 00:00:00 2001
From: ferferga
Date: Fri, 27 Mar 2020 11:25:32 +0100
Subject: [PATCH 68/95] Restore comments
---
.../ScheduledTasks/Tasks/PluginUpdateTask.cs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index a82588a0e1..d93077285f 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -97,19 +97,19 @@ namespace Emby.Server.Implementations.ScheduledTasks
progress.Report(100);
}
-
+ ///
public string Name => _localization.GetLocalizedString("TaskUpdatePlugins");
-
+ ///
public string Description => _localization.GetLocalizedString("TaskUpdatePluginsDescription");
-
+ ///
public string Category => _localization.GetLocalizedString("TasksCategoryApplication");
-
+ ///
public string Key => "PluginUpdates";
-
+ ///
public bool IsHidden => false;
-
+ ///
public bool IsEnabled => true;
-
+ ///
public bool IsLogged => true;
}
}
From aa98160d706301688038afe2652dd8f567bced70 Mon Sep 17 00:00:00 2001
From: ferferga
Date: Fri, 27 Mar 2020 16:49:01 +0100
Subject: [PATCH 69/95] Add whitespaces
---
.../ScheduledTasks/Tasks/PluginUpdateTask.cs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index d93077285f..2785a089aa 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -97,18 +97,25 @@ namespace Emby.Server.Implementations.ScheduledTasks
progress.Report(100);
}
+
///
public string Name => _localization.GetLocalizedString("TaskUpdatePlugins");
+
///
public string Description => _localization.GetLocalizedString("TaskUpdatePluginsDescription");
+
///
public string Category => _localization.GetLocalizedString("TasksCategoryApplication");
+
///
public string Key => "PluginUpdates";
+
///
public bool IsHidden => false;
+
///
public bool IsEnabled => true;
+
///
public bool IsLogged => true;
}
From 620135d8da3fea0be4a351babf74dfd73121ac4b Mon Sep 17 00:00:00 2001
From: ferferga
Date: Fri, 27 Mar 2020 17:06:06 +0100
Subject: [PATCH 70/95] Removed spanish string from english file
---
Emby.Server.Implementations/Localization/Core/en-US.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json
index 25d45d5865..f7157716c2 100644
--- a/Emby.Server.Implementations/Localization/Core/en-US.json
+++ b/Emby.Server.Implementations/Localization/Core/en-US.json
@@ -95,7 +95,7 @@
"TasksCategoryMaintenance": "Maintenance",
"TasksCategoryLibrary": "Library",
"TasksCategoryApplication": "Application",
- "TasksCategoryChannels": "Canales de internet",
+ "TasksCategoryChannels": "Internet Channels",
"TaskCleanCache": "Clean Cache Directory",
"TaskCleanCacheDescription": "Deletes cache files no longer needed by the system.",
"TaskRefreshChapterImages": "Extract Chapter Images",
From c3562664196cde2a8318209db4117631be658857 Mon Sep 17 00:00:00 2001
From: "Joshua M. Boniface"
Date: Sun, 29 Mar 2020 16:57:13 -0400
Subject: [PATCH 71/95] Revert #2146 ordering change
---
.../Session/SessionManager.cs | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index dfcd3843c7..de768333d8 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -1401,6 +1401,16 @@ namespace Emby.Server.Implementations.Session
user = _userManager.GetUserByName(request.Username);
}
+ if (enforcePassword)
+ {
+ user = await _userManager.AuthenticateUser(
+ request.Username,
+ request.Password,
+ request.PasswordSha1,
+ request.RemoteEndPoint,
+ true).ConfigureAwait(false);
+ }
+
if (user == null)
{
AuthenticationFailed?.Invoke(this, new GenericEventArgs(request));
@@ -1413,16 +1423,6 @@ namespace Emby.Server.Implementations.Session
throw new SecurityException("User is not allowed access from this device.");
}
- if (enforcePassword)
- {
- user = await _userManager.AuthenticateUser(
- request.Username,
- request.Password,
- request.PasswordSha1,
- request.RemoteEndPoint,
- true).ConfigureAwait(false);
- }
-
var token = GetAuthorizationToken(user, request.DeviceId, request.App, request.AppVersion, request.DeviceName);
var session = LogSessionActivity(
From a9759f6a8060cac6c21be3a952d7f17f6bc39c22 Mon Sep 17 00:00:00 2001
From: ferferga
Date: Sun, 29 Mar 2020 23:46:19 +0200
Subject: [PATCH 72/95] Rename translation keys
---
.../Channels/RefreshChannelsScheduledTask.cs | 2 +-
Emby.Server.Implementations/Localization/Core/en-US.json | 8 ++++----
Emby.Server.Implementations/Localization/Core/es.json | 8 ++++----
.../ScheduledTasks/Tasks/ChapterImagesTask.cs | 2 +-
.../ScheduledTasks/Tasks/DeleteCacheFileTask.cs | 2 +-
.../ScheduledTasks/Tasks/DeleteLogFileTask.cs | 2 +-
.../ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs | 2 +-
.../ScheduledTasks/Tasks/PeopleValidationTask.cs | 2 +-
.../ScheduledTasks/Tasks/PluginUpdateTask.cs | 2 +-
.../ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs | 2 +-
MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs | 2 +-
11 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
index 21f3fccc79..367efcb134 100644
--- a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
+++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
@@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.Channels
public string Description => _localization.GetLocalizedString("TasksRefreshChannelsDescription");
///
- public string Category => _localization.GetLocalizedString("TasksCategoryChannels");
+ public string Category => _localization.GetLocalizedString("TasksChannelsCategory");
///
public bool IsHidden => ((ChannelManager)_channelManager).Channels.Length == 0;
diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json
index f7157716c2..97a843160e 100644
--- a/Emby.Server.Implementations/Localization/Core/en-US.json
+++ b/Emby.Server.Implementations/Localization/Core/en-US.json
@@ -92,10 +92,10 @@
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library",
"ValueSpecialEpisodeName": "Special - {0}",
"VersionNumber": "Version {0}",
- "TasksCategoryMaintenance": "Maintenance",
- "TasksCategoryLibrary": "Library",
- "TasksCategoryApplication": "Application",
- "TasksCategoryChannels": "Internet Channels",
+ "TasksMaintenanceCategory": "Maintenance",
+ "TasksLibraryCategory": "Library",
+ "TasksApplicationCategory": "Application",
+ "TasksChannelsCategory": "Internet Channels",
"TaskCleanCache": "Clean Cache Directory",
"TaskCleanCacheDescription": "Deletes cache files no longer needed by the system.",
"TaskRefreshChapterImages": "Extract Chapter Images",
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index 41a845a310..63c2cd0108 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -93,10 +93,10 @@
"ValueHasBeenAddedToLibrary": "{0} ha sido añadido a tu biblioteca multimedia",
"ValueSpecialEpisodeName": "Especial - {0}",
"VersionNumber": "Versión {0}",
- "TasksCategoryMaintenance": "Mantenimiento",
- "TasksCategoryLibrary": "Librería",
- "TasksCategoryApplication": "Aplicación",
- "TasksCategoryChannels": "Canales de internet",
+ "TasksMaintenanceCategory": "Mantenimiento",
+ "TasksLibraryCategory": "Librería",
+ "TasksApplicationCategory": "Aplicación",
+ "TasksChannelsCategory": "Canales de internet",
"TaskCleanCache": "Eliminar archivos temporales",
"TaskCleanCacheDescription": "Elimina los archivos temporales que ya no son necesarios para el servidor",
"TaskRefreshChapterImages": "Extraer imágenes de los capítulos",
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
index 36677dbeca..ea6a70615b 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs
@@ -173,7 +173,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskRefreshChapterImagesDescription");
- public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
+ public string Category => _localization.GetLocalizedString("TasksLibraryCategory");
public string Key => "RefreshChapterImages";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
index d24c8224e3..9df7c538b1 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs
@@ -169,7 +169,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public string Description => _localization.GetLocalizedString("TaskCleanCacheDescription");
- public string Category => _localization.GetLocalizedString("TasksCategoryMaintenance");
+ public string Category => _localization.GetLocalizedString("TasksMaintenanceCategory");
public string Key => "DeleteCacheFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
index 30065cee78..3140aa4893 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs
@@ -86,7 +86,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public string Description => string.Format(_localization.GetLocalizedString("TaskCleanLogsDescription"), ConfigurationManager.CommonConfiguration.LogFileRetentionDays);
- public string Category => _localization.GetLocalizedString("TasksCategoryMaintenance");
+ public string Category => _localization.GetLocalizedString("TasksMaintenanceCategory");
public string Key => "CleanLogFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
index 572158a139..1d133dcda8 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
@@ -136,7 +136,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public string Description => _localization.GetLocalizedString("TaskCleanTranscodeDescription");
- public string Category => _localization.GetLocalizedString("TasksCategoryMaintenance");
+ public string Category => _localization.GetLocalizedString("TasksMaintenanceCategory");
public string Key => "DeleteTranscodeFiles";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
index 49c21f523d..63f867bf6c 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
@@ -64,7 +64,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskRefreshPeopleDescription");
- public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
+ public string Category => _localization.GetLocalizedString("TasksLibraryCategory");
public string Key => "RefreshPeople";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index 2785a089aa..588944d0e3 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -105,7 +105,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskUpdatePluginsDescription");
///
- public string Category => _localization.GetLocalizedString("TasksCategoryApplication");
+ public string Category => _localization.GetLocalizedString("TasksApplicationCategory");
///
public string Key => "PluginUpdates";
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
index da534e9a74..b10ded7175 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs
@@ -64,7 +64,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Description => _localization.GetLocalizedString("TaskRefreshLibraryDescription");
- public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
+ public string Category => _localization.GetLocalizedString("TasksLibraryCategory");
public string Key => "RefreshLibrary";
diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
index f4f1ba47c1..2615f2dbbb 100644
--- a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
+++ b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
@@ -212,7 +212,7 @@ namespace MediaBrowser.Providers.MediaInfo
public string Description => _localization.GetLocalizedString("TaskDownloadMissingSubtitlesDescription");
- public string Category => _localization.GetLocalizedString("TasksCategoryLibrary");
+ public string Category => _localization.GetLocalizedString("TasksLibraryCategory");
public string Key => "DownloadSubtitles";
From fac6831653c6db798fc5483df5fcb3668bd93a5b Mon Sep 17 00:00:00 2001
From: nyanmisaka
Date: Tue, 3 Mar 2020 23:56:50 +0800
Subject: [PATCH 73/95] fix various bugs in VAAPI hardware acceleration
---
.../Playback/Hls/DynamicHlsService.cs | 20 +-
.../MediaEncoding/EncodingHelper.cs | 231 ++++++++++++------
2 files changed, 172 insertions(+), 79 deletions(-)
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index 262f517869..734d907746 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -946,8 +946,6 @@ namespace MediaBrowser.Api.Playback.Hls
);
}
- var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
-
args += " " + EncodingHelper.GetVideoQualityParam(state, codec, encodingOptions, GetDefaultEncoderPreset());
// Unable to force key frames to h264_qsv transcode
@@ -962,24 +960,26 @@ namespace MediaBrowser.Api.Playback.Hls
//args += " -mixed-refs 0 -refs 3 -x264opts b_pyramid=0:weightb=0:weightp=0";
+ var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
+
// Add resolution params, if specified
if (!hasGraphicalSubs)
{
- args += EncodingHelper.GetOutputSizeParam(state, encodingOptions, codec, true);
+ args += EncodingHelper.GetOutputSizeParam(state, encodingOptions, codec);
}
- // This is for internal graphical subs
+ // This is for graphical subs
if (hasGraphicalSubs)
{
args += EncodingHelper.GetGraphicalSubtitleParam(state, encodingOptions, codec);
}
- //args += " -flags -global_header";
- }
+ if (!(state.SubtitleStream != null && state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream))
+ {
+ args += " -start_at_zero";
+ }
- if (args.IndexOf("-copyts", StringComparison.OrdinalIgnoreCase) == -1)
- {
- args += " -copyts";
+ //args += " -flags -global_header";
}
if (!string.IsNullOrEmpty(state.OutputVideoSync))
@@ -1024,7 +1024,7 @@ namespace MediaBrowser.Api.Playback.Hls
}
return string.Format(
- "{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -f hls -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -hls_time {6} -individual_header_trailer 0 -hls_segment_type {7} -start_number {8} -hls_segment_filename \"{9}\" -hls_playlist_type vod -hls_list_size 0 -y \"{10}\"",
+ "{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -copyts -avoid_negative_ts disabled -f hls -max_delay 5000000 -hls_time {6} -individual_header_trailer 0 -hls_segment_type {7} -start_number {8} -hls_segment_filename \"{9}\" -hls_playlist_type vod -hls_list_size 0 -y \"{10}\"",
inputModifier,
EncodingHelper.GetInputArgument(state, encodingOptions),
threads,
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 342c764146..8fb6170160 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -460,16 +460,7 @@ namespace MediaBrowser.Controller.MediaEncoding
if (state.IsVideoRequest
&& string.Equals(encodingOptions.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
{
- var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
- var hwOutputFormat = "vaapi";
-
- if (hasGraphicalSubs)
- {
- hwOutputFormat = "yuv420p";
- }
-
- arg.Append("-hwaccel vaapi -hwaccel_output_format ")
- .Append(hwOutputFormat)
+ arg.Append("-hwaccel vaapi -hwaccel_output_format vaapi")
.Append(" -vaapi_device ")
.Append(encodingOptions.VaapiDevice)
.Append(' ');
@@ -503,7 +494,8 @@ namespace MediaBrowser.Controller.MediaEncoding
&& state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode
&& state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
{
- if (state.VideoStream != null && state.VideoStream.Width.HasValue)
+ if (state.VideoStream != null && state.VideoStream.Width.HasValue
+ && !string.Equals(encodingOptions.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
{
// This is hacky but not sure how to get the exact subtitle resolution
int height = Convert.ToInt32(state.VideoStream.Width.Value / 16.0 * 9.0);
@@ -1546,9 +1538,13 @@ namespace MediaBrowser.Controller.MediaEncoding
}
///
- /// Gets the internal graphical subtitle param.
+ /// Gets the graphical subtitle param.
///
- public string GetGraphicalSubtitleParam(EncodingJobInfo state, EncodingOptions options, string outputVideoCodec)
+ public string GetGraphicalSubtitleParam(
+ EncodingJobInfo state,
+ EncodingOptions options,
+ string outputVideoCodec,
+ bool allowTimeStampCopy = true)
{
var outputSizeParam = string.Empty;
@@ -1562,34 +1558,26 @@ namespace MediaBrowser.Controller.MediaEncoding
{
outputSizeParam = GetOutputSizeParam(state, options, outputVideoCodec).TrimEnd('"');
- if (string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
+ var index = outputSizeParam.IndexOf("deinterlace", StringComparison.OrdinalIgnoreCase);
+ if (index != -1)
{
- var index = outputSizeParam.IndexOf("format", StringComparison.OrdinalIgnoreCase);
- if (index != -1)
- {
- outputSizeParam = "," + outputSizeParam.Substring(index);
- }
+ outputSizeParam = "," + outputSizeParam.Substring(index);
}
else
{
- var index = outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase);
+ index = outputSizeParam.IndexOf("yadif", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = "," + outputSizeParam.Substring(index);
}
- }
- }
-
- if (string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase)
- && outputSizeParam.Length == 0)
- {
- outputSizeParam = ",format=nv12|vaapi,hwupload";
-
- // Add parameters to use VAAPI with burn-in subttiles (GH issue #642)
- if (state.SubtitleStream != null
- && state.SubtitleStream.IsTextSubtitleStream
- && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) {
- outputSizeParam += ",hwmap=mode=read+write+direct";
+ else
+ {
+ index = outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase);
+ if (index != -1)
+ {
+ outputSizeParam = "," + outputSizeParam.Substring(index);
+ }
+ }
}
}
@@ -1604,11 +1592,29 @@ namespace MediaBrowser.Controller.MediaEncoding
state.VideoStream.Width.Value,
state.VideoStream.Height.Value);
- //For QSV, feed it into hardware encoder now
+ // For QSV, feed it into hardware encoder now
if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
{
videoSizeParam += ",hwupload=extra_hw_frames=64";
}
+
+ // For VAAPI
+ if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
+ {
+ var videoStream = state.VideoStream;
+ var inputWidth = videoStream?.Width;
+ var inputHeight = videoStream?.Height;
+ var (width, height) = GetFixedOutputSize(inputWidth, inputHeight, request.Width, request.Height, request.MaxWidth, request.MaxHeight);
+
+ if (width.HasValue && height.HasValue)
+ {
+ videoSizeParam = string.Format(
+ CultureInfo.InvariantCulture,
+ "scale={0}:{1}",
+ width.Value,
+ height.Value);
+ }
+ }
}
var mapPrefix = state.SubtitleStream.IsExternal ?
@@ -1624,7 +1630,53 @@ namespace MediaBrowser.Controller.MediaEncoding
// Setup default filtergraph utilizing FFMpeg overlay() and FFMpeg scale() (see the return of this function for index reference)
var retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}][sub]overlay{3}\"";
- if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
+ // When the input may or may not be hardware VAAPI decodable
+ if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
+ {
+ /*
+ [base]: HW scaling video to OutputSize
+ [sub]: SW scaling subtitle to FixedOutputSize
+ [base][sub]: SW overlay
+ */
+ retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]format=nv12|vaapi,hwupload{3},hwdownload[base];[base][sub]overlay,format=nv12,hwupload\"";
+ }
+
+ // If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
+ else if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding)
+ {
+ /*
+ [base]: SW scaling video to OutputSize
+ [sub]: SW scaling subtitle to FixedOutputSize
+ [base][sub]: SW overlay
+ */
+ var videoStream = state.VideoStream;
+ var codec = videoStream.Codec.ToLowerInvariant();
+
+ // Assert 10-bit hardware VAAPI decodable
+ if (!string.IsNullOrEmpty(videoStream.PixelFormat)
+ && videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) != -1
+ && (string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(codec, "vp9", StringComparison.OrdinalIgnoreCase)))
+ {
+ retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]hwdownload,format=p010le,format=nv12{3}[base];[base][sub]overlay\"";
+ }
+
+ // Assert 8-bit hardware VAAPI decodable
+ else if (!string.IsNullOrEmpty(videoStream.PixelFormat)
+ && videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) == -1)
+ {
+ retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]hwdownload,format=nv12{3}[base];[base][sub]overlay\"";
+ }
+ else
+ {
+ outputSizeParam = outputSizeParam.TrimStart(',');
+
+ retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]{3}[base];[base][sub]overlay\"";
+ }
+ }
+
+ else if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
{
/*
QSV in FFMpeg can now setup hardware overlay for transcodes.
@@ -1641,7 +1693,14 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
- return string.Format(
+ var output = string.Empty;
+
+ if (allowTimeStampCopy)
+ {
+ output += " -copyts";
+ }
+
+ output += string.Format(
CultureInfo.InvariantCulture,
retStr,
mapPrefix,
@@ -1649,6 +1708,8 @@ namespace MediaBrowser.Controller.MediaEncoding
state.VideoStream.Index,
outputSizeParam,
videoSizeParam);
+
+ return output;
}
private (int? width, int? height) GetFixedOutputSize(
@@ -1951,42 +2012,52 @@ namespace MediaBrowser.Controller.MediaEncoding
var videoStream = state.VideoStream;
var filters = new List();
+ var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, options);
+ var inputWidth = videoStream?.Width;
+ var inputHeight = videoStream?.Height;
+ var threeDFormat = state.MediaSource.Video3DFormat;
+
+ // When the input may or may not be hardware VAAPI decodable
+ if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
+ {
+ filters.Add("format=nv12|vaapi");
+ filters.Add("hwupload");
+ }
+
+ // When the input may or may not be hardware QSV decodable
+ else if (string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
+ {
+ filters.Add("format=nv12|qsv");
+ filters.Add("hwupload=extra_hw_frames=64");
+ }
+
// If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
- var hwType = options.HardwareAccelerationType ?? string.Empty;
- if (string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding )
+ else if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding)
{
- filters.Add("hwdownload");
+ var codec = videoStream.Codec.ToLowerInvariant();
- // If transcoding from 10 bit, transform colour spaces too
+ // Assert 10-bit hardware VAAPI decodable
if (!string.IsNullOrEmpty(videoStream.PixelFormat)
&& videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) != -1
- && string.Equals(outputVideoCodec, "libx264", StringComparison.OrdinalIgnoreCase))
+ && (string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(codec, "vp9", StringComparison.OrdinalIgnoreCase)))
{
+ filters.Add("hwdownload");
filters.Add("format=p010le");
filters.Add("format=nv12");
}
- else
+
+ // Assert 8-bit hardware VAAPI decodable
+ else if (!string.IsNullOrEmpty(videoStream.PixelFormat)
+ && videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) == -1)
{
+ filters.Add("hwdownload");
filters.Add("format=nv12");
}
}
- if (string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
- {
- filters.Add("format=nv12|vaapi");
- filters.Add("hwupload");
- }
-
- var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, options);
-
- // If we are software decoding, and hardware encoding
- if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase)
- && (string.IsNullOrEmpty(videoDecoder) || !videoDecoder.Contains("qsv", StringComparison.OrdinalIgnoreCase)))
- {
- filters.Add("format=nv12|qsv");
- filters.Add("hwupload=extra_hw_frames=64");
- }
-
+ // Add hardware deinterlace filter before scaling filter
if (state.DeInterlace("h264", true))
{
if (string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
@@ -1999,6 +2070,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
+ // Add software deinterlace filter before scaling filter
if ((state.DeInterlace("h264", true) || state.DeInterlace("h265", true) || state.DeInterlace("hevc", true))
&& !string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
{
@@ -2015,12 +2087,22 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
- var inputWidth = videoStream?.Width;
- var inputHeight = videoStream?.Height;
- var threeDFormat = state.MediaSource.Video3DFormat;
-
+ // Add scaling filter: scale_*=format=nv12 or scale_*=w=*:h=*:format=nv12 or scale=expr
filters.AddRange(GetScalingFilters(inputWidth, inputHeight, threeDFormat, videoDecoder, outputVideoCodec, request.Width, request.Height, request.MaxWidth, request.MaxHeight));
+ // Add parameters to use VAAPI with burn-in text subttiles (GH issue #642)
+ if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
+ {
+ if (state.SubtitleStream != null
+ && state.SubtitleStream.IsTextSubtitleStream
+ && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode)
+ {
+ // Test passed on Intel and AMD gfx
+ filters.Add("hwmap=mode=read+write");
+ filters.Add("format=nv12");
+ }
+ }
+
var output = string.Empty;
if (state.SubtitleStream != null
@@ -2772,14 +2854,27 @@ namespace MediaBrowser.Controller.MediaEncoding
var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
var hasCopyTs = false;
+
// Add resolution params, if specified
if (!hasGraphicalSubs)
{
var outputSizeParam = GetOutputSizeParam(state, encodingOptions, videoCodec);
+
args += outputSizeParam;
+
hasCopyTs = outputSizeParam.IndexOf("copyts", StringComparison.OrdinalIgnoreCase) != -1;
}
+ // This is for graphical subs
+ if (hasGraphicalSubs)
+ {
+ var graphicalSubtitleParam = GetGraphicalSubtitleParam(state, encodingOptions, videoCodec);
+
+ args += graphicalSubtitleParam;
+
+ hasCopyTs = graphicalSubtitleParam.IndexOf("copyts", StringComparison.OrdinalIgnoreCase) != -1;
+ }
+
if (state.RunTimeTicks.HasValue && state.BaseRequest.CopyTimestamps)
{
if (!hasCopyTs)
@@ -2787,13 +2882,12 @@ namespace MediaBrowser.Controller.MediaEncoding
args += " -copyts";
}
- args += " -avoid_negative_ts disabled -start_at_zero";
- }
+ args += " -avoid_negative_ts disabled";
- // This is for internal graphical subs
- if (hasGraphicalSubs)
- {
- args += GetGraphicalSubtitleParam(state, encodingOptions, videoCodec);
+ if (!(state.SubtitleStream != null && state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream))
+ {
+ args += " -start_at_zero";
+ }
}
var qualityParam = GetVideoQualityParam(state, videoCodec, encodingOptions, defaultPreset);
@@ -2899,6 +2993,5 @@ namespace MediaBrowser.Controller.MediaEncoding
string.Empty,
string.Empty).Trim();
}
-
}
}
From 111095c2b0554adad2f5a0f93883dc9d050bcdd4 Mon Sep 17 00:00:00 2001
From: Nyanmisaka
Date: Sat, 21 Mar 2020 03:29:33 +0800
Subject: [PATCH 74/95] fix QSV HWA failed when burning text subtitles
ffmpeg 4.3+ is required for better transcoding speed(more than twice increase).
Using qsv on Linux also requires a fix in ffmpeg 4.3+.
See https://github.com/FFmpeg/FFmpeg/commit/74007dd86a87289a075926704fae5bd8ef313bb5
---
.../MediaEncoding/EncodingHelper.cs | 45 +++++++++++++------
1 file changed, 31 insertions(+), 14 deletions(-)
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 8fb6170160..66d8afb982 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -471,20 +471,23 @@ namespace MediaBrowser.Controller.MediaEncoding
{
var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, encodingOptions);
var outputVideoCodec = GetVideoEncoder(state, encodingOptions);
+
+ var hasTextSubs = state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
- if (encodingOptions.EnableHardwareEncoding && outputVideoCodec.Contains("qsv", StringComparison.OrdinalIgnoreCase))
+ if (!hasTextSubs)
{
- if (!string.IsNullOrEmpty(videoDecoder) && videoDecoder.Contains("qsv", StringComparison.OrdinalIgnoreCase))
+ if (encodingOptions.EnableHardwareEncoding && outputVideoCodec.Contains("qsv", StringComparison.OrdinalIgnoreCase))
{
- arg.Append("-hwaccel qsv ");
- }
- else
- {
- arg.Append("-init_hw_device qsv=hw -filter_hw_device hw ");
+ if (!string.IsNullOrEmpty(videoDecoder) && videoDecoder.Contains("qsv", StringComparison.OrdinalIgnoreCase))
+ {
+ arg.Append("-hwaccel qsv ");
+ }
+ else
+ {
+ arg.Append("-init_hw_device qsv=hw -filter_hw_device hw ");
+ }
}
}
-
- arg.Append(videoDecoder + " ");
}
arg.Append("-i ")
@@ -1749,7 +1752,8 @@ namespace MediaBrowser.Controller.MediaEncoding
return (Convert.ToInt32(outputWidth), Convert.ToInt32(outputHeight));
}
- public List GetScalingFilters(int? videoWidth,
+ public List GetScalingFilters(EncodingJobInfo state,
+ int? videoWidth,
int? videoHeight,
Video3DFormat? threedFormat,
string videoDecoder,
@@ -1768,7 +1772,9 @@ namespace MediaBrowser.Controller.MediaEncoding
requestedMaxWidth,
requestedMaxHeight);
- if ((string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) || string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase))
+ var hasTextSubs = state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
+
+ if (string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) || ((string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && !hasTextSubs))
&& width.HasValue
&& height.HasValue)
{
@@ -2017,6 +2023,8 @@ namespace MediaBrowser.Controller.MediaEncoding
var inputHeight = videoStream?.Height;
var threeDFormat = state.MediaSource.Video3DFormat;
+ var hasTextSubs = state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
+
// When the input may or may not be hardware VAAPI decodable
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
{
@@ -2027,8 +2035,11 @@ namespace MediaBrowser.Controller.MediaEncoding
// When the input may or may not be hardware QSV decodable
else if (string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
{
- filters.Add("format=nv12|qsv");
- filters.Add("hwupload=extra_hw_frames=64");
+ if (!hasTextSubs)
+ {
+ filters.Add("format=nv12|qsv");
+ filters.Add("hwupload=extra_hw_frames=64");
+ }
}
// If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
@@ -2088,7 +2099,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
// Add scaling filter: scale_*=format=nv12 or scale_*=w=*:h=*:format=nv12 or scale=expr
- filters.AddRange(GetScalingFilters(inputWidth, inputHeight, threeDFormat, videoDecoder, outputVideoCodec, request.Width, request.Height, request.MaxWidth, request.MaxHeight));
+ filters.AddRange(GetScalingFilters(state, inputWidth, inputHeight, threeDFormat, videoDecoder, outputVideoCodec, request.Width, request.Height, request.MaxWidth, request.MaxHeight));
// Add parameters to use VAAPI with burn-in text subttiles (GH issue #642)
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && options.EnableHardwareEncoding)
@@ -2607,6 +2618,12 @@ namespace MediaBrowser.Controller.MediaEncoding
case "h264":
if (_mediaEncoder.SupportsDecoder("h264_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase))
{
+ // cuvid decoder does not support 10-bit input
+ if ((videoStream.BitDepth ?? 8) > 8)
+ {
+ encodingOptions.HardwareDecodingCodecs = Array.Empty();
+ return null;
+ }
return "-c:v h264_cuvid ";
}
break;
From 0c6ac38454e3b997e4d1d072f2957a918f953e1c Mon Sep 17 00:00:00 2001
From: Nyanmisaka
Date: Sat, 21 Mar 2020 20:20:39 +0800
Subject: [PATCH 75/95] fix graphical subtitle scaling for NVDEC
---
.../MediaEncoding/EncodingHelper.cs | 119 +++++++-----------
1 file changed, 42 insertions(+), 77 deletions(-)
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 66d8afb982..5241bc2eba 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -476,12 +476,15 @@ namespace MediaBrowser.Controller.MediaEncoding
if (!hasTextSubs)
{
- if (encodingOptions.EnableHardwareEncoding && outputVideoCodec.Contains("qsv", StringComparison.OrdinalIgnoreCase))
+ // While using QSV encoder
+ if ((outputVideoCodec ?? string.Empty).IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1)
{
- if (!string.IsNullOrEmpty(videoDecoder) && videoDecoder.Contains("qsv", StringComparison.OrdinalIgnoreCase))
+ // While using QSV decoder
+ if ((videoDecoder ?? string.Empty).IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1)
{
arg.Append("-hwaccel qsv ");
}
+ // While using SW decoder
else
{
arg.Append("-init_hw_device qsv=hw -filter_hw_device hw ");
@@ -497,18 +500,6 @@ namespace MediaBrowser.Controller.MediaEncoding
&& state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode
&& state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
{
- if (state.VideoStream != null && state.VideoStream.Width.HasValue
- && !string.Equals(encodingOptions.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
- {
- // This is hacky but not sure how to get the exact subtitle resolution
- int height = Convert.ToInt32(state.VideoStream.Width.Value / 16.0 * 9.0);
-
- arg.Append(" -canvas_size ")
- .Append(state.VideoStream.Width.Value.ToString(CultureInfo.InvariantCulture))
- .Append(':')
- .Append(height.ToString(CultureInfo.InvariantCulture));
- }
-
var subtitlePath = state.SubtitleStream.Path;
if (string.Equals(Path.GetExtension(subtitlePath), ".sub", StringComparison.OrdinalIgnoreCase))
@@ -1546,8 +1537,7 @@ namespace MediaBrowser.Controller.MediaEncoding
public string GetGraphicalSubtitleParam(
EncodingJobInfo state,
EncodingOptions options,
- string outputVideoCodec,
- bool allowTimeStampCopy = true)
+ string outputVideoCodec)
{
var outputSizeParam = string.Empty;
@@ -1561,30 +1551,39 @@ namespace MediaBrowser.Controller.MediaEncoding
{
outputSizeParam = GetOutputSizeParam(state, options, outputVideoCodec).TrimEnd('"');
- var index = outputSizeParam.IndexOf("deinterlace", StringComparison.OrdinalIgnoreCase);
+ var index = outputSizeParam.IndexOf("hwdownload", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = "," + outputSizeParam.Substring(index);
}
else
{
- index = outputSizeParam.IndexOf("yadif", StringComparison.OrdinalIgnoreCase);
+ index = outputSizeParam.IndexOf("format", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = "," + outputSizeParam.Substring(index);
}
else
{
- index = outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase);
+ index = outputSizeParam.IndexOf("yadif", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = "," + outputSizeParam.Substring(index);
}
+ else
+ {
+ index = outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase);
+ if (index != -1)
+ {
+ outputSizeParam = "," + outputSizeParam.Substring(index);
+ }
+ }
}
}
}
var videoSizeParam = string.Empty;
+ var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, options);
// Setup subtitle scaling
if (state.VideoStream != null && state.VideoStream.Width.HasValue && state.VideoStream.Height.HasValue)
@@ -1601,8 +1600,9 @@ namespace MediaBrowser.Controller.MediaEncoding
videoSizeParam += ",hwupload=extra_hw_frames=64";
}
- // For VAAPI
- if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
+ // For VAAPI and CUVID decoder
+ if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase)
+ || (videoDecoder ?? string.Empty).IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1)
{
var videoStream = state.VideoStream;
var inputWidth = videoStream?.Width;
@@ -1628,8 +1628,6 @@ namespace MediaBrowser.Controller.MediaEncoding
? 0
: state.SubtitleStream.Index;
- var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, options);
-
// Setup default filtergraph utilizing FFMpeg overlay() and FFMpeg scale() (see the return of this function for index reference)
var retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}][sub]overlay{3}\"";
@@ -1641,7 +1639,8 @@ namespace MediaBrowser.Controller.MediaEncoding
[sub]: SW scaling subtitle to FixedOutputSize
[base][sub]: SW overlay
*/
- retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]format=nv12|vaapi,hwupload{3},hwdownload[base];[base][sub]overlay,format=nv12,hwupload\"";
+ outputSizeParam = outputSizeParam.TrimStart(',');
+ retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]{3},hwdownload[base];[base][sub]overlay,format=nv12,hwupload\"";
}
// If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
@@ -1652,31 +1651,8 @@ namespace MediaBrowser.Controller.MediaEncoding
[sub]: SW scaling subtitle to FixedOutputSize
[base][sub]: SW overlay
*/
- var videoStream = state.VideoStream;
- var codec = videoStream.Codec.ToLowerInvariant();
-
- // Assert 10-bit hardware VAAPI decodable
- if (!string.IsNullOrEmpty(videoStream.PixelFormat)
- && videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) != -1
- && (string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)
- || string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase)
- || string.Equals(codec, "vp9", StringComparison.OrdinalIgnoreCase)))
- {
- retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]hwdownload,format=p010le,format=nv12{3}[base];[base][sub]overlay\"";
- }
-
- // Assert 8-bit hardware VAAPI decodable
- else if (!string.IsNullOrEmpty(videoStream.PixelFormat)
- && videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) == -1)
- {
- retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]hwdownload,format=nv12{3}[base];[base][sub]overlay\"";
- }
- else
- {
- outputSizeParam = outputSizeParam.TrimStart(',');
-
- retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]{3}[base];[base][sub]overlay\"";
- }
+ outputSizeParam = outputSizeParam.TrimStart(',');
+ retStr = " -filter_complex \"[{0}:{1}]{4}[sub];[0:{2}]{3}[base];[base][sub]overlay\"";
}
else if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
@@ -1696,14 +1672,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
- var output = string.Empty;
-
- if (allowTimeStampCopy)
- {
- output += " -copyts";
- }
-
- output += string.Format(
+ return string.Format(
CultureInfo.InvariantCulture,
retStr,
mapPrefix,
@@ -1711,8 +1680,6 @@ namespace MediaBrowser.Controller.MediaEncoding
state.VideoStream.Index,
outputSizeParam,
videoSizeParam);
-
- return output;
}
private (int? width, int? height) GetFixedOutputSize(
@@ -1774,7 +1741,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var hasTextSubs = state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
- if (string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) || ((string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && !hasTextSubs))
+ if (string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) || (string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && !hasTextSubs)
&& width.HasValue
&& height.HasValue)
{
@@ -1804,7 +1771,7 @@ namespace MediaBrowser.Controller.MediaEncoding
filters.Add(string.Format(CultureInfo.InvariantCulture, "scale_{0}=format=nv12", vaapi_or_qsv));
}
}
- else if ((videoDecoder ?? string.Empty).IndexOf("_cuvid", StringComparison.OrdinalIgnoreCase) != -1
+ else if ((videoDecoder ?? string.Empty).IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1
&& width.HasValue
&& height.HasValue)
{
@@ -2008,8 +1975,7 @@ namespace MediaBrowser.Controller.MediaEncoding
public string GetOutputSizeParam(
EncodingJobInfo state,
EncodingOptions options,
- string outputVideoCodec,
- bool allowTimeStampCopy = true)
+ string outputVideoCodec)
{
// http://sonnati.wordpress.com/2012/10/19/ffmpeg-the-swiss-army-knife-of-internet-streaming-part-vi/
@@ -2046,10 +2012,10 @@ namespace MediaBrowser.Controller.MediaEncoding
else if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase) && !options.EnableHardwareEncoding)
{
var codec = videoStream.Codec.ToLowerInvariant();
+ var pixelFormat = videoStream.PixelFormat.ToLowerInvariant();
// Assert 10-bit hardware VAAPI decodable
- if (!string.IsNullOrEmpty(videoStream.PixelFormat)
- && videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) != -1
+ if ((pixelFormat ?? string.Empty).IndexOf("p10", StringComparison.OrdinalIgnoreCase) != -1
&& (string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codec, "vp9", StringComparison.OrdinalIgnoreCase)))
@@ -2060,8 +2026,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
// Assert 8-bit hardware VAAPI decodable
- else if (!string.IsNullOrEmpty(videoStream.PixelFormat)
- && videoStream.PixelFormat.IndexOf("p10", StringComparison.OrdinalIgnoreCase) == -1)
+ else if ((pixelFormat ?? string.Empty).IndexOf("p10", StringComparison.OrdinalIgnoreCase) == -1)
{
filters.Add("hwdownload");
filters.Add("format=nv12");
@@ -2077,13 +2042,18 @@ namespace MediaBrowser.Controller.MediaEncoding
}
else if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
{
- filters.Add(string.Format(CultureInfo.InvariantCulture, "deinterlace_qsv"));
+ if (!hasTextSubs)
+ {
+ filters.Add(string.Format(CultureInfo.InvariantCulture, "deinterlace_qsv"));
+ }
}
}
// Add software deinterlace filter before scaling filter
- if ((state.DeInterlace("h264", true) || state.DeInterlace("h265", true) || state.DeInterlace("hevc", true))
- && !string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
+ if (((state.DeInterlace("h264", true) || state.DeInterlace("h265", true) || state.DeInterlace("hevc", true))
+ && !string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase)
+ && !string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
+ || (hasTextSubs && state.DeInterlace("h264", true) && string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase)))
{
var inputFramerate = videoStream?.RealFrameRate;
@@ -2130,11 +2100,6 @@ namespace MediaBrowser.Controller.MediaEncoding
{
filters.Add("hwmap");
}
-
- if (allowTimeStampCopy)
- {
- output += " -copyts";
- }
}
if (filters.Count > 0)
@@ -2311,7 +2276,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
inputModifier += " " + videoDecoder;
- if ((videoDecoder ?? string.Empty).IndexOf("_cuvid", StringComparison.OrdinalIgnoreCase) != -1)
+ if ((videoDecoder ?? string.Empty).IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1)
{
var videoStream = state.VideoStream;
var inputWidth = videoStream?.Width;
@@ -2320,7 +2285,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var (width, height) = GetFixedOutputSize(inputWidth, inputHeight, request.Width, request.Height, request.MaxWidth, request.MaxHeight);
- if ((videoDecoder ?? string.Empty).IndexOf("_cuvid", StringComparison.OrdinalIgnoreCase) != -1
+ if ((videoDecoder ?? string.Empty).IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1
&& width.HasValue
&& height.HasValue)
{
From 0e9d9a7897fdb30b5cbfd270362eb35d31b24e94 Mon Sep 17 00:00:00 2001
From: Nyanmisaka
Date: Sun, 29 Mar 2020 04:27:49 +0800
Subject: [PATCH 76/95] fix the incorrect HLS time while using hw encoders
---
.../Playback/Hls/DynamicHlsService.cs | 22 ++++++++++++-------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index 734d907746..c6748d7127 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -927,35 +927,41 @@ namespace MediaBrowser.Api.Playback.Hls
}
else
{
+ var gopArg = string.Empty;
var keyFrameArg = string.Format(
CultureInfo.InvariantCulture,
" -force_key_frames:0 \"expr:gte(t,{0}+n_forced*{1})\"",
GetStartNumber(state) * state.SegmentLength,
state.SegmentLength);
- if (state.TargetFramerate.HasValue)
+
+ var framerate = state.VideoStream?.RealFrameRate;
+
+ if (framerate != null && framerate.HasValue)
{
// This is to make sure keyframe interval is limited to our segment,
// as forcing keyframes is not enough.
// Example: we encoded half of desired length, then codec detected
// scene cut and inserted a keyframe; next forced keyframe would
// be created outside of segment, which breaks seeking.
- keyFrameArg += string.Format(
+ gopArg = string.Format(
CultureInfo.InvariantCulture,
- " -g {0} -keyint_min {0}",
- (int)(state.SegmentLength * state.TargetFramerate)
+ " -g {0} -keyint_min {0} -sc_threshold 0",
+ state.SegmentLength * Math.Ceiling(Convert.ToDecimal(framerate))
);
}
args += " " + EncodingHelper.GetVideoQualityParam(state, codec, encodingOptions, GetDefaultEncoderPreset());
- // Unable to force key frames to h264_qsv transcode
- if (string.Equals(codec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
+ // Unable to force key frames using these hw encoders, set key frames by GOP
+ if (string.Equals(codec, "h264_qsv", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(codec, "h264_nvenc", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(codec, "h264_amf", StringComparison.OrdinalIgnoreCase))
{
- Logger.LogInformation("Bug Workaround: Disabling force_key_frames for h264_qsv");
+ args += " " + gopArg;
}
else
{
- args += " " + keyFrameArg;
+ args += " " + keyFrameArg + gopArg;
}
//args += " -mixed-refs 0 -refs 3 -x264opts b_pyramid=0:weightb=0:weightp=0";
From 0af353404cfbd941cdf7c8f334292db6c38ec74a Mon Sep 17 00:00:00 2001
From: nyanmisaka
Date: Mon, 30 Mar 2020 14:46:05 +0800
Subject: [PATCH 77/95] fix the UTF-16 error while burning ass/ssa subtitles
---
MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | 4 +++-
MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 8 ++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index c6748d7127..e22934f794 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -946,7 +946,7 @@ namespace MediaBrowser.Api.Playback.Hls
gopArg = string.Format(
CultureInfo.InvariantCulture,
" -g {0} -keyint_min {0} -sc_threshold 0",
- state.SegmentLength * Math.Ceiling(Convert.ToDecimal(framerate))
+ Math.Ceiling(state.SegmentLength * framerate.Value)
);
}
@@ -980,6 +980,8 @@ namespace MediaBrowser.Api.Playback.Hls
args += EncodingHelper.GetGraphicalSubtitleParam(state, encodingOptions, codec);
}
+ // -start_at_zero is necessary to use with -ss when seeking,
+ // otherwise the target position cannot be determined.
if (!(state.SubtitleStream != null && state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream))
{
args += " -start_at_zero";
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
index a4a7595d29..5c2dc927b7 100644
--- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
@@ -730,6 +730,14 @@ namespace MediaBrowser.MediaEncoding.Subtitles
{
var charset = CharsetDetector.DetectFromStream(stream).Detected?.EncodingName;
+ // UTF16 is automatically converted to UTF8 by FFmpeg, do not specify a character encoding
+ if ((path.EndsWith(".ass") || path.EndsWith(".ssa"))
+ && (string.Equals(charset, "utf-16le", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(charset, "utf-16be", StringComparison.OrdinalIgnoreCase)))
+ {
+ charset = "";
+ }
+
_logger.LogDebug("charset {0} detected for {Path}", charset ?? "null", path);
return charset;
From 95c5c086104456f0e4c0a6b98d126be02f6f3cb0 Mon Sep 17 00:00:00 2001
From: nyanmisaka
Date: Tue, 31 Mar 2020 04:04:55 +0800
Subject: [PATCH 78/95] minor improvements
---
.../Playback/Hls/DynamicHlsService.cs | 14 +++++++-------
.../MediaEncoding/EncodingHelper.cs | 18 +++++++++++-------
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index e22934f794..4fa930f881 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -942,7 +942,8 @@ namespace MediaBrowser.Api.Playback.Hls
// as forcing keyframes is not enough.
// Example: we encoded half of desired length, then codec detected
// scene cut and inserted a keyframe; next forced keyframe would
- // be created outside of segment, which breaks seeking.
+ // be created outside of segment, which breaks seeking
+ // -sc_threshold 0 is used to prevent the hardware encoder from post processing to break the set keyframe
gopArg = string.Format(
CultureInfo.InvariantCulture,
" -g {0} -keyint_min {0} -sc_threshold 0",
@@ -968,17 +969,16 @@ namespace MediaBrowser.Api.Playback.Hls
var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
- // Add resolution params, if specified
- if (!hasGraphicalSubs)
- {
- args += EncodingHelper.GetOutputSizeParam(state, encodingOptions, codec);
- }
-
// This is for graphical subs
if (hasGraphicalSubs)
{
args += EncodingHelper.GetGraphicalSubtitleParam(state, encodingOptions, codec);
}
+ // Add resolution params, if specified
+ else
+ {
+ args += EncodingHelper.GetOutputSizeParam(state, encodingOptions, codec);
+ }
// -start_at_zero is necessary to use with -ss when seeking,
// otherwise the target position cannot be determined.
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 5241bc2eba..4e2e441134 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -1588,9 +1588,11 @@ namespace MediaBrowser.Controller.MediaEncoding
// Setup subtitle scaling
if (state.VideoStream != null && state.VideoStream.Width.HasValue && state.VideoStream.Height.HasValue)
{
+ // force_original_aspect_ratio=decrease
+ // Enable decreasing output video width or height if necessary to keep the original aspect ratio
videoSizeParam = string.Format(
CultureInfo.InvariantCulture,
- "scale={0}:{1}",
+ "scale={0}:{1}:force_original_aspect_ratio=decrease",
state.VideoStream.Width.Value,
state.VideoStream.Height.Value);
@@ -1601,6 +1603,8 @@ namespace MediaBrowser.Controller.MediaEncoding
}
// For VAAPI and CUVID decoder
+ // these encoders cannot automatically adjust the size of graphical subtitles to fit the output video,
+ // thus needs to be manually adjusted.
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase)
|| (videoDecoder ?? string.Empty).IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1)
{
@@ -1613,7 +1617,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
videoSizeParam = string.Format(
CultureInfo.InvariantCulture,
- "scale={0}:{1}",
+ "scale={0}:{1}:force_original_aspect_ratio=decrease",
width.Value,
height.Value);
}
@@ -1741,7 +1745,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var hasTextSubs = state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
- if (string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) || (string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && !hasTextSubs)
+ if (string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) || (string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && !hasTextSubs)
&& width.HasValue
&& height.HasValue)
{
@@ -2043,7 +2047,7 @@ namespace MediaBrowser.Controller.MediaEncoding
else if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
{
if (!hasTextSubs)
- {
+ {
filters.Add(string.Format(CultureInfo.InvariantCulture, "deinterlace_qsv"));
}
}
@@ -2051,9 +2055,9 @@ namespace MediaBrowser.Controller.MediaEncoding
// Add software deinterlace filter before scaling filter
if (((state.DeInterlace("h264", true) || state.DeInterlace("h265", true) || state.DeInterlace("hevc", true))
- && !string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase)
- && !string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
- || (hasTextSubs && state.DeInterlace("h264", true) && string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase)))
+ && !string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase)
+ && !string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
+ || (hasTextSubs && state.DeInterlace("h264", true) && string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase)))
{
var inputFramerate = videoStream?.RealFrameRate;
From 907f2bb2f48331f292d8b873c72095b238dbf197 Mon Sep 17 00:00:00 2001
From: dkanada
Date: Tue, 31 Mar 2020 05:16:32 +0900
Subject: [PATCH 79/95] fix custom musicbrainz servers
---
.../MusicBrainz/Configuration/PluginConfiguration.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs
index 6910b4bb44..5843b0c7d9 100644
--- a/MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs
+++ b/MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs
@@ -32,7 +32,11 @@ namespace MediaBrowser.Providers.Plugins.MusicBrainz
{
if (value < Plugin.DefaultRateLimit && _server == Plugin.DefaultServer)
{
- RateLimit = Plugin.DefaultRateLimit;
+ _rateLimit = Plugin.DefaultRateLimit;
+ }
+ else
+ {
+ _rateLimit = value;
}
}
}
From 0a23abb84f2d0781ad663ddb43fa87036932fa5e Mon Sep 17 00:00:00 2001
From: abdulaziz
Date: Mon, 30 Mar 2020 22:18:07 +0000
Subject: [PATCH 80/95] Translated using Weblate (Arabic) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ar/
---
Emby.Server.Implementations/Localization/Core/ar.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/ar.json b/Emby.Server.Implementations/Localization/Core/ar.json
index 4952fc160c..7fffe7b83f 100644
--- a/Emby.Server.Implementations/Localization/Core/ar.json
+++ b/Emby.Server.Implementations/Localization/Core/ar.json
@@ -4,10 +4,10 @@
"Application": "تطبيق",
"Artists": "الفنانين",
"AuthenticationSucceededWithUserName": "{0} سجل الدخول بنجاح",
- "Books": "كتب",
+ "Books": "الكتب",
"CameraImageUploadedFrom": "صورة كاميرا جديدة تم رفعها من {0}",
"Channels": "القنوات",
- "ChapterNameValue": "فصل {0}",
+ "ChapterNameValue": "الفصل {0}",
"Collections": "مجموعات",
"DeviceOfflineWithName": "قُطِع الاتصال بـ{0}",
"DeviceOnlineWithName": "{0} متصل",
@@ -51,8 +51,8 @@
"NotificationOptionAudioPlaybackStopped": "تم إيقاف تشغيل المقطع الصوتي",
"NotificationOptionCameraImageUploaded": "تم رفع صورة الكاميرا",
"NotificationOptionInstallationFailed": "فشل في التثبيت",
- "NotificationOptionNewLibraryContent": "أُضِيفَ محتوى جديد",
- "NotificationOptionPluginError": "فشل في الـPlugin",
+ "NotificationOptionNewLibraryContent": "تم إضافة محتوى جديد",
+ "NotificationOptionPluginError": "فشل في البرنامج المضاف",
"NotificationOptionPluginInstalled": "تم تثبيت الملحق",
"NotificationOptionPluginUninstalled": "تمت إزالة الملحق",
"NotificationOptionPluginUpdateInstalled": "تم تثبيت تحديثات الملحق",
From 0aefc39469b2ac11ace90cdf9b6acd169a3ddd15 Mon Sep 17 00:00:00 2001
From: Nyanmisaka <799610810@qq.com>
Date: Tue, 31 Mar 2020 03:00:46 +0000
Subject: [PATCH 81/95] Translated using Weblate (Chinese (Simplified))
Translation: Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
---
.../Localization/Core/zh-CN.json | 28 +++++++++++++++++--
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/zh-CN.json b/Emby.Server.Implementations/Localization/Core/zh-CN.json
index 69a06a35dc..f8596795a9 100644
--- a/Emby.Server.Implementations/Localization/Core/zh-CN.json
+++ b/Emby.Server.Implementations/Localization/Core/zh-CN.json
@@ -3,11 +3,11 @@
"AppDeviceValues": "应用: {0}, 设备: {1}",
"Application": "应用程序",
"Artists": "艺术家",
- "AuthenticationSucceededWithUserName": "{0} 验证成功",
+ "AuthenticationSucceededWithUserName": "{0} 已成功验证",
"Books": "书籍",
"CameraImageUploadedFrom": "新的相机图像已从 {0} 上传",
"Channels": "频道",
- "ChapterNameValue": "第 {0} 章",
+ "ChapterNameValue": "第 {0} 集",
"Collections": "合集",
"DeviceOfflineWithName": "{0} 已断开",
"DeviceOnlineWithName": "{0} 已连接",
@@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} 已在 {2} 上停止播放 {1}",
"ValueHasBeenAddedToLibrary": "{0} 已添加至您的媒体库中",
"ValueSpecialEpisodeName": "特典 - {0}",
- "VersionNumber": "版本 {0}"
+ "VersionNumber": "版本 {0}",
+ "TaskUpdatePluginsDescription": "为已设置为自动更新的插件下载和安装更新。",
+ "TaskRefreshPeople": "刷新人员",
+ "TasksChannelsCategory": "互联网频道",
+ "TasksLibraryCategory": "媒体库",
+ "TaskDownloadMissingSubtitlesDescription": "根据元数据设置在互联网上搜索缺少的字幕。",
+ "TaskDownloadMissingSubtitles": "下载缺少的字幕",
+ "TaskRefreshChannelsDescription": "刷新互联网频道信息。",
+ "TaskRefreshChannels": "刷新频道",
+ "TaskCleanTranscodeDescription": "删除存在超过 1 天的转码文件。",
+ "TaskCleanTranscode": "清理转码目录",
+ "TaskUpdatePlugins": "更新插件",
+ "TaskRefreshPeopleDescription": "更新媒体库中演员和导演的元数据。",
+ "TaskCleanLogsDescription": "删除存在超过 {0} 天的的日志文件。",
+ "TaskCleanLogs": "清理日志目录",
+ "TaskRefreshLibraryDescription": "扫描你的媒体库以获取新文件并刷新元数据。",
+ "TaskRefreshLibrary": "扫描媒体库",
+ "TaskRefreshChapterImagesDescription": "为包含剧集的视频提取缩略图。",
+ "TaskRefreshChapterImages": "提取剧集图片",
+ "TaskCleanCacheDescription": "删除系统不再需要的缓存文件。",
+ "TaskCleanCache": "清理缓存目录",
+ "TasksApplicationCategory": "应用程序",
+ "TasksMaintenanceCategory": "维护"
}
From 55ddda09c403665129af537a871680bbd8ef0ebb Mon Sep 17 00:00:00 2001
From: Unknown
Date: Tue, 31 Mar 2020 08:25:35 +0200
Subject: [PATCH 82/95] Update Jellyfin.SkiaSharp.NativeAssets.LinuxArm to
version 1.68.1
---
Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj
index f9ce0bbe12..d0a99e1e28 100644
--- a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj
+++ b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj
@@ -14,7 +14,7 @@
-
+
From 6bfb7524f982d3bdddfdd6d8f402d18e75b15ff8 Mon Sep 17 00:00:00 2001
From: pucherot
Date: Tue, 31 Mar 2020 11:10:40 +0000
Subject: [PATCH 83/95] Translated using Weblate (Spanish) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es/
---
.../Localization/Core/es.json | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index 63c2cd0108..de1baada84 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -98,21 +98,21 @@
"TasksApplicationCategory": "Aplicación",
"TasksChannelsCategory": "Canales de internet",
"TaskCleanCache": "Eliminar archivos temporales",
- "TaskCleanCacheDescription": "Elimina los archivos temporales que ya no son necesarios para el servidor",
+ "TaskCleanCacheDescription": "Elimina los archivos temporales que ya no son necesarios para el servidor.",
"TaskRefreshChapterImages": "Extraer imágenes de los capítulos",
- "TaskRefreshChapterImagesDescription": "Crea las miniaturas de los vídeos que tengan capítulos",
+ "TaskRefreshChapterImagesDescription": "Crea las miniaturas de los vídeos que tengan capítulos.",
"TaskRefreshLibrary": "Escanear la biblioteca",
- "TaskRefreshLibraryDescription": "Añade los archivos que se hayan añadido a la biblioteca y actualiza las etiquetas de los ya presentes",
+ "TaskRefreshLibraryDescription": "Añade los archivos que se hayan añadido a la biblioteca y actualiza las etiquetas de los ya presentes.",
"TaskCleanLogs": "Limpiar registros",
- "TaskCleanLogsDescription": "Elimina los archivos de registros que tengan más de {0} días",
+ "TaskCleanLogsDescription": "Elimina los archivos de registro que tengan más de {0} días.",
"TaskRefreshPeople": "Actualizar personas",
- "TaskRefreshPeopleDescription": "Actualiza las etiquetas de los intérpretes y directores presentes en tus bibliotecas",
+ "TaskRefreshPeopleDescription": "Actualiza las etiquetas de los intérpretes y directores presentes en tus bibliotecas.",
"TaskUpdatePlugins": "Actualizar extensiones",
- "TaskUpdatePluginsDescription": "Actualiza las extensiones que están configuradas para actualizarse automáticamente",
+ "TaskUpdatePluginsDescription": "Actualiza las extensiones que están configuradas para actualizarse automáticamente.",
"TaskCleanTranscode": "Limpiar las transcodificaciones",
- "TaskCleanTranscodeDescription": "Elimina los archivos temporales creados mientras se transcodificaba el contenido",
+ "TaskCleanTranscodeDescription": "Elimina los archivos temporales de transcodificación anteriores a un día de antigüedad.",
"TaskRefreshChannels": "Actualizar canales",
- "TaskRefreshChannelsDescription": "Actualiza la información de los canales de internet",
+ "TaskRefreshChannelsDescription": "Actualiza la información de los canales de internet.",
"TaskDownloadMissingSubtitles": "Descargar los subtítulos que faltan",
- "TaskDownloadMissingSubtitlesDescription": "Busca en internet los subtítulos que falten en el contenido de tus bibliotecas, basándose en la configuración de idioma"
+ "TaskDownloadMissingSubtitlesDescription": "Busca en internet los subtítulos que falten en el contenido de tus bibliotecas, basándose en la configuración de los metadatos."
}
From 6408174cccc278017d28ef093604310a4076dbd4 Mon Sep 17 00:00:00 2001
From: amirmasoud
Date: Tue, 31 Mar 2020 08:05:01 +0000
Subject: [PATCH 84/95] Translated using Weblate (Persian) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fa/
---
.../Localization/Core/fa.json | 82 +++++++++----------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/fa.json b/Emby.Server.Implementations/Localization/Core/fa.json
index 16fe18ef33..45e74b8ebe 100644
--- a/Emby.Server.Implementations/Localization/Core/fa.json
+++ b/Emby.Server.Implementations/Localization/Core/fa.json
@@ -1,56 +1,56 @@
{
- "Albums": "آلبوم ها",
+ "Albums": "آلبومها",
"AppDeviceValues": "برنامه: {0} ، دستگاه: {1}",
"Application": "برنامه",
"Artists": "هنرمندان",
"AuthenticationSucceededWithUserName": "{0} با موفقیت تایید اعتبار شد",
- "Books": "کتاب ها",
- "CameraImageUploadedFrom": "یک عکس جدید از دوربین ارسال شده {0}",
- "Channels": "کانال ها",
- "ChapterNameValue": "فصل {0}",
- "Collections": "کلکسیون ها",
+ "Books": "کتابها",
+ "CameraImageUploadedFrom": "یک عکس جدید از دوربین ارسال شده است {0}",
+ "Channels": "کانالها",
+ "ChapterNameValue": "قسمت {0}",
+ "Collections": "مجموعهها",
"DeviceOfflineWithName": "ارتباط {0} قطع شد",
- "DeviceOnlineWithName": "{0} متصل شده",
+ "DeviceOnlineWithName": "{0} متصل شد",
"FailedLoginAttemptWithUserName": "تلاش برای ورود از {0} ناموفق بود",
- "Favorites": "مورد علاقه ها",
- "Folders": "پوشه ها",
+ "Favorites": "مورد علاقهها",
+ "Folders": "پوشهها",
"Genres": "ژانرها",
"HeaderAlbumArtists": "هنرمندان آلبوم",
"HeaderCameraUploads": "آپلودهای دوربین",
"HeaderContinueWatching": "ادامه تماشا",
- "HeaderFavoriteAlbums": "آلبوم های مورد علاقه",
+ "HeaderFavoriteAlbums": "آلبومهای مورد علاقه",
"HeaderFavoriteArtists": "هنرمندان مورد علاقه",
- "HeaderFavoriteEpisodes": "قسمت های مورد علاقه",
- "HeaderFavoriteShows": "سریال های مورد علاقه",
- "HeaderFavoriteSongs": "آهنگ های مورد علاقه",
+ "HeaderFavoriteEpisodes": "قسمتهای مورد علاقه",
+ "HeaderFavoriteShows": "سریالهای مورد علاقه",
+ "HeaderFavoriteSongs": "آهنگهای مورد علاقه",
"HeaderLiveTV": "پخش زنده تلویزیون",
- "HeaderNextUp": "بعدی چیه",
- "HeaderRecordingGroups": "گروه های ضبط",
+ "HeaderNextUp": "قسمت بعدی",
+ "HeaderRecordingGroups": "گروههای ضبط",
"HomeVideos": "ویدیوهای خانگی",
"Inherit": "به ارث برده",
"ItemAddedWithName": "{0} به کتابخانه افزوده شد",
"ItemRemovedWithName": "{0} از کتابخانه حذف شد",
"LabelIpAddressValue": "آدرس آی پی: {0}",
"LabelRunningTimeValue": "زمان اجرا: {0}",
- "Latest": "آخرین",
+ "Latest": "جدیدترینها",
"MessageApplicationUpdated": "سرور Jellyfin بروزرسانی شد",
- "MessageApplicationUpdatedTo": "سرور جلیفین آپدیت شده به نسخه {0}",
+ "MessageApplicationUpdatedTo": "سرور Jellyfin به نسخه {0} بروزرسانی شد",
"MessageNamedServerConfigurationUpdatedWithValue": "پکربندی بخش {0} سرور بروزرسانی شد",
"MessageServerConfigurationUpdated": "پیکربندی سرور بروزرسانی شد",
- "MixedContent": "محتوای درهم",
- "Movies": "فیلم های سینمایی",
+ "MixedContent": "محتوای مخلوط",
+ "Movies": "فیلمها",
"Music": "موسیقی",
"MusicVideos": "موزیک ویدیوها",
- "NameInstallFailed": "{0} نصب با مشکل مواجه شده",
+ "NameInstallFailed": "{0} نصب با مشکل مواجه شد",
"NameSeasonNumber": "فصل {0}",
- "NameSeasonUnknown": "فصل های ناشناخته",
- "NewVersionIsAvailable": "یک نسخه جدید جلیفین برای بروزرسانی آماده میباشد.",
+ "NameSeasonUnknown": "فصل ناشناخته",
+ "NewVersionIsAvailable": "یک نسخه جدید Jellyfin برای بروزرسانی آماده میباشد.",
"NotificationOptionApplicationUpdateAvailable": "بروزرسانی برنامه موجود است",
"NotificationOptionApplicationUpdateInstalled": "بروزرسانی برنامه نصب شد",
"NotificationOptionAudioPlayback": "پخش صدا آغاز شد",
"NotificationOptionAudioPlaybackStopped": "پخش صدا متوقف شد",
"NotificationOptionCameraImageUploaded": "تصاویر دوربین آپلود شد",
- "NotificationOptionInstallationFailed": "شکست نصب",
+ "NotificationOptionInstallationFailed": "نصب شکست خورد",
"NotificationOptionNewLibraryContent": "محتوای جدید افزوده شد",
"NotificationOptionPluginError": "خرابی افزونه",
"NotificationOptionPluginInstalled": "افزونه نصب شد",
@@ -58,39 +58,39 @@
"NotificationOptionPluginUpdateInstalled": "بروزرسانی افزونه نصب شد",
"NotificationOptionServerRestartRequired": "شروع مجدد سرور نیاز است",
"NotificationOptionTaskFailed": "شکست وظیفه برنامه ریزی شده",
- "NotificationOptionUserLockedOut": "کاربر از سیستم خارج شد",
+ "NotificationOptionUserLockedOut": "کاربر قفل شد",
"NotificationOptionVideoPlayback": "پخش ویدیو آغاز شد",
"NotificationOptionVideoPlaybackStopped": "پخش ویدیو متوقف شد",
- "Photos": "عکس ها",
- "Playlists": "لیست های پخش",
+ "Photos": "عکسها",
+ "Playlists": "لیستهای پخش",
"Plugin": "افزونه",
"PluginInstalledWithName": "{0} نصب شد",
"PluginUninstalledWithName": "{0} حذف شد",
"PluginUpdatedWithName": "{0} آپدیت شد",
"ProviderValue": "ارائه دهنده: {0}",
- "ScheduledTaskFailedWithName": "{0} ناموفق بود",
+ "ScheduledTaskFailedWithName": "{0} شکست خورد",
"ScheduledTaskStartedWithName": "{0} شروع شد",
- "ServerNameNeedsToBeRestarted": "{0} احتیاج به راه اندازی مجدد",
- "Shows": "سریال ها",
- "Songs": "آهنگ ها",
+ "ServerNameNeedsToBeRestarted": "{0} نیاز به راه اندازی مجدد دارد",
+ "Shows": "سریالها",
+ "Songs": "موسیقیها",
"StartupEmbyServerIsLoading": "سرور Jellyfin در حال بارگیری است. لطفا کمی بعد دوباره تلاش کنید.",
"SubtitleDownloadFailureForItem": "دانلود زیرنویس برای {0} ناموفق بود",
- "SubtitleDownloadFailureFromForItem": "زیرنویس برای دانلود با مشکل مواجه شده از {0} برای {1}",
- "Sync": "همگامسازی",
+ "SubtitleDownloadFailureFromForItem": "بارگیری زیرنویس برای {1} از {0} شکست خورد",
+ "Sync": "همگامسازی",
"System": "سیستم",
- "TvShows": "سریال های تلویزیونی",
+ "TvShows": "سریالهای تلویزیونی",
"User": "کاربر",
"UserCreatedWithName": "کاربر {0} ایجاد شد",
"UserDeletedWithName": "کاربر {0} حذف شد",
- "UserDownloadingItemWithValues": "{0} در حال دانلود است {1}",
- "UserLockedOutWithName": "کاربر {0} از سیستم خارج شد",
+ "UserDownloadingItemWithValues": "{0} در حال بارگیری {1} میباشد",
+ "UserLockedOutWithName": "کاربر {0} قفل شده است",
"UserOfflineFromDevice": "ارتباط {0} از {1} قطع شد",
- "UserOnlineFromDevice": "{0}از {1} آنلاین میباشد",
- "UserPasswordChangedWithName": "رمز برای کاربر {0} تغییر یافت",
+ "UserOnlineFromDevice": "{0} از {1} آنلاین میباشد",
+ "UserPasswordChangedWithName": "گذرواژه برای کاربر {0} تغییر کرد",
"UserPolicyUpdatedWithName": "سیاست کاربری برای {0} بروزرسانی شد",
- "UserStartedPlayingItemWithValues": "{0} شروع به پخش {1} کرد",
- "UserStoppedPlayingItemWithValues": "{0} پخش {1} را متوقف کرد",
- "ValueHasBeenAddedToLibrary": "{0} اضافه شده به کتابخانه رسانه شما",
- "ValueSpecialEpisodeName": "ویژه- {0}",
+ "UserStartedPlayingItemWithValues": "{0} در حال پخش {1} بر روی {2} است",
+ "UserStoppedPlayingItemWithValues": "{0} پخش {1} را بر روی {2} به پایان رساند",
+ "ValueHasBeenAddedToLibrary": "{0} به کتابخانهی رسانهی شما افزوده شد",
+ "ValueSpecialEpisodeName": "ویژه - {0}",
"VersionNumber": "نسخه {0}"
}
From 314129c803e69aab23a53fc992680d3a86a9b4b2 Mon Sep 17 00:00:00 2001
From: Exploding Dragon
Date: Tue, 31 Mar 2020 07:59:53 +0000
Subject: [PATCH 85/95] Translated using Weblate (Chinese (Simplified))
Translation: Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
---
Emby.Server.Implementations/Localization/Core/zh-CN.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/zh-CN.json b/Emby.Server.Implementations/Localization/Core/zh-CN.json
index f8596795a9..9d23f60cc5 100644
--- a/Emby.Server.Implementations/Localization/Core/zh-CN.json
+++ b/Emby.Server.Implementations/Localization/Core/zh-CN.json
@@ -3,7 +3,7 @@
"AppDeviceValues": "应用: {0}, 设备: {1}",
"Application": "应用程序",
"Artists": "艺术家",
- "AuthenticationSucceededWithUserName": "{0} 已成功验证",
+ "AuthenticationSucceededWithUserName": "成功验证{0} ",
"Books": "书籍",
"CameraImageUploadedFrom": "新的相机图像已从 {0} 上传",
"Channels": "频道",
From 6e847b3f57dd19845f398396b3514372e4350471 Mon Sep 17 00:00:00 2001
From: KGT1
Date: Tue, 31 Mar 2020 23:09:05 +0000
Subject: [PATCH 86/95] Translated using Weblate (German) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/de/
---
.../Localization/Core/de.json | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/de.json b/Emby.Server.Implementations/Localization/Core/de.json
index 578c42f9e4..414430ff7b 100644
--- a/Emby.Server.Implementations/Localization/Core/de.json
+++ b/Emby.Server.Implementations/Localization/Core/de.json
@@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} hat die Wiedergabe von {1} auf {2} beendet",
"ValueHasBeenAddedToLibrary": "{0} wurde deiner Bibliothek hinzugefügt",
"ValueSpecialEpisodeName": "Extra - {0}",
- "VersionNumber": "Version {0}"
+ "VersionNumber": "Version {0}",
+ "TaskDownloadMissingSubtitlesDescription": "Durchsucht das Internet nach fehlenden Untertiteln, basierend auf den Meta Einstellungen.",
+ "TaskDownloadMissingSubtitles": "Lade fehlende Untertitel herunter",
+ "TaskRefreshChannelsDescription": "Erneuere Internet Kanal Informationen.",
+ "TaskRefreshChannels": "Erneuere Kanäle",
+ "TaskCleanTranscodeDescription": "Löscht Transkodierdateien welche älter als ein Tag sind.",
+ "TaskCleanTranscode": "Lösche Transkodier Pfad",
+ "TaskUpdatePluginsDescription": "Läd Updates für Plugins herunter, welche dazu eingestellt sind automatisch zu updaten und installiert sie.",
+ "TaskUpdatePlugins": "Update Plugins",
+ "TaskRefreshPeopleDescription": "Erneuert Metadaten für Schausteller und Regisseure in deinen Bibliotheken.",
+ "TaskRefreshPeople": "Erneuere Schausteller",
+ "TaskCleanLogsDescription": "Lösche Log Datein die älter als {0} Tage sind.",
+ "TaskCleanLogs": "Lösche Log Pfad",
+ "TaskRefreshLibraryDescription": "Scanne alle Bibliotheken für hinzugefügte Datein und erneuere Metadaten.",
+ "TaskRefreshLibrary": "Scanne alle Bibliotheken",
+ "TaskRefreshChapterImagesDescription": "Kreiert Vorschaubilder für Videos welche Kapitel haben.",
+ "TaskRefreshChapterImages": "Extrahiert Kapitel-Bilder",
+ "TaskCleanCacheDescription": "Löscht Zwischenspeicherdatein die nicht länger von System gebraucht werden.",
+ "TaskCleanCache": "Leere Cache Pfad",
+ "TasksChannelsCategory": "Internet Kanäle",
+ "TasksApplicationCategory": "Anwendung",
+ "TasksLibraryCategory": "Bibliothek",
+ "TasksMaintenanceCategory": "Wartung"
}
From aa96f4322efc401c07a345a289dea8b9e60e043f Mon Sep 17 00:00:00 2001
From: nextlooper42
Date: Tue, 31 Mar 2020 15:13:34 +0000
Subject: [PATCH 87/95] Translated using Weblate (Slovak) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/sk/
---
.../Localization/Core/sk.json | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/sk.json b/Emby.Server.Implementations/Localization/Core/sk.json
index 11ead33d48..0ee652637c 100644
--- a/Emby.Server.Implementations/Localization/Core/sk.json
+++ b/Emby.Server.Implementations/Localization/Core/sk.json
@@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} ukončil prehrávanie {1} na {2}",
"ValueHasBeenAddedToLibrary": "{0} bol pridané do vašej knižnice médií",
"ValueSpecialEpisodeName": "Špeciál - {0}",
- "VersionNumber": "Verzia {0}"
+ "VersionNumber": "Verzia {0}",
+ "TaskDownloadMissingSubtitlesDescription": "Vyhľadá na internete chýbajúce titulky podľa toho, ako sú nakonfigurované metadáta.",
+ "TaskDownloadMissingSubtitles": "Stiahnuť chýbajúce titulky",
+ "TaskRefreshChannelsDescription": "Obnoví informácie o internetových kanáloch.",
+ "TaskRefreshChannels": "Obnoviť kanály",
+ "TaskCleanTranscodeDescription": "Vymaže súbory transkódovania, ktoré sú staršie ako jeden deň.",
+ "TaskCleanTranscode": "Vyčistiť priečinok pre transkódovanie",
+ "TaskUpdatePluginsDescription": "Stiahne a nainštaluje aktualizácie pre zásuvné moduly, ktoré sú nastavené tak, aby sa aktualizovali automaticky.",
+ "TaskUpdatePlugins": "Aktualizovať zásuvné moduly",
+ "TaskRefreshPeopleDescription": "Aktualizuje metadáta pre hercov a režisérov vo vašej mediálnej knižnici.",
+ "TaskRefreshPeople": "Obnoviť osoby",
+ "TaskCleanLogsDescription": "Vymaže log súbory, ktoré su staršie ako {0} deň/dni/dní.",
+ "TaskCleanLogs": "Vyčistiť priečinok s logmi",
+ "TaskRefreshLibraryDescription": "Hľadá vo vašej mediálnej knižnici nové súbory a obnovuje metadáta.",
+ "TaskRefreshLibrary": "Prehľadávať knižnicu medií",
+ "TaskRefreshChapterImagesDescription": "Vytvorí náhľady pre videá, ktoré majú kapitoly.",
+ "TaskRefreshChapterImages": "Extrahovať obrázky kapitol",
+ "TaskCleanCacheDescription": "Vymaže cache súbory, ktoré nie sú už potrebné pre systém.",
+ "TaskCleanCache": "Vyčistiť Cache priečinok",
+ "TasksChannelsCategory": "Internetové kanály",
+ "TasksApplicationCategory": "Aplikácia",
+ "TasksLibraryCategory": "Knižnica",
+ "TasksMaintenanceCategory": "Údržba"
}
From 861bad1edaec10fa03d2f7cf12bb8b7b6ae1802c Mon Sep 17 00:00:00 2001
From: Mark Monteiro
Date: Wed, 1 Apr 2020 13:26:47 +0200
Subject: [PATCH 88/95] Apply suggestions from code review
---
.../Extensions/ConfigurationExtensions.cs | 2 +-
MediaBrowser.WebDashboard/Api/DashboardService.cs | 14 --------------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
index c951499847..c0043c0efa 100644
--- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
+++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
@@ -29,7 +29,7 @@ namespace MediaBrowser.Controller.Extensions
public const string PlaylistsAllowDuplicatesKey = "playlists:allowDuplicates";
///
- /// Gets a value indicating whether the application should not host static web content from the .
+ /// Gets a value indicating whether the application should host static web content from the .
///
/// The configuration to retrieve the value from.
/// The parsed config value.
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 938ab513b5..133a35527d 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -135,20 +135,6 @@ namespace MediaBrowser.WebDashboard.Api
_serverConfigurationManager = serverConfigurationManager;
_fileSystem = fileSystem;
_resultFactory = resultFactory;
-
- // If hosting the web client, validate the client content path
- if (appConfig.HostWebClient())
- {
- string webContentPath = DashboardUIPath;
- if (!Directory.Exists(webContentPath) || Directory.GetFiles(webContentPath).Length == 0)
- {
- throw new InvalidOperationException(
- "The server is expected to host the web client, but the provided content directory is either " +
- $"invalid or empty: {webContentPath}. If you do not want to host the web client with the " +
- "server, you may set the '--nowebclient' command line flag, or set" +
- $"'{Controller.Extensions.ConfigurationExtensions.HostWebClientKey}=false' in your config settings.");
- }
- }
}
///
From 147e434634bda67ffeebd6db0790f5fd652b1fc9 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Wed, 1 Apr 2020 14:50:18 +0200
Subject: [PATCH 89/95] Try to not crash on unsupported plugin load
---
Emby.Server.Implementations/ApplicationHost.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index d6a572818a..f3540e25ee 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1167,7 +1167,7 @@ namespace Emby.Server.Implementations
{
exportedTypes = ass.GetExportedTypes();
}
- catch (TypeLoadException ex)
+ catch (FileNotFoundException ex)
{
Logger.LogError(ex, "Error getting exported types from {Assembly}", ass.FullName);
continue;
From 62a18af17ae363343470397a6a87255afa42dd5c Mon Sep 17 00:00:00 2001
From: Bond-009
Date: Wed, 1 Apr 2020 18:50:19 +0200
Subject: [PATCH 90/95] Update Emby.Dlna/Main/DlnaEntryPoint.cs
Co-Authored-By: Vasily
---
Emby.Dlna/Main/DlnaEntryPoint.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs
index ba416ce09a..c5d60b2a05 100644
--- a/Emby.Dlna/Main/DlnaEntryPoint.cs
+++ b/Emby.Dlna/Main/DlnaEntryPoint.cs
@@ -262,7 +262,7 @@ namespace Emby.Dlna.Main
{
if (address.AddressFamily == AddressFamily.InterNetworkV6)
{
- // Not support IPv6 right now
+ // Not supporting IPv6 right now
continue;
}
From 3ab50f5a3ff1d1e081b12cf7226fa23771e2f552 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Wed, 1 Apr 2020 19:05:41 +0200
Subject: [PATCH 91/95] Address comments
---
.../Api/NotificationsService.cs | 1 -
Emby.Notifications/CoreNotificationTypes.cs | 1 -
.../NotificationConfigurationFactory.cs | 1 -
.../LiveTv/EmbyTV/DirectRecorder.cs | 1 -
.../LiveTv/EmbyTV/EncodedRecorder.cs | 1 -
.../LiveTv/EmbyTV/EntryPoint.cs | 1 -
.../LiveTv/EmbyTV/IRecorder.cs | 1 -
.../LiveTv/EmbyTV/ItemDataProvider.cs | 1 -
.../LiveTv/EmbyTV/RecordingHelper.cs | 1 -
.../LiveTv/EmbyTV/SeriesTimerManager.cs | 1 -
.../LiveTv/EmbyTV/TimerManager.cs | 1 -
.../LiveTv/Listings/SchedulesDirect.cs | 1 -
.../LiveTv/Listings/XmlTvListingsProvider.cs | 1 -
.../LiveTv/LiveTvConfigurationFactory.cs | 1 -
.../LiveTv/LiveTvDtoService.cs | 1 -
.../LiveTv/LiveTvManager.cs | 1 -
.../LiveTv/LiveTvMediaSourceProvider.cs | 1 -
.../LiveTv/TunerHosts/BaseTunerHost.cs | 1 -
.../TunerHosts/HdHomerun/HdHomerunHost.cs | 1 -
.../TunerHosts/HdHomerun/HdHomerunManager.cs | 1 -
.../HdHomerun/HdHomerunUdpStream.cs | 1 -
.../LiveTv/TunerHosts/LiveStream.cs | 1 -
.../LiveTv/TunerHosts/M3UTunerHost.cs | 1 -
.../LiveTv/TunerHosts/M3uParser.cs | 1 -
.../LiveTv/TunerHosts/SharedHttpStream.cs | 1 -
.../MediaEncoder/EncodingManager.cs | 2 +-
MediaBrowser.Controller/Entities/Folder.cs | 1 -
.../Library/IMediaSourceProvider.cs | 1 -
.../MediaEncoding/IEncodingManager.cs | 1 -
.../Chapters/ChapterManager.cs | 1 -
.../Manager/ProviderManager.cs | 5 ++---
.../MediaBrowser.Providers.csproj | 1 -
.../MediaInfo/FFProbeVideoInfo.cs | 20 +++++++++----------
33 files changed, 13 insertions(+), 44 deletions(-)
diff --git a/Emby.Notifications/Api/NotificationsService.cs b/Emby.Notifications/Api/NotificationsService.cs
index f2f3818381..67401c1f5b 100644
--- a/Emby.Notifications/Api/NotificationsService.cs
+++ b/Emby.Notifications/Api/NotificationsService.cs
@@ -1,6 +1,5 @@
#pragma warning disable CS1591
#pragma warning disable SA1402
-#pragma warning disable SA1600
#pragma warning disable SA1649
using System;
diff --git a/Emby.Notifications/CoreNotificationTypes.cs b/Emby.Notifications/CoreNotificationTypes.cs
index 73e0b0256a..a602b72213 100644
--- a/Emby.Notifications/CoreNotificationTypes.cs
+++ b/Emby.Notifications/CoreNotificationTypes.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Notifications/NotificationConfigurationFactory.cs b/Emby.Notifications/NotificationConfigurationFactory.cs
index b168ed221b..3fb3553d0e 100644
--- a/Emby.Notifications/NotificationConfigurationFactory.cs
+++ b/Emby.Notifications/NotificationConfigurationFactory.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System.Collections.Generic;
using MediaBrowser.Common.Configuration;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
index 9c4f5fe3d8..e2bff97c81 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.IO;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
index 8590c56dfd..d24fc67922 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs
index a716b6240f..69a9cb78aa 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System.Threading.Tasks;
using MediaBrowser.Controller.Plugins;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs
index d6a1aee38b..4712724d67 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Threading;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
index 6d42a58f42..fc543dc551 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
index 4cb9f6fe88..0b0ff6cb31 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Globalization;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs
index 9cc53fddcd..194e4606de 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using MediaBrowser.Controller.LiveTv;
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs
index 330e881ef5..7ebb043d8e 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Concurrent;
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index e9d3105bf1..00f469d838 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Concurrent;
diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
index c159b60a91..609b397da8 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs b/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs
index 222fed9d92..ba916af389 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System.Collections.Generic;
using MediaBrowser.Common.Configuration;
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs
index 14b627f82e..6e903a18ef 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Globalization;
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index f20f6140e5..b64fe8634c 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
index 33887bbfd2..7f63991d0c 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
index 419ec3635a..80ee1ee33a 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Concurrent;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
index a2d972d19c..25b2c674c5 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs
index 56864ab116..57c5b75002 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Buffers;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
index 77669da39f..01f0dd885d 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
index 5354489f9c..93bd8034fb 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
index 46c77e7b0e..f5dda79db3 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs
index 511af150bb..59451fccd2 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs
index 8615183871..9ced65cca9 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
index 069c02b854..677d68b4c9 100644
--- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
+++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
@@ -155,7 +155,7 @@ namespace Emby.Server.Implementations.MediaEncoder
}
catch (IOException ex)
{
- _logger.LogError(ex, "Error deleting {Path}", tempFile);
+ _logger.LogError(ex, "Error deleting temporary chapter image encoding file {Path}", tempFile);
}
chapter.ImagePath = path;
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index 89ac8aea4b..bb48605e55 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/MediaBrowser.Controller/Library/IMediaSourceProvider.cs b/MediaBrowser.Controller/Library/IMediaSourceProvider.cs
index ec7798551b..5bf4acebb4 100644
--- a/MediaBrowser.Controller/Library/IMediaSourceProvider.cs
+++ b/MediaBrowser.Controller/Library/IMediaSourceProvider.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System.Collections.Generic;
using System.Threading;
diff --git a/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs b/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs
index 7063d39398..15a2580afd 100644
--- a/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs
+++ b/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System.Collections.Generic;
using System.Threading;
diff --git a/MediaBrowser.Providers/Chapters/ChapterManager.cs b/MediaBrowser.Providers/Chapters/ChapterManager.cs
index 242fc84f6e..3cbfe7d4d7 100644
--- a/MediaBrowser.Providers/Chapters/ChapterManager.cs
+++ b/MediaBrowser.Providers/Chapters/ChapterManager.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index 17d612199f..7125f34c55 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Concurrent;
@@ -976,10 +975,10 @@ namespace MediaBrowser.Providers.Manager
(_) => throw new Exception(
string.Format(
CultureInfo.InvariantCulture,
- "Refresh for item {0} {1} is not in progress",
+ "Cannot update refresh progress of item '{0}' ({1}) because a refresh for this item is not running",
item.GetType().Name,
item.Id.ToString("N", CultureInfo.InvariantCulture))),
- (_, _) => progress);
+ (_, __) => progress);
RefreshProgress?.Invoke(this, new GenericEventArgs>(new Tuple(item, progress)));
}
diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
index 1d11a3cc21..330a4d1e53 100644
--- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj
+++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj
@@ -22,7 +22,6 @@
netstandard2.1
false
true
- preview
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
index ea1db88ba4..d2e98a5a94 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
@@ -1,5 +1,4 @@
#pragma warning disable CS1591
-#pragma warning disable SA1600
using System;
using System.Collections.Generic;
@@ -47,9 +46,6 @@ namespace MediaBrowser.Providers.MediaInfo
private readonly ILibraryManager _libraryManager;
private readonly IMediaSourceManager _mediaSourceManager;
- ///
- /// The dummy chapter duration.
- ///
private readonly long _dummyChapterDuration = TimeSpan.FromMinutes(5).Ticks;
public FFProbeVideoInfo(
@@ -190,6 +186,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
video.RunTimeTicks = mediaInfo.RunTimeTicks;
}
+
video.Size = mediaInfo.Size;
if (video.VideoType == VideoType.VideoFile)
@@ -202,6 +199,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
video.Container = null;
}
+
video.Container = mediaInfo.Container;
chapters = mediaInfo.Chapters == null ? Array.Empty() : mediaInfo.Chapters;
@@ -246,7 +244,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
if (chapters.Length == 0 && mediaStreams.Any(i => i.Type == MediaStreamType.Video))
{
- CreateDummyChapters(video, ref chapters);
+ chapters = CreateDummyChapters(video);
}
NormalizeChapterNames(chapters);
@@ -563,11 +561,11 @@ namespace MediaBrowser.Providers.MediaInfo
}
///
- /// Adds the dummy chapters.
+ /// Creates dummy chapters.
///
/// The video.
- /// The chapters.
- private void CreateDummyChapters(Video video, ref ChapterInfo[] chapters)
+ /// An array of dummy chapters.
+ private ChapterInfo[] CreateDummyChapters(Video video)
{
var runtime = video.RunTimeTicks ?? 0;
@@ -583,12 +581,12 @@ namespace MediaBrowser.Providers.MediaInfo
if (runtime < _dummyChapterDuration)
{
- return;
+ return Array.Empty();
}
// Limit to 100 chapters just in case there's some incorrect metadata here
int chapterCount = (int)Math.Min(runtime / _dummyChapterDuration, 100);
- chapters = new ChapterInfo[chapterCount];
+ var chapters = new ChapterInfo[chapterCount];
long currentChapterTicks = 0;
for (int i = 0; i < chapterCount; i++)
@@ -600,6 +598,8 @@ namespace MediaBrowser.Providers.MediaInfo
currentChapterTicks += _dummyChapterDuration;
}
+
+ return chapters;
}
private string[] FetchFromDvdLib(Video item)
From 3c666aed4cfc622cf48d018c1854a7125cbda8ae Mon Sep 17 00:00:00 2001
From: Medzhnun
Date: Wed, 1 Apr 2020 11:29:50 +0000
Subject: [PATCH 92/95] Translated using Weblate (Bulgarian) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/bg/
---
.../Localization/Core/bg-BG.json | 28 +++++++++++++++++--
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/bg-BG.json b/Emby.Server.Implementations/Localization/Core/bg-BG.json
index 345f384605..3fc7c7dc0f 100644
--- a/Emby.Server.Implementations/Localization/Core/bg-BG.json
+++ b/Emby.Server.Implementations/Localization/Core/bg-BG.json
@@ -1,8 +1,8 @@
{
"Albums": "Албуми",
- "AppDeviceValues": "Програма: {0}, устройство: {1}",
+ "AppDeviceValues": "Програма: {0}, Устройство: {1}",
"Application": "Програма",
- "Artists": "Изпълнители",
+ "Artists": "Артисти",
"AuthenticationSucceededWithUserName": "{0} се удостовери успешно",
"Books": "Книги",
"CameraImageUploadedFrom": "Нова снимка от камера беше качена от {0}",
@@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} спря {1}",
"ValueHasBeenAddedToLibrary": "{0} беше добавен във Вашата библиотека",
"ValueSpecialEpisodeName": "Специални - {0}",
- "VersionNumber": "Версия {0}"
+ "VersionNumber": "Версия {0}",
+ "TaskDownloadMissingSubtitlesDescription": "Търси Интернет за липсващи поднадписи, на база конфигурацията за мета-данни.",
+ "TaskDownloadMissingSubtitles": "Изтегляне на липсващи поднадписи",
+ "TaskRefreshChannelsDescription": "Обновява информацията за интернет канала.",
+ "TaskRefreshChannels": "Обновяване на Канали",
+ "TaskCleanTranscodeDescription": "Изтрива прекодирани файлове по-стари от един ден.",
+ "TaskCleanTranscode": "Изчиства директорията за прекодиране",
+ "TaskUpdatePluginsDescription": "Изтегля и инсталира актуализации за добавките, които са настроени за автоматична актуализация.",
+ "TaskUpdatePlugins": "Актуализира добавките",
+ "TaskRefreshPeopleDescription": "Актуализира мета-данните за артистите и режисьорите за Вашата медийна библиотека.",
+ "TaskRefreshPeople": "Обновяване на участниците",
+ "TaskCleanLogsDescription": "Изтрива лог файлове по-стари от {0} дни.",
+ "TaskCleanLogs": "Изчисти директорията с логове",
+ "TaskRefreshLibraryDescription": "Сканира Вашата библиотека с медия за нови файлове и обновява мета-данните.",
+ "TaskRefreshLibrary": "Сканиране на библиотеката с медия",
+ "TaskRefreshChapterImagesDescription": "Създава иконки за видеа, които имат епизоди.",
+ "TaskRefreshChapterImages": "Извличане на изображения за епизода",
+ "TaskCleanCacheDescription": "Изтриване на ненужните от системата файлове.",
+ "TaskCleanCache": "Изчистване на Кеш-директорията",
+ "TasksChannelsCategory": "Интернет Канали",
+ "TasksApplicationCategory": "Приложение",
+ "TasksLibraryCategory": "Библиотека",
+ "TasksMaintenanceCategory": "Поддръжка"
}
From ab7771941aac54fde51f4c9870849f35c8a02b9f Mon Sep 17 00:00:00 2001
From: Louis Hermier
Date: Wed, 1 Apr 2020 16:59:12 +0000
Subject: [PATCH 93/95] Translated using Weblate (French) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fr/
---
.../Localization/Core/fr.json | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/fr.json b/Emby.Server.Implementations/Localization/Core/fr.json
index d93c803a35..88a7ac1906 100644
--- a/Emby.Server.Implementations/Localization/Core/fr.json
+++ b/Emby.Server.Implementations/Localization/Core/fr.json
@@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} vient d'arrêter la lecture de {1} sur {2}",
"ValueHasBeenAddedToLibrary": "{0} a été ajouté à votre médiathèque",
"ValueSpecialEpisodeName": "Spécial - {0}",
- "VersionNumber": "Version {0}"
+ "VersionNumber": "Version {0}",
+ "TasksChannelsCategory": "Chaines en ligne",
+ "TaskDownloadMissingSubtitlesDescription": "Cherche les sous-titres manquant sur internet en se basant sur la configuration des métadonnées.",
+ "TaskDownloadMissingSubtitles": "Télécharge les sous-titres manquant",
+ "TaskRefreshChannelsDescription": "Rafraîchit les informations des chaines en ligne.",
+ "TaskRefreshChannels": "Rafraîchit les chaines",
+ "TaskCleanTranscodeDescription": "Supprime les fichiers transcodés de plus d'un jour.",
+ "TaskCleanTranscode": "Nettoie les dossier des transcodages",
+ "TaskUpdatePluginsDescription": "Télécharge et installe les mises à jours des plugins configurés pour être mis à jour automatiquement.",
+ "TaskUpdatePlugins": "Mettre à jour les plugins",
+ "TaskRefreshPeopleDescription": "Met à jour les métadonnées pour les acteurs et directeurs dans votre bibliothèque.",
+ "TaskRefreshPeople": "Rafraîchit les acteurs",
+ "TaskCleanLogsDescription": "Supprime les journaux de plus de {0} jours.",
+ "TaskCleanLogs": "Nettoie le répertoire des journaux",
+ "TaskRefreshLibraryDescription": "Scanne toute les bibliothèques pour trouver les nouveaux fichiers et rafraîchit les métadonnées.",
+ "TaskRefreshLibrary": "Scanne toute les Bibliothèques",
+ "TaskRefreshChapterImagesDescription": "Crée des images de miniature pour les vidéos ayant des chapitres.",
+ "TaskRefreshChapterImages": "Extrait les images de chapitre",
+ "TaskCleanCacheDescription": "Supprime les fichiers de cache dont le système n'a plus besoin.",
+ "TaskCleanCache": "Vider le répertoire cache",
+ "TasksApplicationCategory": "Application",
+ "TasksLibraryCategory": "Bibliothèque",
+ "TasksMaintenanceCategory": "Maintenance"
}
From cd5289efcf4877b50bdf0bb031573bf345edf193 Mon Sep 17 00:00:00 2001
From: MG
Date: Wed, 1 Apr 2020 16:03:44 +0000
Subject: [PATCH 94/95] Translated using Weblate (Italian) Translation:
Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/it/
---
.../Localization/Core/it.json | 28 +++++++++++++++++--
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/it.json b/Emby.Server.Implementations/Localization/Core/it.json
index b9348e058f..0758bbe9ce 100644
--- a/Emby.Server.Implementations/Localization/Core/it.json
+++ b/Emby.Server.Implementations/Localization/Core/it.json
@@ -5,7 +5,7 @@
"Artists": "Artisti",
"AuthenticationSucceededWithUserName": "{0} autenticato con successo",
"Books": "Libri",
- "CameraImageUploadedFrom": "È stata caricata una nuova immagine della fotocamera da {0}",
+ "CameraImageUploadedFrom": "È stata caricata una nuova immagine della fotocamera dal device {0}",
"Channels": "Canali",
"ChapterNameValue": "Capitolo {0}",
"Collections": "Collezioni",
@@ -15,7 +15,7 @@
"Favorites": "Preferiti",
"Folders": "Cartelle",
"Genres": "Generi",
- "HeaderAlbumArtists": "Artisti dell' Album",
+ "HeaderAlbumArtists": "Artisti degli Album",
"HeaderCameraUploads": "Caricamenti Fotocamera",
"HeaderContinueWatching": "Continua a guardare",
"HeaderFavoriteAlbums": "Album Preferiti",
@@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} ha interrotto la riproduzione di {1} su {2}",
"ValueHasBeenAddedToLibrary": "{0} è stato aggiunto alla tua libreria multimediale",
"ValueSpecialEpisodeName": "Speciale - {0}",
- "VersionNumber": "Versione {0}"
+ "VersionNumber": "Versione {0}",
+ "TaskRefreshChannelsDescription": "Aggiorna le informazioni dei canali Internet.",
+ "TaskDownloadMissingSubtitlesDescription": "Cerca su internet i sottotitoli mancanti basandosi sulle configurazioni dei metadati.",
+ "TaskDownloadMissingSubtitles": "Scarica i sottotitoli mancanti",
+ "TaskRefreshChannels": "Aggiorna i canali",
+ "TaskCleanTranscodeDescription": "Cancella i file di transcode più vecchi di un giorno.",
+ "TaskCleanTranscode": "Svuota la cartella del transcoding",
+ "TaskUpdatePluginsDescription": "Scarica e installa gli aggiornamenti per i plugin che sono stati configurati per essere aggiornati contemporaneamente.",
+ "TaskUpdatePlugins": "Aggiorna i Plugin",
+ "TaskRefreshPeopleDescription": "Aggiorna i metadati per gli attori e registi nella tua libreria multimediale.",
+ "TaskRefreshPeople": "Aggiorna persone",
+ "TaskCleanLogsDescription": "Rimuovi i file di log più vecchi di {0} giorni.",
+ "TaskCleanLogs": "Pulisci la cartella dei log",
+ "TaskRefreshLibraryDescription": "Analizza la tua libreria multimediale per nuovi file e rinnova i metadati.",
+ "TaskRefreshLibrary": "Analizza la libreria dei contenuti multimediali",
+ "TaskRefreshChapterImagesDescription": "Crea le thumbnail per i video che hanno capitoli.",
+ "TaskRefreshChapterImages": "Estrai immagini capitolo",
+ "TaskCleanCacheDescription": "Cancella i file di cache non più necessari al sistema.",
+ "TaskCleanCache": "Pulisci la directory della cache",
+ "TasksChannelsCategory": "Canali su Internet",
+ "TasksApplicationCategory": "Applicazione",
+ "TasksLibraryCategory": "Libreria",
+ "TasksMaintenanceCategory": "Manutenzione"
}
From 5804873d3875e1034858d90e48d9a9865511c087 Mon Sep 17 00:00:00 2001
From: Vitorvlv
Date: Wed, 1 Apr 2020 18:25:46 +0000
Subject: [PATCH 95/95] Translated using Weblate (Portuguese (Brazil))
Translation: Jellyfin/Jellyfin Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_BR/
---
.../Localization/Core/pt-BR.json | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/pt-BR.json b/Emby.Server.Implementations/Localization/Core/pt-BR.json
index 10ca4f9326..3a69b6d7a5 100644
--- a/Emby.Server.Implementations/Localization/Core/pt-BR.json
+++ b/Emby.Server.Implementations/Localization/Core/pt-BR.json
@@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} parou de reproduzir {1} em {2}",
"ValueHasBeenAddedToLibrary": "{0} foi adicionado à sua biblioteca de mídia",
"ValueSpecialEpisodeName": "Especial - {0}",
- "VersionNumber": "Versão {0}"
+ "VersionNumber": "Versão {0}",
+ "TaskDownloadMissingSubtitlesDescription": "Procurar na internet por legendas faltando baseado na configuração de metadados.",
+ "TaskDownloadMissingSubtitles": "Baixar legendas que estão faltando",
+ "TaskRefreshChannelsDescription": "Atualizar informação de canais da internet .",
+ "TaskRefreshChannels": "Atualizar Canais",
+ "TaskCleanTranscodeDescription": "Deletar arquivos de transcodificação com mais de um dia de criação.",
+ "TaskCleanTranscode": "Limpar pasta de transcodificação",
+ "TaskUpdatePluginsDescription": "Baixa e instala atualizações para plugins que estão configurados para atualizar automaticamente.",
+ "TaskUpdatePlugins": "Atualizar Plugins",
+ "TaskRefreshPeopleDescription": "Atualiza metadados para atores e diretores na sua biblioteca de mídia.",
+ "TaskRefreshPeople": "Atualizar pessoas",
+ "TaskCleanLogsDescription": "Deletar arquivos temporários com mais de {0} dias.",
+ "TaskCleanLogs": "Limpar pasta de logs",
+ "TaskRefreshLibraryDescription": "Escaneie a sua biblioteca de mídia para arquivos novos e atualize os metadados.",
+ "TaskRefreshLibrary": "Escanear a Biblioteca de Mídia",
+ "TaskRefreshChapterImagesDescription": "Criar miniaturas para vídeos que tem capítulos.",
+ "TaskRefreshChapterImages": "Extrair imagens dos capítulos",
+ "TaskCleanCacheDescription": "Deletar arquivos temporários que não são mais necessários para o sistema.",
+ "TaskCleanCache": "Limpar Arquivos Temporários",
+ "TasksChannelsCategory": "Canais da Internet",
+ "TasksApplicationCategory": "Aplicativo",
+ "TasksLibraryCategory": "Biblioteca",
+ "TasksMaintenanceCategory": "Manutenção"
}