From 43845b40523f91e7816f6ea9e250a93c6f648f4f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 3 May 2013 11:08:02 -0400 Subject: [PATCH] extract images for small numbers of items on discovery --- .../Entities/Audio/Audio.cs | 9 +- .../MediaInfo/FFMpegManager.cs | 84 -------- .../ScheduledTasks/AudioImagesTask.cs | 180 +++++++++++++---- .../ScheduledTasks/ChapterImagesTask.cs | 71 ++++++- .../ScheduledTasks/VideoImagesTask.cs | 184 +++++++++++++----- 5 files changed, 350 insertions(+), 178 deletions(-) diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs index cbf35f8700..dd28218ceb 100644 --- a/MediaBrowser.Controller/Entities/Audio/Audio.cs +++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs @@ -1,5 +1,5 @@ -using System; -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; +using System; using System.Collections.Generic; using System.Runtime.Serialization; @@ -10,6 +10,11 @@ namespace MediaBrowser.Controller.Entities.Audio /// public class Audio : BaseItem, IHasMediaStreams { + public Audio() + { + MediaStreams = new List(); + } + /// /// Gets or sets the media streams. /// diff --git a/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs b/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs index aee33ad2eb..087207024e 100644 --- a/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs +++ b/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs @@ -5,9 +5,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers.MediaInfo; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; -using MoreLinq; using System; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; @@ -38,22 +36,6 @@ namespace MediaBrowser.Controller.MediaInfo private readonly IMediaEncoder _encoder; private readonly ILogger _logger; - /// - /// Holds the list of new items to generate chapter image for when the NewItemTimer expires - /// - private readonly List