diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-15 21:48:25 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-15 21:48:25 -0400 |
| commit | 4506d3faa1670f3a1fdad07b0aa29a104147fc8e (patch) | |
| tree | beab4e6d7e3079596e48f04224c19c593e794a99 /MediaBrowser.Model | |
| parent | 773fd729082876457a566ec6d83cfff694abcd28 (diff) | |
update dynamic images
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index b798da748..5d0cd5203 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -25,19 +25,14 @@ namespace MediaBrowser.Model.Dlna { ValidateAudioInput(options); - List<MediaSourceInfo> mediaSources = options.MediaSources; - - // If the client wants a specific media source, filter now - if (!string.IsNullOrEmpty(options.MediaSourceId)) + List<MediaSourceInfo> mediaSources = new List<MediaSourceInfo>(); + foreach (MediaSourceInfo i in options.MediaSources) { - List<MediaSourceInfo> newMediaSources = new List<MediaSourceInfo>(); - foreach (MediaSourceInfo i in mediaSources) + if (!string.IsNullOrEmpty(options.MediaSourceId) || + StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId)) { - if (StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId)) - newMediaSources.Add(i); + mediaSources.Add(i); } - - mediaSources = newMediaSources; } List<StreamInfo> streams = new List<StreamInfo>(); @@ -63,19 +58,14 @@ namespace MediaBrowser.Model.Dlna { ValidateInput(options); - List<MediaSourceInfo> mediaSources = options.MediaSources; - - // If the client wants a specific media source, filter now - if (!string.IsNullOrEmpty(options.MediaSourceId)) + List<MediaSourceInfo> mediaSources = new List<MediaSourceInfo>(); + foreach (MediaSourceInfo i in options.MediaSources) { - List<MediaSourceInfo> newMediaSources = new List<MediaSourceInfo>(); - foreach (MediaSourceInfo i in mediaSources) + if (!string.IsNullOrEmpty(options.MediaSourceId) || + StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId)) { - if (StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId)) - newMediaSources.Add(i); + mediaSources.Add(i); } - - mediaSources = newMediaSources; } List<StreamInfo> streams = new List<StreamInfo>(); |
