This commit is contained in:
Jamie 2017-11-09 14:22:22 +00:00
commit 874d90d894
4 changed files with 24 additions and 4 deletions

View file

@ -19,7 +19,7 @@ namespace Ombi.Api.Github
public async Task<List<CakeThemes>> GetCakeThemes() public async Task<List<CakeThemes>> GetCakeThemes()
{ {
var request = new Request("repos/tidusjar/layer.Cake/contents/ombi/themes", BaseUrl, HttpMethod.Get); var request = new Request("repos/leram84/layer.Cake/contents/ombi/themes", BaseUrl, HttpMethod.Get);
request.AddHeader("Accept", "application/vnd.github.v3+json"); request.AddHeader("Accept", "application/vnd.github.v3+json");
request.AddHeader("User-Agent", "Ombi"); request.AddHeader("User-Agent", "Ombi");
return await _api.Request<List<CakeThemes>>(request); return await _api.Request<List<CakeThemes>>(request);

View file

@ -19,7 +19,19 @@ namespace Ombi.Core.Rule.Rules.Search
public async Task<RuleResult> Execute(SearchViewModel obj) public async Task<RuleResult> Execute(SearchViewModel obj)
{ {
var item = await EmbyContentRepository.Get(obj.ImdbId); EmbyContent item = null;
if (obj.Type == RequestType.Movie)
{
item = await EmbyContentRepository.Get(obj.ImdbId);
if (item == null)
{
item = await EmbyContentRepository.Get(obj.TheMovieDbId);
}
}
else
{
item = await EmbyContentRepository.Get(obj.TheTvDbId);
}
if (item != null) if (item != null)
{ {
obj.Available = true; obj.Available = true;

View file

@ -35,6 +35,7 @@ namespace Ombi.Store.Entities
public class EmbyContent : Entity public class EmbyContent : Entity
{ {
public string Title { get; set; } public string Title { get; set; }
public string ProviderId { get; set; } public string ProviderId { get; set; }
public string EmbyId { get; set; } public string EmbyId { get; set; }
public EmbyMediaType Type { get; set; } public EmbyMediaType Type { get; set; }

View file

@ -33,6 +33,7 @@ export class CustomizationComponent implements OnInit {
if(x.hasPresetTheme) { if(x.hasPresetTheme) {
this.themes.unshift({displayName: x.presetThemeDisplayName, fullName: x.presetThemeName, url: "", version: x.presetThemeVersion}); this.themes.unshift({displayName: x.presetThemeDisplayName, fullName: x.presetThemeName, url: "", version: x.presetThemeVersion});
this.themes.unshift({displayName: "None", fullName: "None", url: "", version: ""});
} else { } else {
this.themes.unshift({displayName: "Please Select", fullName: "-1", url: "-1", version: ""}); this.themes.unshift({displayName: "Please Select", fullName: "-1", url: "-1", version: ""});
} }
@ -55,12 +56,18 @@ export class CustomizationComponent implements OnInit {
const selectedThemeFullName = <string>event.target.value; const selectedThemeFullName = <string>event.target.value;
const selectedTheme = this.themes.filter((val) => { const selectedTheme = this.themes.filter((val) => {
return val.fullName === selectedThemeFullName; return val.fullName === selectedThemeFullName;
}); })[0];
if(selectedTheme[0].fullName === this.settings.presetThemeName) { if(selectedTheme.fullName === this.settings.presetThemeName) {
return; return;
} }
if(selectedTheme.fullName === "None" || selectedTheme.fullName === "-1") {
this.settings.presetThemeName = "";
this.settings.presetThemeContent = "";
return;
}
this.settings.presetThemeName = selectedThemeFullName; this.settings.presetThemeName = selectedThemeFullName;
this.settingsService.getThemeContent(selectedTheme[0].url).subscribe(x => { this.settingsService.getThemeContent(selectedTheme[0].url).subscribe(x => {
this.settings.presetThemeContent = x; this.settings.presetThemeContent = x;