This commit is contained in:
Techywarrior 2013-04-28 10:36:49 -07:00
commit 0b87caf1a7
4 changed files with 33 additions and 2 deletions

View File

@ -275,7 +275,7 @@ namespace MediaBrowser.Server.Implementations.Library
var specialFeatures = items.OfType<Movie>().SelectMany(i => i.SpecialFeatures).ToList(); var specialFeatures = items.OfType<Movie>().SelectMany(i => i.SpecialFeatures).ToList();
var localTrailers = items.SelectMany(i => i.LocalTrailers).ToList(); var localTrailers = items.SelectMany(i => i.LocalTrailers).ToList();
var themeSongs = items.SelectMany(i => i.ThemeSongs).ToList(); var themeSongs = items.SelectMany(i => i.ThemeSongs).ToList();
var videoBackdrops = items.SelectMany(i => i.ThemeSongs).ToList(); var videoBackdrops = items.SelectMany(i => i.VideoBackdrops).ToList();
items.AddRange(specialFeatures); items.AddRange(specialFeatures);
items.AddRange(localTrailers); items.AddRange(localTrailers);

View File

@ -99,11 +99,13 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
var allItems = _libraryManager.RootFolder.RecursiveChildren.ToList(); var allItems = _libraryManager.RootFolder.RecursiveChildren.ToList();
var localTrailers = allItems.SelectMany(i => i.LocalTrailers); var localTrailers = allItems.SelectMany(i => i.LocalTrailers);
var videoBackdrops = allItems.SelectMany(i => i.VideoBackdrops);
var videos = allItems.OfType<Video>().ToList(); var videos = allItems.OfType<Video>().ToList();
var items = videos; var items = videos;
items.AddRange(localTrailers); items.AddRange(localTrailers);
items.AddRange(videoBackdrops);
items.AddRange(videos.OfType<Movie>().SelectMany(i => i.SpecialFeatures).ToList()); items.AddRange(videos.OfType<Movie>().SelectMany(i => i.SpecialFeatures).ToList());
items = items.Where(i => items = items.Where(i =>

View File

@ -1733,6 +1733,35 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
}); });
}; };
self.getVideoBackdrops = function (userId, itemId) {
if (!userId) {
throw new Error("null userId");
}
if (!itemId) {
throw new Error("null itemId");
}
var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/VideoBackdrops");
return self.ajax({
type: "GET",
url: url,
dataType: "json"
});
};
self.getSearchHints = function (options) {
var url = self.getUrl("Search/Hints", options);
return self.ajax({
type: "GET",
url: url,
dataType: "json"
});
};
/** /**
* Gets special features for an item * Gets special features for an item
*/ */

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.86" targetFramework="net45" /> <package id="MediaBrowser.ApiClient.Javascript" version="3.0.87" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" /> <package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" /> <package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
</packages> </packages>