aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/SyncPlay/TimeSyncService.cs
diff options
context:
space:
mode:
authorAnthony Lavado <anthony@lavado.ca>2020-08-08 13:22:36 -0400
committerGitHub <noreply@github.com>2020-08-08 13:22:36 -0400
commitb9fdbaeef326a06ba824cbb78a91f58afc535aab (patch)
tree915b3f9e787cde081af88465bf9c3f20228be3f3 /MediaBrowser.Api/SyncPlay/TimeSyncService.cs
parent7e49358ba9c1fcf12f9e7b30601a9df568a65242 (diff)
parenta15be774ac606ec71f3ab0849a56ae08b8cc2f4d (diff)
Merge pull request #3812 from jellyfin/api-migration
Merge API Migration into master
Diffstat (limited to 'MediaBrowser.Api/SyncPlay/TimeSyncService.cs')
-rw-r--r--MediaBrowser.Api/SyncPlay/TimeSyncService.cs52
1 files changed, 0 insertions, 52 deletions
diff --git a/MediaBrowser.Api/SyncPlay/TimeSyncService.cs b/MediaBrowser.Api/SyncPlay/TimeSyncService.cs
deleted file mode 100644
index 4a9307e62..000000000
--- a/MediaBrowser.Api/SyncPlay/TimeSyncService.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Controller.Net;
-using MediaBrowser.Model.Services;
-using MediaBrowser.Model.SyncPlay;
-using Microsoft.Extensions.Logging;
-
-namespace MediaBrowser.Api.SyncPlay
-{
- [Route("/GetUtcTime", "GET", Summary = "Get UtcTime")]
- public class GetUtcTime : IReturnVoid
- {
- // Nothing
- }
-
- /// <summary>
- /// Class TimeSyncService.
- /// </summary>
- public class TimeSyncService : BaseApiService
- {
- public TimeSyncService(
- ILogger<TimeSyncService> logger,
- IServerConfigurationManager serverConfigurationManager,
- IHttpResultFactory httpResultFactory)
- : base(logger, serverConfigurationManager, httpResultFactory)
- {
- // Do nothing
- }
-
- /// <summary>
- /// Handles the specified request.
- /// </summary>
- /// <param name="request">The request.</param>
- /// <value>The current UTC time response.</value>
- public UtcTimeResponse Get(GetUtcTime request)
- {
- // Important to keep the following line at the beginning
- var requestReceptionTime = DateTime.UtcNow.ToUniversalTime().ToString("o");
-
- var response = new UtcTimeResponse();
- response.RequestReceptionTime = requestReceptionTime;
-
- // Important to keep the following two lines at the end
- var responseTransmissionTime = DateTime.UtcNow.ToUniversalTime().ToString("o");
- response.ResponseTransmissionTime = responseTransmissionTime;
-
- // Implementing NTP on such a high level results in this useless
- // information being sent. On the other hand it enables future additions.
- return response;
- }
- }
-}