Skip to content

Commit

Permalink
Merge pull request #3330 from MediaBrowser/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
LukePulverenti authored Jun 18, 2018
2 parents cd58ce7 + 5409af1 commit f356a6a
Show file tree
Hide file tree
Showing 66 changed files with 160 additions and 119 deletions.
2 changes: 1 addition & 1 deletion Emby.Server.Implementations/Browser/BrowserLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private static void OpenDashboardPage(string page, IServerApplicationHost appHos
/// <param name="appHost">The app host.</param>
public static void OpenWizard(IServerApplicationHost appHost)
{
OpenDashboardPage("index.html?start=wizard", appHost);
OpenDashboardPage("index.html#!/wizardstart.html", appHost);
}

/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,16 @@ await Write(httpRes,
return;
}

if (localPath.EndsWith("web/dashboard.html", StringComparison.OrdinalIgnoreCase) && httpReq.UrlReferrer == null)
{
RedirectToUrl(httpRes, "index.html#!/dashboard.html");
}

if (localPath.EndsWith("web/home.html", StringComparison.OrdinalIgnoreCase) && httpReq.UrlReferrer == null)
{
RedirectToUrl(httpRes, "index.html");
}

if (!string.IsNullOrEmpty(GlobalResponse))
{
// We don't want the address pings in ApplicationHost to fail
Expand Down
4 changes: 2 additions & 2 deletions Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ private string GetCompressionType(IRequest request)

if (acceptEncoding != null)
{
if (_brotliCompressor != null && acceptEncoding.IndexOf("br", StringComparison.OrdinalIgnoreCase) != -1)
return "br";
//if (_brotliCompressor != null && acceptEncoding.IndexOf("br", StringComparison.OrdinalIgnoreCase) != -1)
// return "br";

if (acceptEncoding.IndexOf("deflate", StringComparison.OrdinalIgnoreCase) != -1)
return "deflate";
Expand Down
2 changes: 1 addition & 1 deletion Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ async void _timerProvider_TimerFired(object sender, GenericEventArgs<TimerInfo>
{
var timer = e.Argument;

_logger.Info("Recording timer fired.");
_logger.Info("Recording timer fired for {0}.", timer.Name);

try
{
Expand Down
37 changes: 35 additions & 2 deletions MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,17 @@ private async Task<MetadataResult<Series>> FetchMovieData(string tmdbId, string
result.Item = new Series();
result.ResultLanguage = seriesInfo.ResultLanguage;

ProcessMainInfo(result.Item, seriesInfo, preferredCountryCode);
var settings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);

ProcessMainInfo(result, seriesInfo, preferredCountryCode, settings);

return result;
}

private void ProcessMainInfo(Series series, RootObject seriesInfo, string preferredCountryCode)
private void ProcessMainInfo(MetadataResult<Series> seriesResult, RootObject seriesInfo, string preferredCountryCode, TmdbSettingsResult settings)
{
var series = seriesResult.Item;

series.Name = seriesInfo.name;
series.SetProviderId(MetadataProviders.Tmdb, seriesInfo.id.ToString(_usCulture));

Expand Down Expand Up @@ -307,6 +311,35 @@ private void ProcessMainInfo(Series series, RootObject seriesInfo, string prefer
}
}
}

seriesResult.ResetPeople();
var tmdbImageUrl = settings.images.GetImageUrl("original");

if (seriesInfo.credits != null && seriesInfo.credits.cast != null)
{
foreach (var actor in seriesInfo.credits.cast.OrderBy(a => a.order))
{
var personInfo = new PersonInfo
{
Name = actor.name.Trim(),
Role = actor.character,
Type = PersonType.Actor,
SortOrder = actor.order
};

if (!string.IsNullOrWhiteSpace(actor.profile_path))
{
personInfo.ImageUrl = tmdbImageUrl + actor.profile_path;
}

if (actor.id > 0)
{
personInfo.SetProviderId(MetadataProviders.Tmdb, actor.id.ToString(CultureInfo.InvariantCulture));
}

seriesResult.AddPerson(personInfo);
}
}
}

internal static string GetSeriesDataPath(IApplicationPaths appPaths, string tmdbId)
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.WebDashboard/Api/DashboardService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public async Task<object> Get(GetDashboardResource request)
// But don't redirect if an html import is being requested.
if (path.IndexOf("bower_components", StringComparison.OrdinalIgnoreCase) == -1)
{
Request.Response.Redirect("wizardstart.html");
Request.Response.Redirect("index.html#!/wizardstart.html");
return null;
}
}
Expand Down
9 changes: 0 additions & 9 deletions MediaBrowser.WebDashboard/Api/PackageCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,6 @@ private string GetMetaTags(string mode)
sb.Append("<meta http-equiv=\"Content-Security-Policy\" content=\"default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: file: filesystem: ws: wss:;\">");
}

if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
{
sb.Append("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no\">");
}
else
{
sb.Append("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1\">");
}

return sb.ToString();
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit f356a6a

Please sign in to comment.