diff options
| -rw-r--r-- | CONTRIBUTORS.md | 47 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ArtistsService.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/IHasAlbumArtist.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/MusicVideo.cs | 19 |
6 files changed, 71 insertions, 32 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 18cef5819..8a19bb74a 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -13,48 +13,49 @@ - [SivaramAdhiappan](https://github.com/shivaram1190) - [CWatkinsNash](https://github.com/CWatkinsNash) - [sfnetwork](https://github.com/sfnetwork) - - [Logos302] (https://github.com/Logos302) + - [Logos302](https://github.com/Logos302) - [TheWorkz](https://github.com/TheWorkz) - [mboehler](https://github.com/mboehler) - [KaHooli](https://github.com/KaHooli) - [xzener](https://github.com/xzener) - - [CBers] (https://github.com/CBers) - - [Sagaia] (https://github.com/Sagaia) + - [CBers](https://github.com/CBers) + - [Sagaia](https://github.com/Sagaia) - [JHawk111](https://github.com/JHawk111) - [David3663](https://github.com/david3663) - [Smyken](https://github.com/Smyken) - - [doron1] (https://github.com/doron1) - - [brainfryd] (https://github.com/brainfryd) - - [DGMayor] (http://github.com/DGMayor) - - [Jon-theHTPC] (https://github.com/Jon-theHTPC) - - [aspdend] (https://github.com/aspdend) + - [doron1](https://github.com/doron1) + - [brainfryd](https://github.com/brainfryd) + - [DGMayor](http://github.com/DGMayor) + - [Jon-theHTPC](https://github.com/Jon-theHTPC) + - [aspdend](https://github.com/aspdend) - [RedshirtMB](https://github.com/RedshirtMB) - [thealienamongus](https://github.com/thealienamongus) - [brocass](https://github.com/brocass) - [pjrollo2000](https://github.com/pjrollo2000) - [abobader](https://github.com/abobader) - [milli260876](https://github.com/milli260876) - - [vileboy] (https://github.com/vileboy) - - [starkadius] (https://github.com/starkadius) + - [vileboy](https://github.com/vileboy) + - [starkadius](https://github.com/starkadius) - [wraslor](https://github.com/wraslor) - [mrwebsmith](https://github.com/mrwebsmith) - [rickster53](https://github.com/rickster53) - - [Tharnax] (https://github.com/Tharnax) - - [0sm0] (https://github.com/0sm0) + - [Tharnax](https://github.com/Tharnax) + - [0sm0](https://github.com/0sm0) - [swhitmore](https://github.com/swhitmore) - [DigiTM](https://github.com/DigiTM) - [crisliv / xliv](https://github.com/crisliv) - [Yogi](https://github.com/yogi12) - - [madFloyd] (https://github.com/madFloyd) - - [yardameus] (https://github.com/yardameus) - - [rrb008] (https://github.com/rrb008) - - [Toonguy] (https://github.com/Toonguy) - - [Alwin Hummels] (https://github.com/AlwinHummels) - - [trooper11] (https://github.com/trooper11) - - [danlotfy] (https://github.com/danlotfy) - - [jordy1955] (https://github.com/jordy1955) - - [JoshFink] (https://github.com/JoshFink) + - [madFloyd](https://github.com/madFloyd) + - [yardameus](https://github.com/yardameus) + - [rrb008](https://github.com/rrb008) + - [Toonguy](https://github.com/Toonguy) + - [Alwin Hummels](https://github.com/AlwinHummels) + - [trooper11](https://github.com/trooper11) + - [danlotfy](https://github.com/danlotfy) + - [jordy1955](https://github.com/jordy1955) + - [JoshFink](https://github.com/JoshFink) - [Detector1](https://github.com/Detector1) - [BlackIce013](https://github.com/blackice013) - - [mporcas] (https://github.com/mporcas) - - [tikuf] (https://github.com/tikuf/) + - [mporcas](https://github.com/mporcas) + - [tikuf](https://github.com/tikuf/) + - [Tim Hobbs](https://github.com/timhobbs)
\ No newline at end of file diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index fe45cd39e..612f73191 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1368,7 +1368,7 @@ namespace MediaBrowser.Api.Playback mediaUrl = streamInfo.Url; } - if (!string.IsNullOrEmpty(path) && File.Exists(path)) + if (!string.IsNullOrEmpty(path)) { state.MediaPath = path; state.IsRemote = false; @@ -1381,7 +1381,7 @@ namespace MediaBrowser.Api.Playback state.RunTimeTicks = recording.RunTimeTicks; - if (recording.RecordingInfo.Status == RecordingStatus.InProgress && !state.IsRemote) + if (recording.RecordingInfo.Status == RecordingStatus.InProgress) { await Task.Delay(1000, cancellationToken).ConfigureAwait(false); } @@ -1404,7 +1404,7 @@ namespace MediaBrowser.Api.Playback state.LiveTvStreamId = streamInfo.Id; - if (!string.IsNullOrEmpty(streamInfo.Path) && File.Exists(streamInfo.Path)) + if (!string.IsNullOrEmpty(streamInfo.Path)) { state.MediaPath = streamInfo.Path; state.IsRemote = false; diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs index 9972ac3ef..8b1c5ba88 100644 --- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs +++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs @@ -15,14 +15,12 @@ namespace MediaBrowser.Api.UserLibrary /// <summary> /// Class GetArtists /// </summary> - [Route("/Artists", "GET")] - [Api(Description = "Gets all artists from a given item, folder, or the entire library")] + [Route("/Artists", "GET", Summary = "Gets all artists from a given item, folder, or the entire library")] public class GetArtists : GetItemsByName { } - [Route("/Artists/{Name}", "GET")] - [Api(Description = "Gets an artist, by name")] + [Route("/Artists/{Name}", "GET", Summary = "Gets an artist, by name")] public class GetArtist : IReturn<BaseItemDto> { /// <summary> @@ -112,7 +110,8 @@ namespace MediaBrowser.Api.UserLibrary protected override IEnumerable<MusicArtist> GetAllItems(GetItemsByName request, IEnumerable<BaseItem> items) { return items - .OfType<Audio>() + .OfType<IHasArtist>() + .Where(i => !(i is MusicAlbum)) .SelectMany(i => i.AllArtists) .Distinct(StringComparer.OrdinalIgnoreCase) .Select(name => diff --git a/MediaBrowser.Controller/Entities/Audio/IHasAlbumArtist.cs b/MediaBrowser.Controller/Entities/Audio/IHasAlbumArtist.cs index 7448e44f0..08eaf903e 100644 --- a/MediaBrowser.Controller/Entities/Audio/IHasAlbumArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/IHasAlbumArtist.cs @@ -1,4 +1,5 @@ - +using System.Collections.Generic; + namespace MediaBrowser.Controller.Entities.Audio { public interface IHasAlbumArtist @@ -9,5 +10,7 @@ namespace MediaBrowser.Controller.Entities.Audio public interface IHasArtist { bool HasArtist(string name); + + List<string> AllArtists { get; } } } diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index bc260c696..cce241542 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -31,6 +31,23 @@ namespace MediaBrowser.Controller.Entities.Audio } } + [IgnoreDataMember] + public List<string> AllArtists + { + get + { + var list = new List<string>(); + + if (!string.IsNullOrEmpty(AlbumArtist)) + { + list.Add(AlbumArtist); + } + list.AddRange(Artists); + + return list; + } + } + /// <summary> /// Gets or sets the tags. /// </summary> diff --git a/MediaBrowser.Controller/Entities/MusicVideo.cs b/MediaBrowser.Controller/Entities/MusicVideo.cs index c3c4b89ba..554914ec6 100644 --- a/MediaBrowser.Controller/Entities/MusicVideo.cs +++ b/MediaBrowser.Controller/Entities/MusicVideo.cs @@ -3,7 +3,9 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using System; +using System.Collections.Generic; using System.Linq; +using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities { @@ -33,6 +35,23 @@ namespace MediaBrowser.Controller.Entities /// <value>The revenue.</value> public double? Revenue { get; set; } + [IgnoreDataMember] + public List<string> AllArtists + { + get + { + var list = new List<string>(); + + if (!string.IsNullOrEmpty(Artist)) + { + list.Add(Artist); + } + + return list; + + } + } + /// <summary> /// Determines whether the specified name has artist. /// </summary> |
