mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
exclude unrated from intros
This commit is contained in:
parent
7a67dba8ef
commit
512740cfb2
@ -99,8 +99,9 @@ namespace MediaBrowser.Server.Implementations.Intros
|
|||||||
IncludeItemTypes = new[] { typeof(Trailer).Name },
|
IncludeItemTypes = new[] { typeof(Trailer).Name },
|
||||||
TrailerTypes = trailerTypes.ToArray(),
|
TrailerTypes = trailerTypes.ToArray(),
|
||||||
SimilarTo = item,
|
SimilarTo = item,
|
||||||
IsPlayed = config.EnableIntrosForWatchedContent ? (bool?) null : false,
|
IsPlayed = config.EnableIntrosForWatchedContent ? (bool?)null : false,
|
||||||
MaxParentalRating = config.EnableIntrosParentalControl ? ratingLevel : null,
|
MaxParentalRating = config.EnableIntrosParentalControl ? ratingLevel : null,
|
||||||
|
BlockUnratedItems = config.EnableIntrosParentalControl ? new[] { UnratedItem.Trailer } : new UnratedItem[] { },
|
||||||
Limit = config.TrailerLimit
|
Limit = config.TrailerLimit
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ namespace MediaBrowser.Server.Implementations.Intros
|
|||||||
Type = i.SourceType == SourceType.Channel ? ItemWithTrailerType.ChannelTrailer : ItemWithTrailerType.ItemWithTrailer,
|
Type = i.SourceType == SourceType.Channel ? ItemWithTrailerType.ChannelTrailer : ItemWithTrailerType.ItemWithTrailer,
|
||||||
LibraryManager = _libraryManager
|
LibraryManager = _libraryManager
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetResult(item, candidates, config);
|
return GetResult(item, candidates, config);
|
||||||
}
|
}
|
||||||
@ -197,7 +198,7 @@ namespace MediaBrowser.Server.Implementations.Intros
|
|||||||
}
|
}
|
||||||
|
|
||||||
returnResult.AddRange(GetMediaInfoIntrosByTags(allIntros, item.Tags).Take(1));
|
returnResult.AddRange(GetMediaInfoIntrosByTags(allIntros, item.Tags).Take(1));
|
||||||
|
|
||||||
return returnResult.DistinctBy(i => i.Path, StringComparer.OrdinalIgnoreCase);
|
return returnResult.DistinctBy(i => i.Path, StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
catch (IOException)
|
catch (IOException)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user