mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-06 10:16:18 +00:00
update environment detection
This commit is contained in:
@@ -275,17 +275,7 @@ namespace Emby.Server.Implementations.Channels
|
||||
|
||||
public async Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
IEnumerable<ChannelMediaInfo> results = new List<ChannelMediaInfo>();
|
||||
var video = item as Video;
|
||||
if (video != null)
|
||||
{
|
||||
results = video.ChannelMediaSources;
|
||||
}
|
||||
var audio = item as Audio;
|
||||
if (audio != null)
|
||||
{
|
||||
results = audio.ChannelMediaSources ?? GetSavedMediaSources(audio);
|
||||
}
|
||||
IEnumerable<ChannelMediaInfo> results = GetSavedMediaSources(item);
|
||||
|
||||
return SortMediaInfoResults(results)
|
||||
.Select(i => GetMediaSource(item, i))
|
||||
@@ -1378,7 +1368,6 @@ namespace Emby.Server.Implementations.Channels
|
||||
if (channelVideoItem != null)
|
||||
{
|
||||
channelVideoItem.ExtraType = info.ExtraType;
|
||||
channelVideoItem.ChannelMediaSources = info.MediaSources;
|
||||
|
||||
var mediaSource = info.MediaSources.FirstOrDefault();
|
||||
item.Path = mediaSource == null ? null : mediaSource.Path;
|
||||
|
||||
@@ -240,7 +240,6 @@ namespace Emby.Server.Implementations.Data
|
||||
AddColumn(db, "TypedBaseItems", "SourceType", "Text", existingColumnNames);
|
||||
AddColumn(db, "TypedBaseItems", "TrailerTypes", "Text", existingColumnNames);
|
||||
AddColumn(db, "TypedBaseItems", "CriticRating", "Float", existingColumnNames);
|
||||
AddColumn(db, "TypedBaseItems", "CriticRatingSummary", "Text", existingColumnNames);
|
||||
AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
||||
AddColumn(db, "TypedBaseItems", "CleanName", "Text", existingColumnNames);
|
||||
AddColumn(db, "TypedBaseItems", "PresentationUniqueKey", "Text", existingColumnNames);
|
||||
@@ -454,7 +453,6 @@ namespace Emby.Server.Implementations.Data
|
||||
"DateLastMediaAdded",
|
||||
"Album",
|
||||
"CriticRating",
|
||||
"CriticRatingSummary",
|
||||
"IsVirtualItem",
|
||||
"SeriesName",
|
||||
"SeasonName",
|
||||
@@ -579,7 +577,6 @@ namespace Emby.Server.Implementations.Data
|
||||
"SourceType",
|
||||
"TrailerTypes",
|
||||
"CriticRating",
|
||||
"CriticRatingSummary",
|
||||
"InheritedTags",
|
||||
"CleanName",
|
||||
"PresentationUniqueKey",
|
||||
@@ -942,7 +939,6 @@ namespace Emby.Server.Implementations.Data
|
||||
}
|
||||
|
||||
saveItemStatement.TryBind("@CriticRating", item.CriticRating);
|
||||
saveItemStatement.TryBind("@CriticRatingSummary", item.CriticRatingSummary);
|
||||
|
||||
var inheritedTags = item.InheritedTags;
|
||||
if (inheritedTags.Count > 0)
|
||||
@@ -1803,15 +1799,6 @@ namespace Emby.Server.Implementations.Data
|
||||
}
|
||||
index++;
|
||||
|
||||
if (query.HasField(ItemFields.CriticRatingSummary))
|
||||
{
|
||||
if (!reader.IsDBNull(index))
|
||||
{
|
||||
item.CriticRatingSummary = reader.GetString(index);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(index))
|
||||
{
|
||||
item.IsVirtualItem = reader.GetBoolean(index);
|
||||
|
||||
@@ -967,11 +967,6 @@ namespace Emby.Server.Implementations.Dto
|
||||
|
||||
dto.CriticRating = item.CriticRating;
|
||||
|
||||
if (fields.Contains(ItemFields.CriticRatingSummary))
|
||||
{
|
||||
dto.CriticRatingSummary = item.CriticRatingSummary;
|
||||
}
|
||||
|
||||
var hasTrailers = item as IHasTrailers;
|
||||
if (hasTrailers != null)
|
||||
{
|
||||
|
||||
@@ -2251,11 +2251,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.CriticRatingSummary))
|
||||
{
|
||||
writer.WriteElementString("criticratingsummary", item.CriticRatingSummary);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(item.Tagline))
|
||||
{
|
||||
writer.WriteElementString("tagline", item.Tagline);
|
||||
|
||||
Reference in New Issue
Block a user