mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-31 01:35:50 +02:00
extract chapter images from single file blurays
This commit is contained in:
parent
b104c5f707
commit
ff6867b816
|
@ -175,12 +175,20 @@ namespace MediaBrowser.Controller.MediaInfo
|
||||||
{
|
{
|
||||||
if (extractImages)
|
if (extractImages)
|
||||||
{
|
{
|
||||||
// Disable for now on folder rips
|
if (video.VideoType == VideoType.HdDvd || video.VideoType == VideoType.Iso)
|
||||||
if (video.VideoType != VideoType.VideoFile && video.VideoType != VideoType.Dvd)
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (video.VideoType == VideoType.BluRay)
|
||||||
|
{
|
||||||
|
// Can only extract reliably on single file blurays
|
||||||
|
if (video.PlayableStreamFileNames == null || video.PlayableStreamFileNames.Count != 1)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add some time for the first chapter to make sure we don't end up with a black image
|
// Add some time for the first chapter to make sure we don't end up with a black image
|
||||||
var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(FirstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks);
|
var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(FirstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue