expose Tmdb collection id in editor.

This commit is contained in:
Luke Pulverenti
2013-12-07 20:42:15 -05:00
parent 07e5b74f13
commit 1f162e39b1
19 changed files with 271 additions and 193 deletions

View File

@@ -0,0 +1,38 @@
using MediaBrowser.Controller.Plugins;
using System;
using System.Threading;
namespace MediaBrowser.ServerApplication.EntryPoints
{
public class ResourceEntryPoint : IServerEntryPoint
{
private Timer _timer;
public void Run()
{
_timer = new Timer(TimerCallback, null, TimeSpan.FromMinutes(1), TimeSpan.FromMinutes(30));
}
private void TimerCallback(object state)
{
try
{
// Bad practice, i know. But we keep a lot in memory, unfortunately.
GC.Collect(2, GCCollectionMode.Forced, true);
GC.Collect(2, GCCollectionMode.Forced, true);
}
catch
{
}
}
public void Dispose()
{
if (_timer != null)
{
_timer.Dispose();
_timer = null;
}
}
}
}

View File

@@ -131,8 +131,7 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\MediaBrowser.IsoMounting.3.0.65\lib\net45\pfmclrapi.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="ServiceStack.Interfaces">
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath>
</Reference>
<Reference Include="SimpleInjector, Version=2.3.6.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
@@ -161,6 +160,7 @@
<Compile Include="BackgroundService.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="EntryPoints\ResourceEntryPoint.cs" />
<Compile Include="EntryPoints\StartupWizard.cs" />
<Compile Include="FFMpeg\FFMpegDownloadInfo.cs" />
<Compile Include="FFMpeg\FFMpegInfo.cs" />