added webpath specification
This commit is contained in:
@@ -327,6 +327,8 @@ namespace PhotosImporter
|
|||||||
public string PhotosPath { get; set; }
|
public string PhotosPath { get; set; }
|
||||||
public string PhotosTable { get; set; }
|
public string PhotosTable { get; set; }
|
||||||
public bool Force { get; set; }
|
public bool Force { get; set; }
|
||||||
|
public string WebPath { get; set; }
|
||||||
|
//public string LocalWebPath { get; set; }
|
||||||
public CreateLibraryCommand()
|
public CreateLibraryCommand()
|
||||||
{
|
{
|
||||||
// Register the actual command with a simple (optional) description.
|
// Register the actual command with a simple (optional) description.
|
||||||
@@ -341,6 +343,8 @@ namespace PhotosImporter
|
|||||||
HasRequiredOption("t|table=", "Table", t => PhotosTable = t);
|
HasRequiredOption("t|table=", "Table", t => PhotosTable = t);
|
||||||
|
|
||||||
HasRequiredOption("f|force=", "Force", f => Force = false);
|
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.
|
// 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;
|
var ggg = new DirectoryInfo(PhotosPath).FullName;
|
||||||
|
|
||||||
new OdbcCommand($"CREATE TABLE {PhotosTable} LIKE template;", connection).ExecuteNonQuery();
|
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}\"");
|
Console.WriteLine($"Created Library \"{PhotosTable}\"");
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user