Browse Source

cleaning up imagick path references

Michael Hoskins 3 years ago
parent
commit
4dda5a051e
2 changed files with 5 additions and 5 deletions
  1. 0 4
      MovieBarcodeGenerator/BarcodeGenerator.cs
  2. 5 1
      MovieBarcodeGenerator/Program.cs

+ 0 - 4
MovieBarcodeGenerator/BarcodeGenerator.cs

@@ -10,7 +10,6 @@ using System.Threading.Tasks;
 
 
 namespace MovieBarcodeGenerator {
 namespace MovieBarcodeGenerator {
     public class BarcodeGenerator {
     public class BarcodeGenerator {
-        public static string imagickPath;
         private static log4net.ILog log = log4net.LogManager.GetLogger("Generator");
         private static log4net.ILog log = log4net.LogManager.GetLogger("Generator");
 
 
         public static string ffmpegPath {
         public static string ffmpegPath {
@@ -33,9 +32,6 @@ namespace MovieBarcodeGenerator {
                 File.Delete(outputFile);
                 File.Delete(outputFile);
             }
             }
 
 
-            // set the path because .Net uses the "convert" utility on Windows by default
-            System.Environment.SetEnvironmentVariable("Path", imagickPath);
-
             decimal videoLength = SharpFF.GetDuration(inputFile);
             decimal videoLength = SharpFF.GetDuration(inputFile);
 
 
             // run these in parallel to save time
             // run these in parallel to save time

+ 5 - 1
MovieBarcodeGenerator/Program.cs

@@ -35,8 +35,10 @@ namespace MovieBarcodeGenerator {
                 return;
                 return;
             }
             }
 
 
-            BarcodeGenerator.imagickPath = System.Configuration.ConfigurationManager.AppSettings["folderImagick"];
             BarcodeGenerator.ffmpegPath = System.Configuration.ConfigurationManager.AppSettings["folderFFMpeg"];
             BarcodeGenerator.ffmpegPath = System.Configuration.ConfigurationManager.AppSettings["folderFFMpeg"];
+
+            if (!File.Exists(Path.Combine()))
+
             BarcodeGenerator.Generate(inputFile, outputFile, outputHeight, barWidth, iterations);
             BarcodeGenerator.Generate(inputFile, outputFile, outputHeight, barWidth, iterations);
             log.Info("Complete.");
             log.Info("Complete.");
         }
         }
@@ -50,6 +52,8 @@ namespace MovieBarcodeGenerator {
             Console.WriteLine(" -s, --slices WIDTH\tnumber of slices used to generate image (default: 1000)");
             Console.WriteLine(" -s, --slices WIDTH\tnumber of slices used to generate image (default: 1000)");
             Console.WriteLine(" -bw, --barwidth WIDTH\tindividual slice width, in pixels (default: 1)");
             Console.WriteLine(" -bw, --barwidth WIDTH\tindividual slice width, in pixels (default: 1)");
             Console.WriteLine();
             Console.WriteLine();
+            Console.WriteLine($" ffmpeg path: {BarcodeGenerator.ffmpegPath}");
+            Console.WriteLine();
         }
         }
     }
     }
 }
 }