From db09aad52d66d476ba6a59071796325bf4030775 Mon Sep 17 00:00:00 2001 From: zstrike Date: Mon, 18 May 2026 10:09:20 -0400 Subject: [PATCH] added webpath specification --- Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index c449cd1..3014141 100644 --- a/Program.cs +++ b/Program.cs @@ -327,6 +327,8 @@ namespace PhotosImporter public string PhotosPath { get; set; } public string PhotosTable { get; set; } public bool Force { get; set; } + public string WebPath { get; set; } + //public string LocalWebPath { get; set; } public CreateLibraryCommand() { // Register the actual command with a simple (optional) description. @@ -341,6 +343,8 @@ namespace PhotosImporter HasRequiredOption("t|table=", "Table", t => PhotosTable = t); HasRequiredOption("f|force=", "Force", f => Force = false); + HasRequiredOption("w|wp=", "Web Path", wp => WebPath = wp); + //HasRequiredOption("l|lwp=", "Local Web Path", lwp => LocalWebPath = lwp); // Optional options/flags, append ':' to obtain an optional value, or null if not specified. @@ -368,7 +372,7 @@ namespace PhotosImporter var ggg = new DirectoryInfo(PhotosPath).FullName; new OdbcCommand($"CREATE TABLE {PhotosTable} LIKE template;", connection).ExecuteNonQuery(); - new OdbcCommand($"INSERT INTO meta (db, path) VALUES (\"{PhotosTable}\", \"{ggg}\");",connection).ExecuteNonQuery(); + new OdbcCommand($"INSERT INTO meta (db, path, webpath, localwebpath) VALUES (\"{PhotosTable}\", \"{PhotosPath}\", \"https://cdn2.zstrike.dev/{WebPath}\", \"http://192.168.1.155:8445/{WebPath}\");",connection).ExecuteNonQuery(); Console.WriteLine($"Created Library \"{PhotosTable}\""); return Success; }