fixes #358 - Weather validation in Server configuration

This commit is contained in:
Luke Pulverenti
2013-06-23 11:02:53 -04:00
parent 0acc257354
commit 189618a751
24 changed files with 15 additions and 685 deletions

View File

@@ -514,15 +514,20 @@ namespace MediaBrowser.Controller.Dto
}
}
var game = item as BaseGame;
var game = item as Game;
if (game != null)
{
dto.Players = game.PlayersSupported;
dto.GameSystem = game.GameSystem;
SetGameProperties(dto, game);
}
}
private void SetGameProperties(BaseItemDto dto, Game item)
{
dto.Players = item.PlayersSupported;
dto.GameSystem = item.GameSystem;
}
/// <summary>
/// Since it can be slow to make all of these calculations independently, this method will provide a way to do them all at once
/// </summary>

View File

@@ -1,7 +1,5 @@
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.MediaInfo;
using MediaBrowser.Controller.Weather;
using System.Collections.Generic;
namespace MediaBrowser.Controller
{
@@ -28,12 +26,6 @@ namespace MediaBrowser.Controller
/// <value>The FFMPEG controller.</value>
public FFMpegManager FFMpegManager { get; set; }
/// <summary>
/// Gets the list of currently registered weather prvoiders
/// </summary>
/// <value>The weather providers.</value>
public IEnumerable<IWeatherProvider> WeatherProviders { get; set; }
/// <summary>
/// Creates a kernel based on a Data path, which is akin to our current programdata path
/// </summary>

View File

@@ -161,7 +161,6 @@
<Compile Include="Sorting\IBaseItemComparer.cs" />
<Compile Include="Sorting\IUserBaseItemComparer.cs" />
<Compile Include="Updates\IInstallationManager.cs" />
<Compile Include="Weather\IWeatherProvider.cs" />
<Compile Include="Providers\BaseItemXmlParser.cs" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,20 +0,0 @@
using MediaBrowser.Model.Weather;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Weather
{
/// <summary>
/// Interface IWeatherProvider
/// </summary>
public interface IWeatherProvider
{
/// <summary>
/// Gets the weather info async.
/// </summary>
/// <param name="location">The location.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{WeatherInfo}.</returns>
Task<WeatherInfo> GetWeatherInfoAsync(string location, CancellationToken cancellationToken);
}
}