The Free Software Media System - Server Backend & API
fix recording button
Luke Pulverentif511cb70ad8d
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.csindex 3da12cd806..2179c5ecd7 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs@@ -118,6 +118,11 @@ namespace MediaBrowser.Controller.LiveTvreturn System.IO.Path.Combine(basePath, "livetv", Id.ToString("N"));}+ public override bool CanDelete()+ {+ return true;+ }+public override bool IsAuthorizedToDelete(User user){return user.Policy.EnableLiveTvManagement;diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.csindex 179c33d09f..aaaff6bdb9 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs@@ -116,6 +116,11 @@ namespace MediaBrowser.Controller.LiveTvreturn System.IO.Path.Combine(basePath, "livetv", Id.ToString("N"));}+ public override bool CanDelete()+ {+ return true;+ }+public override bool IsAuthorizedToDelete(User user){return user.Policy.EnableLiveTvManagement;diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.jsonindex 444c186aa0..f26c8903a7 100644--- a/MediaBrowser.Server.Implementations/Localization/Server/server.json+++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json@@ -1458,5 +1458,6 @@"LabelEmail": "Email:","LabelUsername": "Username:","HeaderSignUp": "Sign Up",- "LabelPasswordConfirm": "Password (confirm):"+ "LabelPasswordConfirm": "Password (confirm):",+ "ButtonAddServer": "Add Server"}diff --git a/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs b/MediaBrowser.Server.Implementations/Session/HttpSessionController.csindex 9a7fb33dfb..b841f0216a 100644--- a/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs+++ b/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs@@ -24,9 +24,6 @@ namespace MediaBrowser.Server.Implementations.Sessionprivate readonly string _postUrl;- private Timer _pingTimer;- private DateTime _lastPingTime;-public HttpSessionController(IHttpClient httpClient,IJsonSerializer json,SessionInfo session,@@ -37,10 +34,6 @@ namespace MediaBrowser.Server.Implementations.SessionSession = session;_postUrl = postUrl;_sessionManager = sessionManager;-- _pingTimer = new Timer(PingTimerCallback, null, Timeout.Infinite, Timeout.Infinite);-- ResetPingTimer();}public void OnActivity()@@ -59,7 +52,7 @@ namespace MediaBrowser.Server.Implementations.Session{get{- return (DateTime.UtcNow - Session.LastActivityDate).TotalMinutes <= 20;+ return (DateTime.UtcNow - Session.LastActivityDate).TotalMinutes <= 10;}}@@ -68,54 +61,6 @@ namespace MediaBrowser.Server.Implementations.Sessionget { return true; }}- private async void PingTimerCallback(object state)- {- try- {- await SendMessage("Ping", CancellationToken.None).ConfigureAwait(false);-- _lastPingTime = DateTime.UtcNow;- }- catch- {- var lastActivityDate = new[] { _lastPingTime, Session.LastActivityDate }- .Max();-- var timeSinceLastPing = DateTime.UtcNow - lastActivityDate;-- // We don't want to stop the session due to one single request failure- // At the same time, we don't want the timeout to be too long because it will- // be sitting in active sessions available for remote control, when it's not- if (timeSinceLastPing >= TimeSpan.FromMinutes(5))- {- ReportSessionEnded();- }- }- }-- private void ReportSessionEnded()- {- try- {- _sessionManager.ReportSessionEnded(Session.Id);- }- catch (Exception ex)- {- }- }-- private void ResetPingTimer()- {- if (_pingTimer != null)- {- _lastPingTime = DateTime.UtcNow;-- var period = TimeSpan.FromSeconds(60);-- _pingTimer.Change(period, period);- }- }-private Task SendMessage(string name, CancellationToken cancellationToken){return SendMessage(name, new Dictionary<string, string>(), cancellationToken);@@ -133,8 +78,6 @@ namespace MediaBrowser.Server.Implementations.SessionCancellationToken = cancellationToken}).ConfigureAwait(false);-- ResetPingTimer();}public Task SendSessionEndedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken)@@ -237,16 +180,6 @@ namespace MediaBrowser.Server.Implementations.Sessionpublic void Dispose(){- DisposePingTimer();- }-- private void DisposePingTimer()- {- if (_pingTimer != null)- {- _pingTimer.Dispose();- _pingTimer = null;- }}}}diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.csindex fd353962a0..f29807890d 100644--- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs+++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs@@ -449,7 +449,6 @@ namespace MediaBrowser.WebDashboard.Apiawait AppendResource(memoryStream, "bower_components/webcomponentsjs/webcomponents-lite.min.js", newLineBytes).ConfigureAwait(false);- // jQuery + jQuery mobileawait AppendResource(memoryStream, "thirdparty/jquery-2.1.1.min.js", newLineBytes).ConfigureAwait(false);await AppendResource(memoryStream, "thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.min.js", newLineBytes).ConfigureAwait(false);@@ -657,7 +656,6 @@ namespace MediaBrowser.WebDashboard.Api"mediaplayer-video.css","librarymenu.css","librarybrowser.css",- "detailtable.css","card.css","tileitem.css","metadataeditor.css",