mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
962 B
27 lines
962 B
using ErsatzTV.Core.Domain; |
|
using ErsatzTV.Core.Interfaces.Scheduling; |
|
using ErsatzTV.Core.Interfaces.Scripting; |
|
using Microsoft.Extensions.Logging; |
|
|
|
namespace ErsatzTV.Infrastructure.Scheduling; |
|
|
|
public class MultiEpisodeShuffleCollectionEnumeratorFactory |
|
: IMultiEpisodeShuffleCollectionEnumeratorFactory |
|
{ |
|
private readonly IScriptEngine _scriptEngine; |
|
private readonly ILogger<MultiEpisodeShuffleCollectionEnumeratorFactory> _logger; |
|
|
|
public MultiEpisodeShuffleCollectionEnumeratorFactory( |
|
IScriptEngine scriptEngine, |
|
ILogger<MultiEpisodeShuffleCollectionEnumeratorFactory> logger) |
|
{ |
|
_scriptEngine = scriptEngine; |
|
_logger = logger; |
|
} |
|
|
|
public IMediaCollectionEnumerator Create( |
|
string jsScriptPath, |
|
IList<MediaItem> mediaItems, |
|
CollectionEnumeratorState state) => |
|
new MultiEpisodeShuffleCollectionEnumerator(mediaItems, state, _scriptEngine, jsScriptPath, _logger); |
|
}
|
|
|