aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/Plugins')
-rw-r--r--MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs3
-rw-r--r--MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs45
-rw-r--r--MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs3
-rw-r--r--MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs5
4 files changed, 21 insertions, 35 deletions
diff --git a/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs b/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs
index e0ab31b56e..f4941565fc 100644
--- a/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs
+++ b/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs
@@ -12,8 +12,7 @@ namespace MediaBrowser.Providers.Plugins.StudioImages
{
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
- // TODO change this for a Jellyfin-hosted repository.
- public const string DefaultServer = "https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname";
+ public const string DefaultServer = "https://raw.github.com/jellyfin/emby-artwork/master/studios";
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
diff --git a/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs b/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs
index 3a3048cec4..ce267ac848 100644
--- a/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs
@@ -50,41 +50,29 @@ namespace MediaBrowser.Providers.Studios
{
return new List<ImageType>
{
- ImageType.Primary,
ImageType.Thumb
};
}
- public Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
+ public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
{
- return GetImages(item, true, true, cancellationToken);
- }
-
- private async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, bool posters, bool thumbs, CancellationToken cancellationToken)
- {
- var list = new List<RemoteImageInfo>();
-
- if (posters)
- {
- var posterPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudioposters.txt");
+ var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudiothumbs.txt");
- posterPath = await EnsurePosterList(posterPath, cancellationToken).ConfigureAwait(false);
-
- list.Add(GetImage(item, posterPath, ImageType.Primary, "folder"));
- }
+ thumbsPath = await EnsureThumbsList(thumbsPath, cancellationToken).ConfigureAwait(false);
cancellationToken.ThrowIfCancellationRequested();
- if (thumbs)
- {
- var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudiothumbs.txt");
-
- thumbsPath = await EnsureThumbsList(thumbsPath, cancellationToken).ConfigureAwait(false);
+ var imageInfo = GetImage(item, thumbsPath, ImageType.Thumb, "thumb");
- list.Add(GetImage(item, thumbsPath, ImageType.Thumb, "thumb"));
+ if (imageInfo == null)
+ {
+ return Enumerable.Empty<RemoteImageInfo>();
}
- return list.Where(i => i != null);
+ return new RemoteImageInfo[]
+ {
+ imageInfo
+ };
}
private RemoteImageInfo GetImage(BaseItem item, string filename, ImageType type, string remoteFilename)
@@ -110,19 +98,12 @@ namespace MediaBrowser.Providers.Studios
private string GetUrl(string image, string filename)
{
- return string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}.jpg", repositoryUrl, image, filename);
+ return string.Format(CultureInfo.InvariantCulture, "{0}/images/{1}/{2}.jpg", repositoryUrl, image, filename);
}
private Task<string> EnsureThumbsList(string file, CancellationToken cancellationToken)
{
- string url = string.Format(CultureInfo.InvariantCulture, "{0}/studiothumbs.txt", repositoryUrl);
-
- return EnsureList(url, file, _fileSystem, cancellationToken);
- }
-
- private Task<string> EnsurePosterList(string file, CancellationToken cancellationToken)
- {
- string url = string.Format(CultureInfo.InvariantCulture, "{0}/studioposters.txt", repositoryUrl);
+ string url = string.Format(CultureInfo.InvariantCulture, "{0}/thumbs.txt", repositoryUrl);
return EnsureList(url, file, _fileSystem, cancellationToken);
}
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs
index f565b65698..4d26052faf 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs
@@ -264,7 +264,8 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
series.RunTimeTicks = seriesResult.EpisodeRunTime.Select(i => TimeSpan.FromMinutes(i).Ticks).FirstOrDefault();
- if (string.Equals(seriesResult.Status, "Ended", StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(seriesResult.Status, "Ended", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(seriesResult.Status, "Canceled", StringComparison.OrdinalIgnoreCase))
{
series.Status = SeriesStatus.Ended;
series.EndDate = seriesResult.LastAirDate;
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
index d78652834d..7d77334078 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
@@ -165,8 +165,13 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
private async Task<TvGroupCollection> GetSeriesGroupAsync(int tvShowId, string displayOrder, string language, string imageLanguages, CancellationToken cancellationToken)
{
TvGroupType? groupType =
+ string.Equals(displayOrder, "originalAirDate", StringComparison.Ordinal) ? TvGroupType.OriginalAirDate :
string.Equals(displayOrder, "absolute", StringComparison.Ordinal) ? TvGroupType.Absolute :
string.Equals(displayOrder, "dvd", StringComparison.Ordinal) ? TvGroupType.DVD :
+ string.Equals(displayOrder, "digital", StringComparison.Ordinal) ? TvGroupType.Digital :
+ string.Equals(displayOrder, "storyArc", StringComparison.Ordinal) ? TvGroupType.StoryArc :
+ string.Equals(displayOrder, "production", StringComparison.Ordinal) ? TvGroupType.Production :
+ string.Equals(displayOrder, "tv", StringComparison.Ordinal) ? TvGroupType.TV :
null;
if (groupType == null)