aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-06-23 18:13:06 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-06-23 18:13:06 -0400
commitf511cb70ad8de9adbb267bc80a693d2e74b330ac (patch)
tree0c559dd18ab9c2033e8053254536595010a9b0b7
parent72752fc5596e37c32c47de9bfb4cd0c0f22976c5 (diff)
fix recording button
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs5
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs5
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Server/server.json3
-rw-r--r--MediaBrowser.Server.Implementations/Session/HttpSessionController.cs69
-rw-r--r--MediaBrowser.WebDashboard/Api/PackageCreator.cs2
5 files changed, 13 insertions, 71 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index 3da12cd80..2179c5ecd 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -118,6 +118,11 @@ namespace MediaBrowser.Controller.LiveTv
return 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.cs
index 179c33d09..aaaff6bdb 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -116,6 +116,11 @@ namespace MediaBrowser.Controller.LiveTv
return 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.json
index 444c186aa..f26c8903a 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.cs
index 9a7fb33df..b841f0216 100644
--- a/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs
+++ b/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs
@@ -24,9 +24,6 @@ namespace MediaBrowser.Server.Implementations.Session
private 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.Session
Session = 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.Session
get { 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.Session
CancellationToken = cancellationToken
}).ConfigureAwait(false);
-
- ResetPingTimer();
}
public Task SendSessionEndedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken)
@@ -237,16 +180,6 @@ namespace MediaBrowser.Server.Implementations.Session
public 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.cs
index fd353962a..f29807890 100644
--- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs
+++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs
@@ -449,7 +449,6 @@ namespace MediaBrowser.WebDashboard.Api
await AppendResource(memoryStream, "bower_components/webcomponentsjs/webcomponents-lite.min.js", newLineBytes).ConfigureAwait(false);
- // jQuery + jQuery mobile
await 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",