From 605e00ed85de6a875ff930b039565460ba43c7df Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 5 Oct 2023 16:55:03 +0100 Subject: [PATCH] [Plugin system] Move read-only filesystems to dependency injection. --- DVD/CSS.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DVD/CSS.cs b/DVD/CSS.cs index e9acc58..8af8d15 100644 --- a/DVD/CSS.cs +++ b/DVD/CSS.cs @@ -956,16 +956,16 @@ public class CSS /// IOpticalMediaImage to generate keys for. /// List of Partition to analyze. /// Total number of sectors for track. - /// + /// /// A byte array with keys for every sector in the track. One key is 5 bytes. - public static byte[] GenerateTitleKeys(IOpticalMediaImage input, List partitions, ulong trackSectors, - Type pluginType) + public static byte[] GenerateTitleKeys(IOpticalMediaImage input, List partitions, ulong trackSectors, + IReadOnlyFilesystem fs) { var keys = new byte[trackSectors * 5]; foreach(Partition partition in partitions) { - if(Activator.CreateInstance(pluginType) is not IReadOnlyFilesystem fs) + if(fs is null) continue; if(!HasVideoTsFolder(input, fs, partition))