diff --git a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs b/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs index b47e8df5ae..a14c7123a0 100644 --- a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs +++ b/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using CommonIO; @@ -151,6 +152,7 @@ namespace MediaBrowser.Providers.Music } } + private Regex _regex_http = new Regex("^http://"); private void PopulateImages(List list, List images, ImageType type, @@ -178,7 +180,7 @@ namespace MediaBrowser.Providers.Music Width = width, Height = height, ProviderName = Name, - Url = url, + Url = _regex_http.Replace(url, "https://", 1), Language = i.lang }; diff --git a/MediaBrowser.Providers/Music/FanArtArtistProvider.cs b/MediaBrowser.Providers/Music/FanArtArtistProvider.cs index 9b18ac5e92..6afa80507e 100644 --- a/MediaBrowser.Providers/Music/FanArtArtistProvider.cs +++ b/MediaBrowser.Providers/Music/FanArtArtistProvider.cs @@ -14,6 +14,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Net; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using CommonIO; @@ -149,6 +150,7 @@ namespace MediaBrowser.Providers.Music PopulateImages(list, obj.musicarts, ImageType.Art, 500, 281); } + private Regex _regex_http = new Regex("^http://"); private void PopulateImages(List list, List images, ImageType type, @@ -176,7 +178,7 @@ namespace MediaBrowser.Providers.Music Width = width, Height = height, ProviderName = Name, - Url = url, + Url = _regex_http.Replace(url, "https://", 1), Language = i.lang }; diff --git a/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs b/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs index b1930d8f0e..e6a47d9d2f 100644 --- a/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs +++ b/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs @@ -15,6 +15,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using CommonIO; @@ -160,6 +161,7 @@ namespace MediaBrowser.Providers.TV PopulateImages(list, obj.showbackground, ImageType.Backdrop, 1920, 1080, seasonNumber); } + private Regex _regex_http = new Regex("^http://"); private void PopulateImages(List list, List images, ImageType type, @@ -194,7 +196,7 @@ namespace MediaBrowser.Providers.TV Width = width, Height = height, ProviderName = Name, - Url = url, + Url = _regex_http.Replace(url, "https://", 1), Language = i.lang }; diff --git a/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs b/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs index 5662082db2..827a3c50ff 100644 --- a/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs @@ -17,6 +17,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Net; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using CommonIO; @@ -162,6 +163,7 @@ namespace MediaBrowser.Providers.TV PopulateImages(list, obj.tvposter, ImageType.Primary, 1000, 1426); } + private Regex _regex_http = new Regex("^http://"); private void PopulateImages(List list, List images, ImageType type, @@ -194,7 +196,7 @@ namespace MediaBrowser.Providers.TV Width = width, Height = height, ProviderName = Name, - Url = url, + Url = _regex_http.Replace(url, "https://", 1), Language = i.lang }; diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs index 569b0b374a..609c246928 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs @@ -1172,8 +1172,7 @@ namespace MediaBrowser.Server.Implementations.Channels { items = ApplyFilters(items, query.Filters, user); - var sortBy = query.SortBy.Length == 0 ? new[] { ItemSortBy.SortName } : query.SortBy; - items = _libraryManager.Sort(items, user, sortBy, query.SortOrder ?? SortOrder.Ascending); + items = _libraryManager.Sort(items, user, query.SortBy, query.SortOrder ?? SortOrder.Ascending); var all = items.ToList(); var totalCount = totalCountFromProvider ?? all.Count;