aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Api/BrandingService.cs1
-rw-r--r--MediaBrowser.Api/ItemUpdateService.cs6
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs2
-rw-r--r--MediaBrowser.Controller/Entities/Movies/Movie.cs2
-rw-r--r--MediaBrowser.Controller/Entities/TV/Series.cs2
-rw-r--r--MediaBrowser.Controller/Entities/Trailer.cs2
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs2
-rw-r--r--MediaBrowser.Model/Querying/ItemFields.cs2
-rw-r--r--MediaBrowser.Providers/Manager/ProviderUtils.cs9
-rw-r--r--MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs44
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs5
-rw-r--r--MediaBrowser.WebDashboard/Api/DashboardService.cs4
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj9
-rw-r--r--MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs1
-rw-r--r--SharedVersion.cs4
15 files changed, 74 insertions, 21 deletions
diff --git a/MediaBrowser.Api/BrandingService.cs b/MediaBrowser.Api/BrandingService.cs
index c900e4d06..e991565ad 100644
--- a/MediaBrowser.Api/BrandingService.cs
+++ b/MediaBrowser.Api/BrandingService.cs
@@ -10,6 +10,7 @@ namespace MediaBrowser.Api
}
[Route("/Branding/Css", "GET", Summary = "Gets custom css")]
+ [Route("/Branding/Css.css", "GET", Summary = "Gets custom css")]
public class GetBrandingCss
{
}
diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs
index f37874774..5bb4ed5f0 100644
--- a/MediaBrowser.Api/ItemUpdateService.cs
+++ b/MediaBrowser.Api/ItemUpdateService.cs
@@ -247,6 +247,12 @@ namespace MediaBrowser.Api
hasBudget.Revenue = request.Revenue;
}
+ var hasOriginalTitle = item as IHasOriginalTitle;
+ if (hasOriginalTitle != null)
+ {
+ hasOriginalTitle.OriginalTitle = hasOriginalTitle.OriginalTitle;
+ }
+
var hasCriticRating = item as IHasCriticRating;
if (hasCriticRating != null)
{
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 04371c13b..959334d78 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -125,6 +125,8 @@ namespace MediaBrowser.Controller.Entities
}
}
+ public string OriginalTitle { get; set; }
+
/// <summary>
/// Gets or sets the id.
/// </summary>
diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs
index 4d2ca9ffe..6004992cc 100644
--- a/MediaBrowser.Controller/Entities/Movies/Movie.cs
+++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs
@@ -18,8 +18,6 @@ namespace MediaBrowser.Controller.Entities.Movies
{
public List<Guid> SpecialFeatureIds { get; set; }
- public string OriginalTitle { get; set; }
-
public List<Guid> ThemeSongIds { get; set; }
public List<Guid> ThemeVideoIds { get; set; }
public List<string> ProductionLocations { get; set; }
diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs
index 9eeb89a1f..7eabff072 100644
--- a/MediaBrowser.Controller/Entities/TV/Series.cs
+++ b/MediaBrowser.Controller/Entities/TV/Series.cs
@@ -19,8 +19,6 @@ namespace MediaBrowser.Controller.Entities.TV
{
public List<Guid> SpecialFeatureIds { get; set; }
- public string OriginalTitle { get; set; }
-
public int? AnimeSeriesIndex { get; set; }
public Series()
diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs
index c3e24090c..fe8bf3ed3 100644
--- a/MediaBrowser.Controller/Entities/Trailer.cs
+++ b/MediaBrowser.Controller/Entities/Trailer.cs
@@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.Entities
/// <summary>
/// Class Trailer
/// </summary>
- public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasLookupInfo<TrailerInfo>
+ public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasOriginalTitle, IHasLookupInfo<TrailerInfo>
{
public List<string> ProductionLocations { get; set; }
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 7928d0bf9..49ec9f8ef 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -26,6 +26,8 @@ namespace MediaBrowser.Model.Dto
/// <value>The name.</value>
public string Name { get; set; }
+ public string OriginalTitle { get; set; }
+
/// <summary>
/// Gets or sets the server identifier.
/// </summary>
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index 1540f178a..cea638a39 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -130,6 +130,8 @@
/// </summary>
Metascore,
+ OriginalTitle,
+
/// <summary>
/// The item overview
/// </summary>
diff --git a/MediaBrowser.Providers/Manager/ProviderUtils.cs b/MediaBrowser.Providers/Manager/ProviderUtils.cs
index 278d8ed71..59a2da460 100644
--- a/MediaBrowser.Providers/Manager/ProviderUtils.cs
+++ b/MediaBrowser.Providers/Manager/ProviderUtils.cs
@@ -40,6 +40,15 @@ namespace MediaBrowser.Providers.Manager
}
}
+ if (replaceData || string.IsNullOrEmpty(target.OriginalTitle))
+ {
+ // Safeguard against incoming data having an emtpy name
+ if (!string.IsNullOrWhiteSpace(source.OriginalTitle))
+ {
+ target.OriginalTitle = source.OriginalTitle;
+ }
+ }
+
if (replaceData || !target.CommunityRating.HasValue)
{
target.CommunityRating = source.CommunityRating;
diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs
index 05b1ebc80..98580396d 100644
--- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs
+++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs
@@ -24,7 +24,7 @@ namespace MediaBrowser.Providers.TV
{
public class MovieDbSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>, IHasOrder
{
- private const string GetTvInfo3 = @"http://api.themoviedb.org/3/tv/{0}?api_key={1}&append_to_response=credits,images,keywords,external_ids,videos";
+ private const string GetTvInfo3 = @"http://api.themoviedb.org/3/tv/{0}?api_key={1}&append_to_response=credits,images,keywords,external_ids,videos,content_ratings";
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
internal static MovieDbSeriesProvider Current { get; private set; }
@@ -168,7 +168,7 @@ namespace MediaBrowser.Providers.TV
{
cancellationToken.ThrowIfCancellationRequested();
- result.Item = await FetchMovieData(tmdbId, info.MetadataLanguage, cancellationToken).ConfigureAwait(false);
+ result.Item = await FetchMovieData(tmdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
result.HasMetadata = result.Item != null;
}
@@ -176,7 +176,7 @@ namespace MediaBrowser.Providers.TV
return result;
}
- private async Task<Series> FetchMovieData(string tmdbId, string language, CancellationToken cancellationToken)
+ private async Task<Series> FetchMovieData(string tmdbId, string language, string preferredCountryCode, CancellationToken cancellationToken)
{
string dataFilePath = null;
RootObject seriesInfo = null;
@@ -201,12 +201,12 @@ namespace MediaBrowser.Providers.TV
var item = new Series();
- ProcessMainInfo(item, seriesInfo);
+ ProcessMainInfo(item, seriesInfo, preferredCountryCode);
return item;
}
- private void ProcessMainInfo(Series series, RootObject seriesInfo)
+ private void ProcessMainInfo(Series series, RootObject seriesInfo, string preferredCountryCode)
{
series.Name = seriesInfo.name;
series.SetProviderId(MetadataProviders.Tmdb, seriesInfo.id.ToString(_usCulture));
@@ -265,6 +265,26 @@ namespace MediaBrowser.Providers.TV
series.SetProviderId(MetadataProviders.Tvdb, ids.tvdb_id.ToString(_usCulture));
}
}
+
+ var contentRatings = (seriesInfo.content_ratings ?? new ContentRatings()).results ?? new List<ContentRating>();
+
+ var ourRelease = contentRatings.FirstOrDefault(c => string.Equals(c.iso_3166_1, preferredCountryCode, StringComparison.OrdinalIgnoreCase));
+ var usRelease = contentRatings.FirstOrDefault(c => string.Equals(c.iso_3166_1, "US", StringComparison.OrdinalIgnoreCase));
+ var minimumRelease = contentRatings.FirstOrDefault();
+
+ if (ourRelease != null)
+ {
+ series.OfficialRating = ourRelease.rating;
+ }
+ else if (usRelease != null)
+ {
+ series.OfficialRating = usRelease.rating;
+ }
+ else if (minimumRelease != null)
+ {
+ series.OfficialRating = minimumRelease.rating;
+ }
+
}
internal static string GetSeriesDataPath(IApplicationPaths appPaths, string tmdbId)
@@ -481,6 +501,7 @@ namespace MediaBrowser.Providers.TV
public class Season
{
public string air_date { get; set; }
+ public int episode_count { get; set; }
public int id { get; set; }
public string poster_path { get; set; }
public int season_number { get; set; }
@@ -528,7 +549,6 @@ namespace MediaBrowser.Providers.TV
public double aspect_ratio { get; set; }
public string file_path { get; set; }
public int height { get; set; }
- public string id { get; set; }
public string iso_639_1 { get; set; }
public double vote_average { get; set; }
public int vote_count { get; set; }
@@ -560,6 +580,17 @@ namespace MediaBrowser.Providers.TV
public List<object> results { get; set; }
}
+ public class ContentRating
+ {
+ public string iso_3166_1 { get; set; }
+ public string rating { get; set; }
+ }
+
+ public class ContentRatings
+ {
+ public List<ContentRating> results { get; set; }
+ }
+
public class RootObject
{
public string backdrop_path { get; set; }
@@ -590,6 +621,7 @@ namespace MediaBrowser.Providers.TV
public Keywords keywords { get; set; }
public ExternalIds external_ids { get; set; }
public Videos videos { get; set; }
+ public ContentRatings content_ratings { get; set; }
}
public int Order
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 50ae19580..2ee55edb9 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -1126,6 +1126,11 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.Overview = item.Overview;
}
+ if (fields.Contains(ItemFields.OriginalTitle))
+ {
+ dto.OriginalTitle = item.OriginalTitle;
+ }
+
if (fields.Contains(ItemFields.ShortOverview))
{
var hasShortOverview = item as IHasShortOverview;
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 3a69c9666..376978790 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -346,7 +346,9 @@ namespace MediaBrowser.WebDashboard.Api
}
_fileSystem.DeleteDirectory(Path.Combine(bowerPath, "jquery", "src"), true);
-
+ _fileSystem.DeleteDirectory(Path.Combine(bowerPath, "fingerprintjs2", "flash"), true);
+ _fileSystem.DeleteDirectory(Path.Combine(bowerPath, "fingerprintjs2", "specs"), true);
+
DeleteCryptoFiles(Path.Combine(bowerPath, "cryptojslib", "components"));
DeleteFoldersByName(Path.Combine(bowerPath, "jquery"), "src");
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index f7b550a13..f84fe058a 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -101,6 +101,9 @@
<Content Include="dashboard-ui\autoorganizesmart.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\components\apphost.js">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\components\chromecasthelpers.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -110,9 +113,6 @@
<Content Include="dashboard-ui\components\favoriteitems.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\components\filedownloader.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\components\filterdialog\filterdialog.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -781,9 +781,6 @@
<Content Include="dashboard-ui\collections.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\css\images\editor\lock.png">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\css\images\editor\missing.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
diff --git a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs
index ba8a3bdf5..e37b83f4b 100644
--- a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs
+++ b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs
@@ -479,7 +479,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
writer.WriteElementString("dateadded", item.DateCreated.ToLocalTime().ToString(DateAddedFormat));
writer.WriteElementString("title", item.Name ?? string.Empty);
- writer.WriteElementString("originaltitle", item.Name ?? string.Empty);
var hasOriginalTitle = item as IHasOriginalTitle;
if (hasOriginalTitle != null)
diff --git a/SharedVersion.cs b/SharedVersion.cs
index 6785f5f0d..6b1c9e6bb 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-//[assembly: AssemblyVersion("3.0.*")]
-[assembly: AssemblyVersion("3.0.5930")]
+[assembly: AssemblyVersion("3.0.*")]
+//[assembly: AssemblyVersion("3.0.5930")]