mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 18:14:42 +01:00
add movie resolver fix
This commit is contained in:
@@ -2181,7 +2181,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
}
|
||||
}
|
||||
|
||||
return item.People ?? new List<PersonInfo>();
|
||||
return new List<PersonInfo>();
|
||||
}
|
||||
|
||||
public List<Person> GetPeopleItems(InternalPeopleQuery query)
|
||||
|
||||
@@ -309,20 +309,26 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
||||
//we need to only look at the name of this actual item (not parents)
|
||||
var justName = item.IsInMixedFolder ? Path.GetFileName(item.Path) : Path.GetFileName(item.ContainingFolderPath);
|
||||
|
||||
// check for tmdb id
|
||||
var tmdbid = justName.GetAttributeValue("tmdbid");
|
||||
|
||||
if (!string.IsNullOrEmpty(tmdbid))
|
||||
if (!string.IsNullOrWhiteSpace(justName))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tmdb, tmdbid);
|
||||
// check for tmdb id
|
||||
var tmdbid = justName.GetAttributeValue("tmdbid");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(tmdbid))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tmdb, tmdbid);
|
||||
}
|
||||
}
|
||||
|
||||
// check for imdb id - we use full media path, as we can assume, that this will match in any use case (wither id in parent dir or in file name)
|
||||
var imdbid = item.Path.GetAttributeValue("imdbid");
|
||||
|
||||
if (!string.IsNullOrEmpty(imdbid))
|
||||
if (!string.IsNullOrWhiteSpace(item.Path))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, imdbid);
|
||||
// check for imdb id - we use full media path, as we can assume, that this will match in any use case (wither id in parent dir or in file name)
|
||||
var imdbid = item.Path.GetAttributeValue("imdbid");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(imdbid))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, imdbid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +329,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
RequiresClosing = true,
|
||||
BufferMs = 1000,
|
||||
Container = "ts",
|
||||
Id = profile
|
||||
Id = profile,
|
||||
SupportsDirectPlay = true,
|
||||
SupportsDirectStream = false,
|
||||
SupportsTranscoding = true
|
||||
};
|
||||
|
||||
return mediaSource;
|
||||
|
||||
@@ -187,11 +187,16 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
/// </summary>
|
||||
private readonly SemaphoreSlim _writeLock = new SemaphoreSlim(1, 1);
|
||||
|
||||
private string[] _retriveItemColumns =
|
||||
private readonly string[] _retriveItemColumns =
|
||||
{
|
||||
"type",
|
||||
"data",
|
||||
"IsOffline"
|
||||
"EndDate",
|
||||
"IsOffline",
|
||||
"ChannelId",
|
||||
"IsMovie",
|
||||
"IsSports",
|
||||
"IsKids"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -511,7 +516,36 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
|
||||
if (!reader.IsDBNull(2))
|
||||
{
|
||||
item.IsOffline = reader.GetBoolean(2);
|
||||
item.EndDate = reader.GetDateTime(2).ToUniversalTime();
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(3))
|
||||
{
|
||||
item.IsOffline = reader.GetBoolean(3);
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(4))
|
||||
{
|
||||
item.ChannelId = reader.GetString(4);
|
||||
}
|
||||
|
||||
var hasProgramAttributes = item as IHasProgramAttributes;
|
||||
if (hasProgramAttributes != null)
|
||||
{
|
||||
if (!reader.IsDBNull(5))
|
||||
{
|
||||
hasProgramAttributes.IsMovie = reader.GetBoolean(5);
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(6))
|
||||
{
|
||||
hasProgramAttributes.IsSports = reader.GetBoolean(6);
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(7))
|
||||
{
|
||||
hasProgramAttributes.IsKids = reader.GetBoolean(7);
|
||||
}
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
Reference in New Issue
Block a user