File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -8,30 +8,24 @@ def main():
88 args = sys .argv [1 :]
99
1010 if len (args ) == 0 : # default no args
11+ print ("Initializing database..." )
1112 dd .init_sql ()
1213 dd .update_db (dd .fetch_new_data ())
13- con = sqlite3 .connect ("sv_db.db" )
14- cur = con .cursor ()
15- dd .update_db (dd .fetch_new_data ())
16- sql_data = cur .execute ('SELECT * FROM servants' ).fetchall ()
14+
15+ # Query and download
16+ print ("Downloading assets" )
1717 dd .download_sv_faces ()
18- con .close ()
1918
2019
2120 con = sqlite3 .connect ("sv_db.db" )
2221 cur = con .cursor ()
2322
24- if len (args ) == 1 and args [0 ] == "update" :
25- dd .update_db (dd .fetch_new_data ())
26- sql_data = cur .execute ('SELECT * FROM servants' ).fetchall ()
27- dd .download_sv_faces ()
28-
29- if len (args ) == 1 and args [0 ] == "full-update" :
23+ if len (args ) == 2 and args [0 ] == "download" and args [1 ] == "--new" :
3024 dd .update_db (dd .fetch_new_data ())
3125 sql_data = cur .execute ('SELECT * FROM servants' ).fetchall ()
3226 dd .fetch_and_store_sv_faces (sql_data ) # This queries the API, should not be used
3327
34- if len (args ) == 1 and args [0 ] == "download-faces " :
28+ if len (args ) == 1 and args [0 ] == "download" :
3529 dd .download_sv_faces ()
3630
3731 if len (args ) == 1 and args [0 ] == "zip" :
You can’t perform that action at this time.
0 commit comments