mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
update translations
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Net;
|
||||
using MediaBrowser.Api;
|
||||
using MediaBrowser.Api;
|
||||
using MediaBrowser.Common;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Events;
|
||||
@@ -78,7 +77,6 @@ using MediaBrowser.Server.Implementations.ServerManager;
|
||||
using MediaBrowser.Server.Implementations.Session;
|
||||
using MediaBrowser.Server.Implementations.Sync;
|
||||
using MediaBrowser.Server.Implementations.Themes;
|
||||
using MediaBrowser.ServerApplication.EntryPoints;
|
||||
using MediaBrowser.ServerApplication.FFMpeg;
|
||||
using MediaBrowser.ServerApplication.IO;
|
||||
using MediaBrowser.ServerApplication.Native;
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,6 @@
|
||||
<Compile Include="EntryPoints\KeepServerAwake.cs" />
|
||||
<Compile Include="EntryPoints\ResourceEntryPoint.cs" />
|
||||
<Compile Include="EntryPoints\StartupWizard.cs" />
|
||||
<Compile Include="EntryPoints\WanAddressEntryPoint.cs" />
|
||||
<Compile Include="FFMpeg\FFMpegDownloader.cs" />
|
||||
<Compile Include="FFMpeg\FFMpegDownloadInfo.cs" />
|
||||
<Compile Include="FFMpeg\FFMpegInfo.cs" />
|
||||
|
||||
Reference in New Issue
Block a user