diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-04 15:17:22 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-04 15:17:22 -0400 |
| commit | e2b3320f8000b695f5e45c79adc12b03505e4dff (patch) | |
| tree | 0daf6d484273aee50b7f52743956471c7b65e63c /MediaBrowser.Server.Implementations | |
| parent | 385e52c9eb9efba3dae12fdddc0747ad1b67537e (diff) | |
add one year tolerance to movie lookups
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/MusicManager.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Localization/Server/server.json | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/MusicManager.cs b/MediaBrowser.Server.Implementations/Library/MusicManager.cs index 9d5826454..df122e166 100644 --- a/MediaBrowser.Server.Implementations/Library/MusicManager.cs +++ b/MediaBrowser.Server.Implementations/Library/MusicManager.cs @@ -18,7 +18,12 @@ namespace MediaBrowser.Server.Implementations.Library public IEnumerable<Audio> GetInstantMixFromSong(Audio item, User user) { - return GetInstantMixFromGenres(item.Genres, user); + var list = new List<Audio> + { + item + }; + + return list.Concat(GetInstantMixFromGenres(item.Genres, user)); } public IEnumerable<Audio> GetInstantMixFromArtist(string name, User user) @@ -39,7 +44,7 @@ namespace MediaBrowser.Server.Implementations.Library public IEnumerable<Audio> GetInstantMixFromAlbum(MusicAlbum item, User user) { var genres = item - .RecursiveChildren + .GetRecursiveChildren(user, true) .OfType<Audio>() .SelectMany(i => i.Genres) .Concat(item.Genres) @@ -57,6 +62,7 @@ namespace MediaBrowser.Server.Implementations.Library return inputItems .OfType<Audio>() .Select(i => new Tuple<Audio, int>(i, i.Genres.Count(genresDictionary.ContainsKey))) + .Where(i => i.Item2 > 0) .OrderByDescending(i => i.Item2) .ThenBy(i => Guid.NewGuid()) .Select(i => i.Item1) diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json index d6d4bbc51..a1c08c8d8 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/server.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json @@ -858,5 +858,7 @@ "TabBranding": "Branding", "HeaderBrandingHelp": "Customize the appearance of Media Browser to fit the needs of your group or organization.", "LabelLoginDisclaimer": "Login disclaimer:", - "LabelLoginDisclaimerHelp": "This will be displayed at the bottom of the login page." + "LabelLoginDisclaimerHelp": "This will be displayed at the bottom of the login page.", + "LabelAutomaticallyDonate": "Automatically donate this amount each month", + "LabelAutomaticallyDonateHelp": "You can cancel at any time via your PayPal account." }
\ No newline at end of file |
