mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
improve ScheduleDirect showId
This commit is contained in:
parent
11e33cd00c
commit
94451de6d2
@ -422,7 +422,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||||||
}
|
}
|
||||||
|
|
||||||
var showType = details.showType ?? string.Empty;
|
var showType = details.showType ?? string.Empty;
|
||||||
|
|
||||||
var info = new ProgramInfo
|
var info = new ProgramInfo
|
||||||
{
|
{
|
||||||
ChannelId = channel,
|
ChannelId = channel,
|
||||||
@ -440,10 +440,23 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||||||
IsKids = string.Equals(details.audience, "children", StringComparison.OrdinalIgnoreCase),
|
IsKids = string.Equals(details.audience, "children", StringComparison.OrdinalIgnoreCase),
|
||||||
IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1,
|
IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1,
|
||||||
IsMovie = showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1,
|
IsMovie = showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1,
|
||||||
ShowId = programInfo.programID,
|
|
||||||
Etag = programInfo.md5
|
Etag = programInfo.md5
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var showId = programInfo.programID ?? string.Empty;
|
||||||
|
|
||||||
|
// According to SchedulesDirect, these are generic, unidentified episodes
|
||||||
|
// SH005316560000
|
||||||
|
var hasUniqueShowId = !showId.StartsWith("SH", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
!showId.EndsWith("0000", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
if (!hasUniqueShowId)
|
||||||
|
{
|
||||||
|
showId = newID;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.ShowId = showId;
|
||||||
|
|
||||||
if (programInfo.videoProperties != null)
|
if (programInfo.videoProperties != null)
|
||||||
{
|
{
|
||||||
info.IsHD = programInfo.videoProperties.Contains("hdtv", StringComparer.OrdinalIgnoreCase);
|
info.IsHD = programInfo.videoProperties.Contains("hdtv", StringComparer.OrdinalIgnoreCase);
|
||||||
|
Loading…
Reference in New Issue
Block a user