handle flat tv folders
This commit is contained in:
parent
556024ff40
commit
acd2defbf7
|
@ -57,6 +57,10 @@ namespace MediaBrowser.Model.ApiClient
|
||||||
{
|
{
|
||||||
existing.RemoteAddress = server.RemoteAddress;
|
existing.RemoteAddress = server.RemoteAddress;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(server.ConnectServerId))
|
||||||
|
{
|
||||||
|
existing.ConnectServerId = server.ConnectServerId;
|
||||||
|
}
|
||||||
if (!string.IsNullOrEmpty(server.LocalAddress))
|
if (!string.IsNullOrEmpty(server.LocalAddress))
|
||||||
{
|
{
|
||||||
existing.LocalAddress = server.LocalAddress;
|
existing.LocalAddress = server.LocalAddress;
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace MediaBrowser.Model.ApiClient
|
||||||
|
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
public String ConnectServerId { get; set; }
|
||||||
public String LocalAddress { get; set; }
|
public String LocalAddress { get; set; }
|
||||||
public String RemoteAddress { get; set; }
|
public String RemoteAddress { get; set; }
|
||||||
public String ManualAddress { get; set; }
|
public String ManualAddress { get; set; }
|
||||||
|
|
|
@ -1412,6 +1412,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||||
if (episode != null)
|
if (episode != null)
|
||||||
{
|
{
|
||||||
dto.IndexNumberEnd = episode.IndexNumberEnd;
|
dto.IndexNumberEnd = episode.IndexNumberEnd;
|
||||||
|
dto.SeriesName = episode.SeriesName;
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.AlternateEpisodeNumbers))
|
if (fields.Contains(ItemFields.AlternateEpisodeNumbers))
|
||||||
{
|
{
|
||||||
|
@ -1427,23 +1428,50 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||||
dto.AirsBeforeSeasonNumber = episode.AirsBeforeSeasonNumber;
|
dto.AirsBeforeSeasonNumber = episode.AirsBeforeSeasonNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var seasonId = episode.SeasonId;
|
||||||
|
if (seasonId.HasValue)
|
||||||
|
{
|
||||||
|
dto.SeasonId = seasonId.Value.ToString("N");
|
||||||
|
}
|
||||||
|
|
||||||
var episodeSeason = episode.Season;
|
var episodeSeason = episode.Season;
|
||||||
if (episodeSeason != null)
|
if (episodeSeason != null)
|
||||||
{
|
{
|
||||||
dto.SeasonId = episodeSeason.Id.ToString("N");
|
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.SeasonName))
|
if (fields.Contains(ItemFields.SeasonName))
|
||||||
{
|
{
|
||||||
dto.SeasonName = episodeSeason.Name;
|
dto.SeasonName = episodeSeason.Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var episodeSeries = episode.Series;
|
||||||
|
|
||||||
|
if (episodeSeries != null)
|
||||||
|
{
|
||||||
if (fields.Contains(ItemFields.SeriesGenres))
|
if (fields.Contains(ItemFields.SeriesGenres))
|
||||||
{
|
{
|
||||||
var episodeseries = episode.Series;
|
dto.SeriesGenres = episodeSeries.Genres.ToList();
|
||||||
if (episodeseries != null)
|
}
|
||||||
|
|
||||||
|
dto.SeriesId = GetDtoId(episodeSeries);
|
||||||
|
|
||||||
|
if (fields.Contains(ItemFields.AirTime))
|
||||||
{
|
{
|
||||||
dto.SeriesGenres = episodeseries.Genres.ToList();
|
dto.AirTime = episodeSeries.AirTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.GetImageLimit(ImageType.Thumb) > 0)
|
||||||
|
{
|
||||||
|
dto.SeriesThumbImageTag = GetImageCacheTag(episodeSeries, ImageType.Thumb);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.GetImageLimit(ImageType.Primary) > 0)
|
||||||
|
{
|
||||||
|
dto.SeriesPrimaryImageTag = GetImageCacheTag(episodeSeries, ImageType.Primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fields.Contains(ItemFields.SeriesStudio))
|
||||||
|
{
|
||||||
|
dto.SeriesStudio = episodeSeries.Studios.FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1464,37 +1492,6 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||||
dto.AnimeSeriesIndex = series.AnimeSeriesIndex;
|
dto.AnimeSeriesIndex = series.AnimeSeriesIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (episode != null)
|
|
||||||
{
|
|
||||||
series = episode.Series;
|
|
||||||
|
|
||||||
if (series != null)
|
|
||||||
{
|
|
||||||
dto.SeriesId = GetDtoId(series);
|
|
||||||
dto.SeriesName = series.Name;
|
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.AirTime))
|
|
||||||
{
|
|
||||||
dto.AirTime = series.AirTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.GetImageLimit(ImageType.Thumb) > 0)
|
|
||||||
{
|
|
||||||
dto.SeriesThumbImageTag = GetImageCacheTag(series, ImageType.Thumb);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.GetImageLimit(ImageType.Primary) > 0)
|
|
||||||
{
|
|
||||||
dto.SeriesPrimaryImageTag = GetImageCacheTag(series, ImageType.Primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.SeriesStudio))
|
|
||||||
{
|
|
||||||
dto.SeriesStudio = series.Studios.FirstOrDefault();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add SeasonInfo
|
// Add SeasonInfo
|
||||||
var season = item as Season;
|
var season = item as Season;
|
||||||
if (season != null)
|
if (season != null)
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
||||||
{
|
{
|
||||||
|
@ -37,7 +40,8 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something
|
// If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something
|
||||||
if (season != null || args.HasParent<Series>())
|
// Also handle flat tv folders
|
||||||
|
if (season != null || args.HasParent<Series>() || string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
var episode = ResolveVideo<Episode>(args, false);
|
var episode = ResolveVideo<Episode>(args, false);
|
||||||
|
|
||||||
|
|
|
@ -356,6 +356,9 @@
|
||||||
<Content Include="dashboard-ui\scripts\supporterkeypage.js">
|
<Content Include="dashboard-ui\scripts\supporterkeypage.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\scripts\tvlatest.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\wizardlivetvguide.js">
|
<Content Include="dashboard-ui\scripts\wizardlivetvguide.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user