aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorartiume <siderite@gmail.com>2020-01-28 21:41:52 -0500
committerGitHub <noreply@github.com>2020-01-28 21:41:52 -0500
commitd4470b5709eaddae12c0096634bd47d7f9ec0b97 (patch)
tree69fbd6ffaf0776b964fa963dec9240ffbe6a2d77
parenta012a4574fa1940ca3067aebd5c5654ff5f45cef (diff)
parent81fae5932bcd157cba559520504019fbe90451e2 (diff)
Merge pull request #9 from jellyfin/master
nightly
-rw-r--r--Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs128
-rw-r--r--Emby.Server.Implementations/Localization/Core/ar.json8
-rw-r--r--Emby.Server.Implementations/Localization/Core/fil.json95
-rw-r--r--Emby.Server.Implementations/Localization/Core/gl.json1
-rw-r--r--Jellyfin.Server/Program.cs2
-rw-r--r--Jellyfin.Server/Resources/Configuration/logging.json2
-rw-r--r--MediaBrowser.Controller/Entities/UserRootFolder.cs9
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs2
-rw-r--r--MediaBrowser.Model/Dto/MediaSourceInfo.cs5
-rwxr-xr-xdeployment/linux-x64/docker-build.sh2
-rwxr-xr-xdeployment/macos/docker-build.sh2
-rwxr-xr-xdeployment/portable/docker-build.sh2
-rwxr-xr-xdeployment/win-x64/docker-build.sh2
-rwxr-xr-xdeployment/win-x86/docker-build.sh2
14 files changed, 109 insertions, 153 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs
deleted file mode 100644
index a6eb1152f..000000000
--- a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-#pragma warning disable CS1591
-#pragma warning disable SA1600
-
-using System;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using MediaBrowser.Controller;
-using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Controller.LiveTv;
-using MediaBrowser.Controller.Plugins;
-using MediaBrowser.Controller.Session;
-using MediaBrowser.Model.LiveTv;
-using MediaBrowser.Model.Tasks;
-using Microsoft.Extensions.Logging;
-
-namespace Emby.Server.Implementations.EntryPoints
-{
- public class AutomaticRestartEntryPoint : IServerEntryPoint
- {
- private readonly IServerApplicationHost _appHost;
- private readonly ILogger _logger;
- private readonly ITaskManager _iTaskManager;
- private readonly ISessionManager _sessionManager;
- private readonly IServerConfigurationManager _config;
- private readonly ILiveTvManager _liveTvManager;
-
- private Timer _timer;
-
- public AutomaticRestartEntryPoint(IServerApplicationHost appHost, ILogger logger, ITaskManager iTaskManager, ISessionManager sessionManager, IServerConfigurationManager config, ILiveTvManager liveTvManager)
- {
- _appHost = appHost;
- _logger = logger;
- _iTaskManager = iTaskManager;
- _sessionManager = sessionManager;
- _config = config;
- _liveTvManager = liveTvManager;
- }
-
- public Task RunAsync()
- {
- if (_appHost.CanSelfRestart)
- {
- _appHost.HasPendingRestartChanged += _appHost_HasPendingRestartChanged;
- }
-
- return Task.CompletedTask;
- }
-
- void _appHost_HasPendingRestartChanged(object sender, EventArgs e)
- {
- DisposeTimer();
-
- if (_appHost.HasPendingRestart)
- {
- _timer = new Timer(TimerCallback, null, TimeSpan.FromMinutes(15), TimeSpan.FromMinutes(15));
- }
- }
-
- private async void TimerCallback(object state)
- {
- if (_config.Configuration.EnableAutomaticRestart)
- {
- var isIdle = await IsIdle().ConfigureAwait(false);
-
- if (isIdle)
- {
- DisposeTimer();
-
- _logger.LogInformation("Automatically restarting the system because it is idle and a restart is required.");
-
- try
- {
- _appHost.Restart();
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, "Error restarting server");
- }
- }
- }
- }
-
- private async Task<bool> IsIdle()
- {
- if (_iTaskManager.ScheduledTasks.Any(i => i.State != TaskState.Idle))
- {
- return false;
- }
-
- if (_liveTvManager.Services.Count == 1)
- {
- try
- {
- var timers = await _liveTvManager.GetTimers(new TimerQuery(), CancellationToken.None).ConfigureAwait(false);
- if (timers.Items.Any(i => i.Status == RecordingStatus.InProgress))
- {
- return false;
- }
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, "Error getting timers");
- }
- }
-
- var now = DateTime.UtcNow;
-
- return !_sessionManager.Sessions.Any(i => (now - i.LastActivityDate).TotalMinutes < 30);
- }
-
- public void Dispose()
- {
- _appHost.HasPendingRestartChanged -= _appHost_HasPendingRestartChanged;
-
- DisposeTimer();
- }
-
- private void DisposeTimer()
- {
- if (_timer != null)
- {
- _timer.Dispose();
- _timer = null;
- }
- }
- }
-}
diff --git a/Emby.Server.Implementations/Localization/Core/ar.json b/Emby.Server.Implementations/Localization/Core/ar.json
index 8932bd0d7..f0f165b22 100644
--- a/Emby.Server.Implementations/Localization/Core/ar.json
+++ b/Emby.Server.Implementations/Localization/Core/ar.json
@@ -9,7 +9,7 @@
"Channels": "القنوات",
"ChapterNameValue": "الباب {0}",
"Collections": "مجموعات",
- "DeviceOfflineWithName": " قُطِع الاتصال بـ{0}",
+ "DeviceOfflineWithName": "تم قطع اتصال {0}",
"DeviceOnlineWithName": "{0} متصل",
"FailedLoginAttemptWithUserName": "عملية تسجيل الدخول فشلت من {0}",
"Favorites": "التفضيلات",
@@ -75,8 +75,8 @@
"Songs": "الأغاني",
"StartupEmbyServerIsLoading": "سيرفر Jellyfin قيد التشغيل . الرجاء المحاولة بعد قليل.",
"SubtitleDownloadFailureForItem": "عملية إنزال الترجمة فشلت لـ{0}",
- "SubtitleDownloadFailureFromForItem": "الترجمات فشلت في التحميل من {0} لـ {1}",
- "SubtitlesDownloadedForItem": "تم تحميل الترجمات لـ {0}",
+ "SubtitleDownloadFailureFromForItem": "الترجمات فشلت في التحميل من {0} الى {1}",
+ "SubtitlesDownloadedForItem": "تم تحميل الترجمات الى {0}",
"Sync": "مزامنة",
"System": "النظام",
"TvShows": "البرامج التلفزيونية",
@@ -88,7 +88,7 @@
"UserOfflineFromDevice": "تم قطع اتصال {0} من {1}",
"UserOnlineFromDevice": "{0} متصل عبر {1}",
"UserPasswordChangedWithName": "تم تغيير كلمة السر للمستخدم {0}",
- "UserPolicyUpdatedWithName": "سياسة المستخدمين تم تحديثها لـ {0}",
+ "UserPolicyUpdatedWithName": "تم تحديث سياسة المستخدم {0}",
"UserStartedPlayingItemWithValues": "قام {0} ببدء تشغيل {1} على {2}",
"UserStoppedPlayingItemWithValues": "قام {0} بإيقاف تشغيل {1} على {2}",
"ValueHasBeenAddedToLibrary": "{0} تم اضافتها الى مكتبة الوسائط",
diff --git a/Emby.Server.Implementations/Localization/Core/fil.json b/Emby.Server.Implementations/Localization/Core/fil.json
new file mode 100644
index 000000000..66db059d9
--- /dev/null
+++ b/Emby.Server.Implementations/Localization/Core/fil.json
@@ -0,0 +1,95 @@
+{
+ "VersionNumber": "Bersyon {0}",
+ "ValueSpecialEpisodeName": "Espesyal - {0}",
+ "ValueHasBeenAddedToLibrary": "Naidagdag na ang {0} sa iyong media library",
+ "UserStoppedPlayingItemWithValues": "Natapos ni {0} ang {1} sa {2}",
+ "UserStartedPlayingItemWithValues": "Si {0} ay nagplaplay ng {1} sa {2}",
+ "UserPolicyUpdatedWithName": "Ang user policy ay naiupdate para kay {0}",
+ "UserPasswordChangedWithName": "Napalitan na ang password ni {0}",
+ "UserOnlineFromDevice": "Si {0} ay nakakonekta galing sa {1}",
+ "UserOfflineFromDevice": "Si {0} ay nadiskonekta galing sa {1}",
+ "UserLockedOutWithName": "Si {0} ay nalock out",
+ "UserDownloadingItemWithValues": "Nagdadownload si {0} ng {1}",
+ "UserDeletedWithName": "Natanggal na is user {0}",
+ "UserCreatedWithName": "Nagawa na si user {0}",
+ "User": "User",
+ "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",
+ "Shows": "Pelikula",
+ "ServerNameNeedsToBeRestarted": "Kailangan irestart ang {0}",
+ "ScheduledTaskStartedWithName": "Nagsimula na ang {0}",
+ "ScheduledTaskFailedWithName": "Hindi gumana and {0}",
+ "ProviderValue": "Ang provider ay {0}",
+ "PluginUpdatedWithName": "Naiupdate na ang {0}",
+ "PluginUninstalledWithName": "Naiuninstall na ang {0}",
+ "PluginInstalledWithName": "Nainstall na ang {0}",
+ "Plugin": "Plugin",
+ "Playlists": "Playlists",
+ "Photos": "Larawan",
+ "NotificationOptionVideoPlaybackStopped": "Huminto na ang pelikula",
+ "NotificationOptionVideoPlayback": "Nagsimula na ang pelikula",
+ "NotificationOptionUserLockedOut": "Nakalock out ang user",
+ "NotificationOptionTaskFailed": "Hindi gumana ang scheduled task",
+ "NotificationOptionServerRestartRequired": "Kailangan irestart ang server",
+ "NotificationOptionPluginUpdateInstalled": "Naiupdate na ang plugin",
+ "NotificationOptionPluginUninstalled": "Naiuninstall na ang plugin",
+ "NotificationOptionPluginInstalled": "Nainstall na ang plugin",
+ "NotificationOptionPluginError": "Hindi gumagana ang plugin",
+ "NotificationOptionNewLibraryContent": "May bagong content na naidagdag",
+ "NotificationOptionInstallationFailed": "Hindi nainstall ng mabuti",
+ "NotificationOptionCameraImageUploaded": "Naiupload na ang picture",
+ "NotificationOptionAudioPlaybackStopped": "Huminto na ang patugtog",
+ "NotificationOptionAudioPlayback": "Nagsimula na ang patugtog",
+ "NotificationOptionApplicationUpdateInstalled": "Naiupdate na ang aplikasyon",
+ "NotificationOptionApplicationUpdateAvailable": "May bagong update ang aplikasyon",
+ "NewVersionIsAvailable": "May bagong version ng Jellyfin Server na pwede idownload.",
+ "NameSeasonUnknown": "Hindi alam ang season",
+ "NameSeasonNumber": "Season {0}",
+ "NameInstallFailed": "Hindi nainstall ang {0}",
+ "MusicVideos": "Music video",
+ "Music": "Kanta",
+ "Movies": "Pelikula",
+ "MixedContent": "Halo-halong content",
+ "MessageServerConfigurationUpdated": "Naiupdate na ang server configuration",
+ "MessageNamedServerConfigurationUpdatedWithValue": "Naiupdate na ang server configuration section {0}",
+ "MessageApplicationUpdatedTo": "Ang Jellyfin Server ay naiupdate to {0}",
+ "MessageApplicationUpdated": "Naiupdate na ang Jellyfin Server",
+ "Latest": "Pinakabago",
+ "LabelRunningTimeValue": "Oras: {0}",
+ "LabelIpAddressValue": "Ang IP Address ay {0}",
+ "ItemRemovedWithName": "Naitanggal ang {0} sa library",
+ "ItemAddedWithName": "Naidagdag ang {0} sa library",
+ "Inherit": "Manahin",
+ "HeaderRecordingGroups": "Pagtatalang Grupo",
+ "HeaderNextUp": "Susunod",
+ "HeaderLiveTV": "Live TV",
+ "HeaderFavoriteSongs": "Paboritong Kanta",
+ "HeaderFavoriteShows": "Paboritong Pelikula",
+ "HeaderFavoriteEpisodes": "Paboritong Episodes",
+ "HeaderFavoriteArtists": "Paboritong Artista",
+ "HeaderFavoriteAlbums": "Paboritong Albums",
+ "HeaderContinueWatching": "Ituloy Manood",
+ "HeaderCameraUploads": "Camera Uploads",
+ "HeaderAlbumArtists": "Artista ng Album",
+ "Genres": "Kategorya",
+ "Folders": "Folders",
+ "Favorites": "Paborito",
+ "FailedLoginAttemptWithUserName": "maling login galing {0}",
+ "DeviceOnlineWithName": "nakakonekta si {0}",
+ "DeviceOfflineWithName": "nadiskonekta si {0}",
+ "Collections": "Koleksyon",
+ "ChapterNameValue": "Kabanata {0}",
+ "Channels": "Channel",
+ "CameraImageUploadedFrom": "May bagong larawan na naupload galing {0}",
+ "Books": "Libro",
+ "AuthenticationSucceededWithUserName": "{0} na patunayan",
+ "Artists": "Artista",
+ "Application": "Aplikasyon",
+ "AppDeviceValues": "Aplikasyon: {0}, Aparato: {1}",
+ "Albums": "Albums"
+}
diff --git a/Emby.Server.Implementations/Localization/Core/gl.json b/Emby.Server.Implementations/Localization/Core/gl.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/Emby.Server.Implementations/Localization/Core/gl.json
@@ -0,0 +1 @@
+{}
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index fa9b62674..2638d5bfa 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -485,7 +485,7 @@ namespace Jellyfin.Server
.WriteTo.Async(x => x.File(
Path.Combine(appPaths.LogDirectoryPath, "log_.log"),
rollingInterval: RollingInterval.Day,
- outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}:{Message}{NewLine}{Exception}"))
+ outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}"))
.Enrich.FromLogContext()
.Enrich.WithThreadId()
.CreateLogger();
diff --git a/Jellyfin.Server/Resources/Configuration/logging.json b/Jellyfin.Server/Resources/Configuration/logging.json
index e9f71afd4..acbca8b85 100644
--- a/Jellyfin.Server/Resources/Configuration/logging.json
+++ b/Jellyfin.Server/Resources/Configuration/logging.json
@@ -20,7 +20,7 @@
"retainedFileCountLimit": 3,
"rollOnFileSizeLimit": true,
"fileSizeLimitBytes": 100000000,
- "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}:{Message}{NewLine}{Exception}"
+ "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}"
}
}
]
diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs
index 7fcf48a48..8a68f830c 100644
--- a/MediaBrowser.Controller/Entities/UserRootFolder.cs
+++ b/MediaBrowser.Controller/Entities/UserRootFolder.cs
@@ -60,14 +60,7 @@ namespace MediaBrowser.Controller.Entities
PresetViews = query.PresetViews
});
- var itemsArray = result;
- var totalCount = itemsArray.Length;
-
- return new QueryResult<BaseItem>
- {
- TotalRecordCount = totalCount,
- Items = itemsArray //TODO Fix The co-variant conversion between Folder[] and BaseItem[], this can generate runtime issues.
- };
+ return UserViewBuilder.SortAndPage(result, null, query, LibraryManager, true);
}
public override int GetChildCount(User user)
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index cf6d9c2f6..598ff3a80 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -159,7 +159,6 @@ namespace MediaBrowser.Model.Configuration
public MetadataOptions[] MetadataOptions { get; set; }
- public bool EnableAutomaticRestart { get; set; }
public bool SkipDeserializationForBasicTypes { get; set; }
public string ServerName { get; set; }
@@ -249,7 +248,6 @@ namespace MediaBrowser.Model.Configuration
EnableDashboardResponseCaching = true;
EnableCaseSensitiveItemIds = true;
- EnableAutomaticRestart = true;
AutoRunWebApp = true;
EnableRemoteAccess = true;
diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs
index 16a212a81..563865ebe 100644
--- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs
+++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs
@@ -210,10 +210,7 @@ namespace MediaBrowser.Model.Dto
{
if (currentStream.Type == MediaStreamType.Audio && currentStream.IsDefault)
{
- if (currentStream.Index != stream.Index)
- {
- return true;
- }
+ return currentStream.Index != stream.Index;
}
}
diff --git a/deployment/linux-x64/docker-build.sh b/deployment/linux-x64/docker-build.sh
index 8860f943c..e33328a36 100755
--- a/deployment/linux-x64/docker-build.sh
+++ b/deployment/linux-x64/docker-build.sh
@@ -26,7 +26,7 @@ rm -rf ${web_build_dir}
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
# Build archives
-dotnet publish --configuration Release --self-contained --runtime linux-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
+dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime linux-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
tar -cvzf /jellyfin_${version}.portable.tar.gz -C /dist jellyfin_${version}
rm -rf /dist/jellyfin_${version}
diff --git a/deployment/macos/docker-build.sh b/deployment/macos/docker-build.sh
index 1b4a554e6..f9417388d 100755
--- a/deployment/macos/docker-build.sh
+++ b/deployment/macos/docker-build.sh
@@ -26,7 +26,7 @@ rm -rf ${web_build_dir}
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
# Build archives
-dotnet publish --configuration Release --self-contained --runtime osx-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
+dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime osx-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
tar -cvzf /jellyfin_${version}.portable.tar.gz -C /dist jellyfin_${version}
rm -rf /dist/jellyfin_${version}
diff --git a/deployment/portable/docker-build.sh b/deployment/portable/docker-build.sh
index 0cc6e84f0..094190bbf 100755
--- a/deployment/portable/docker-build.sh
+++ b/deployment/portable/docker-build.sh
@@ -26,7 +26,7 @@ rm -rf ${web_build_dir}
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
# Build archives
-dotnet publish --configuration Release --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
+dotnet publish Jellyfin.Server --configuration Release --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
tar -cvzf /jellyfin_${version}.portable.tar.gz -C /dist jellyfin_${version}
rm -rf /dist/jellyfin_${version}
diff --git a/deployment/win-x64/docker-build.sh b/deployment/win-x64/docker-build.sh
index 77372a66f..79e5fb0bc 100755
--- a/deployment/win-x64/docker-build.sh
+++ b/deployment/win-x64/docker-build.sh
@@ -32,7 +32,7 @@ rm -rf ${web_build_dir}
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
# Build binary
-dotnet publish --configuration Release --self-contained --runtime win-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
+dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime win-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
# Prepare addins
addin_build_dir="$( mktemp -d )"
diff --git a/deployment/win-x86/docker-build.sh b/deployment/win-x86/docker-build.sh
index dd411756a..977dcf78f 100755
--- a/deployment/win-x86/docker-build.sh
+++ b/deployment/win-x86/docker-build.sh
@@ -32,7 +32,7 @@ rm -rf ${web_build_dir}
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
# Build binary
-dotnet publish --configuration Release --self-contained --runtime win-x86 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
+dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime win-x86 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
# Prepare addins
addin_build_dir="$( mktemp -d )"