mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-24 11:05:08 +01:00
fixes #358 - Weather validation in Server configuration
This commit is contained in:
@@ -8,7 +8,6 @@ using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Session;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using MediaBrowser.Model.Weather;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -224,22 +223,6 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <returns>Task{List{ParentalRating}}.</returns>
|
||||
Task<List<ParentalRating>> GetParentalRatingsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Gets weather information for the default location as set in configuration
|
||||
/// </summary>
|
||||
/// <returns>Task{WeatherInfo}.</returns>
|
||||
Task<WeatherInfo> GetWeatherInfoAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Gets weather information for a specific location
|
||||
/// Location can be a US zipcode, or "city,state", "city,state,country", "city,country"
|
||||
/// It can also be an ip address, or "latitude,longitude"
|
||||
/// </summary>
|
||||
/// <param name="location">The location.</param>
|
||||
/// <returns>Task{WeatherInfo}.</returns>
|
||||
/// <exception cref="ArgumentNullException">location</exception>
|
||||
Task<WeatherInfo> GetWeatherInfoAsync(string location);
|
||||
|
||||
/// <summary>
|
||||
/// Gets local trailers for an item
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Weather;
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
@@ -33,12 +32,6 @@ namespace MediaBrowser.Model.Configuration
|
||||
/// <value><c>true</c> if [enable internet providers]; otherwise, <c>false</c>.</value>
|
||||
public bool EnableInternetProviders { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the zip code to use when displaying weather
|
||||
/// </summary>
|
||||
/// <value>The weather location.</value>
|
||||
public string WeatherLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item by name path.
|
||||
/// </summary>
|
||||
@@ -50,12 +43,6 @@ namespace MediaBrowser.Model.Configuration
|
||||
/// </summary>
|
||||
/// <value>The display name of the season zero.</value>
|
||||
public string SeasonZeroDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the weather unit to use when displaying weather
|
||||
/// </summary>
|
||||
/// <value>The weather unit.</value>
|
||||
public WeatherUnits WeatherUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the metadata refresh days.
|
||||
|
||||
@@ -134,10 +134,6 @@
|
||||
<Compile Include="Tasks\TaskTriggerInfo.cs" />
|
||||
<Compile Include="Updates\PackageInfo.cs" />
|
||||
<Compile Include="Updates\PackageVersionInfo.cs" />
|
||||
<Compile Include="Weather\WeatherForecast.cs" />
|
||||
<Compile Include="Weather\WeatherInfo.cs" />
|
||||
<Compile Include="Weather\WeatherStatus.cs" />
|
||||
<Compile Include="Weather\WeatherUnits.cs" />
|
||||
<Compile Include="Web\QueryStringDictionary.cs" />
|
||||
<None Include="FodyWeavers.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Weather
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a weather forecast for a specific date
|
||||
/// </summary>
|
||||
public class WeatherForecast
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the date.
|
||||
/// </summary>
|
||||
/// <value>The date.</value>
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the high temperature fahrenheit.
|
||||
/// </summary>
|
||||
/// <value>The high temperature fahrenheit.</value>
|
||||
public int HighTemperatureFahrenheit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the low temperature fahrenheit.
|
||||
/// </summary>
|
||||
/// <value>The low temperature fahrenheit.</value>
|
||||
public int LowTemperatureFahrenheit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the high temperature celsius.
|
||||
/// </summary>
|
||||
/// <value>The high temperature celsius.</value>
|
||||
public int HighTemperatureCelsius { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the low temperature celsius.
|
||||
/// </summary>
|
||||
/// <value>The low temperature celsius.</value>
|
||||
public int LowTemperatureCelsius { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the condition.
|
||||
/// </summary>
|
||||
/// <value>The condition.</value>
|
||||
public WeatherConditions Condition { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Model.Weather
|
||||
{
|
||||
/// <summary>
|
||||
/// Class WeatherInfo
|
||||
/// </summary>
|
||||
public class WeatherInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the current weather.
|
||||
/// </summary>
|
||||
/// <value>The current weather.</value>
|
||||
public WeatherStatus CurrentWeather { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the forecasts.
|
||||
/// </summary>
|
||||
/// <value>The forecasts.</value>
|
||||
public WeatherForecast[] Forecasts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WeatherInfo"/> class.
|
||||
/// </summary>
|
||||
public WeatherInfo()
|
||||
{
|
||||
Forecasts = new WeatherForecast[] {};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Model.Weather
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the current weather status
|
||||
/// </summary>
|
||||
public class WeatherStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the temperature fahrenheit.
|
||||
/// </summary>
|
||||
/// <value>The temperature fahrenheit.</value>
|
||||
public int TemperatureFahrenheit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the temperature celsius.
|
||||
/// </summary>
|
||||
/// <value>The temperature celsius.</value>
|
||||
public int TemperatureCelsius { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the humidity.
|
||||
/// </summary>
|
||||
/// <value>The humidity.</value>
|
||||
public int Humidity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the condition.
|
||||
/// </summary>
|
||||
/// <value>The condition.</value>
|
||||
public WeatherConditions Condition { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum WeatherConditions
|
||||
/// </summary>
|
||||
public enum WeatherConditions
|
||||
{
|
||||
/// <summary>
|
||||
/// The sunny
|
||||
/// </summary>
|
||||
Sunny,
|
||||
/// <summary>
|
||||
/// The partly cloudy
|
||||
/// </summary>
|
||||
PartlyCloudy,
|
||||
/// <summary>
|
||||
/// The cloudy
|
||||
/// </summary>
|
||||
Cloudy,
|
||||
/// <summary>
|
||||
/// The overcast
|
||||
/// </summary>
|
||||
Overcast,
|
||||
/// <summary>
|
||||
/// The mist
|
||||
/// </summary>
|
||||
Mist,
|
||||
/// <summary>
|
||||
/// The snow
|
||||
/// </summary>
|
||||
Snow,
|
||||
/// <summary>
|
||||
/// The rain
|
||||
/// </summary>
|
||||
Rain,
|
||||
/// <summary>
|
||||
/// The sleet
|
||||
/// </summary>
|
||||
Sleet,
|
||||
/// <summary>
|
||||
/// The fog
|
||||
/// </summary>
|
||||
Fog,
|
||||
/// <summary>
|
||||
/// The blizzard
|
||||
/// </summary>
|
||||
Blizzard,
|
||||
/// <summary>
|
||||
/// The thunderstorm
|
||||
/// </summary>
|
||||
Thunderstorm
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Model.Weather
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum WeatherUnits
|
||||
/// </summary>
|
||||
public enum WeatherUnits
|
||||
{
|
||||
/// <summary>
|
||||
/// The fahrenheit
|
||||
/// </summary>
|
||||
Fahrenheit,
|
||||
/// <summary>
|
||||
/// The celsius
|
||||
/// </summary>
|
||||
Celsius
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user