From 84062573496db136fb011c598fee7b3de129e070 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 24 Aug 2014 23:54:45 -0400 Subject: update translations --- .../EntryPoints/UsageEntryPoint.cs | 1 - .../EntryPoints/WanAddressEntryPoint.cs | 55 ---------------------- 2 files changed, 56 deletions(-) delete mode 100644 MediaBrowser.Server.Implementations/EntryPoints/WanAddressEntryPoint.cs (limited to 'MediaBrowser.Server.Implementations/EntryPoints') diff --git a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs b/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs index af3fde34b..de53201c9 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs @@ -26,7 +26,6 @@ namespace MediaBrowser.Server.Implementations.EntryPoints private Timer _timer; private readonly TimeSpan _frequency = TimeSpan.FromHours(24); - private const string DefaultDeviceVersion = "Unknown version"; private readonly ConcurrentDictionary _apps = new ConcurrentDictionary(); public UsageEntryPoint(ILogger logger, IApplicationHost applicationHost, INetworkManager networkManager, IHttpClient httpClient, ISessionManager sessionManager) diff --git a/MediaBrowser.Server.Implementations/EntryPoints/WanAddressEntryPoint.cs b/MediaBrowser.Server.Implementations/EntryPoints/WanAddressEntryPoint.cs deleted file mode 100644 index 2f6643588..000000000 --- a/MediaBrowser.Server.Implementations/EntryPoints/WanAddressEntryPoint.cs +++ /dev/null @@ -1,55 +0,0 @@ -using MediaBrowser.Common.Net; -using MediaBrowser.Controller.Plugins; -using System; -using System.IO; -using System.Threading; - -namespace MediaBrowser.Server.Implementations.EntryPoints -{ - public class WanAddressEntryPoint : IServerEntryPoint - { - public static string WanAddress; - private Timer _timer; - private readonly IHttpClient _httpClient; - - public WanAddressEntryPoint(IHttpClient httpClient) - { - _httpClient = httpClient; - } - - public void Run() - { - _timer = new Timer(TimerCallback, null, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24)); - } - - private async void TimerCallback(object state) - { - try - { - using (var stream = await _httpClient.Get(new HttpRequestOptions - { - Url = "http://bot.whatismyipaddress.com/" - - }).ConfigureAwait(false)) - { - using (var reader = new StreamReader(stream)) - { - WanAddress = await reader.ReadToEndAsync().ConfigureAwait(false); - } - } - } - catch - { - } - } - - public void Dispose() - { - if (_timer != null) - { - _timer.Dispose(); - _timer = null; - } - } - } -} -- cgit v1.2.3