Change DB name and path to adapt to DSM7
Luckily in our case only the database name and the name of the directory where the files are saved have changed.
This commit is contained in:
parent
44aa4989da
commit
1f6f2cd6be
3 changed files with 4 additions and 4 deletions
|
@ -93,7 +93,7 @@ if __name__ == "__main__":
|
|||
names = "richard|yingfen"
|
||||
pictures = synology.fetch_paths_for_names(conn, names, 20)
|
||||
synology.close_db(conn)
|
||||
dirpath = synology.fetch_files("jeena@" + host_ip, "/var/services/homes/jeena/Drive", pictures)
|
||||
dirpath = synology.fetch_files("jeena@" + host_ip, "/var/services/homes/jeena/Photos", pictures)
|
||||
|
||||
creds = get_creds()
|
||||
gclient = login_gphoto(creds)
|
||||
|
|
2
ha.py
2
ha.py
|
@ -28,7 +28,7 @@ if __name__ == "__main__":
|
|||
names = "richard|yingfen"
|
||||
pictures = synology.fetch_paths_for_names(conn, names, 20)
|
||||
synology.close_db(conn)
|
||||
dirpath = synology.fetch_files("jeena@" + host_ip, "/var/services/homes/jeena/Drive", pictures)
|
||||
dirpath = synology.fetch_files("jeena@" + host_ip, "/var/services/homes/jeena/Photos", pictures)
|
||||
|
||||
with os.scandir(dirpath) as dirs:
|
||||
for i, entry in enumerate(dirs):
|
||||
|
|
|
@ -8,7 +8,7 @@ import os
|
|||
def connect_db(db_host, db_user, db_passwd):
|
||||
return psycopg2.connect(
|
||||
host=db_host,
|
||||
database="synophoto",
|
||||
database="synofoto",
|
||||
user=db_user,
|
||||
password=db_passwd)
|
||||
|
||||
|
@ -50,5 +50,5 @@ if __name__ == "__main__":
|
|||
names = "richard|yingfen"
|
||||
pictures = fetch_paths_for_names(conn, names, 5)
|
||||
close_db(conn)
|
||||
dirpath = fetch_files("jeena@" + host_ip, "/var/services/homes/jeena/Drive", pictures)
|
||||
dirpath = fetch_files("jeena@" + host_ip, "/var/services/homes/jeena/Photos", pictures)
|
||||
shutil.rmtree(dirpath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue