now using SymlinkName everywhere
This commit is contained in:
@@ -429,7 +429,7 @@ def JobForceScan(job):
|
||||
|
||||
# to serve static content of the images, we create a symlink from inside the static subdir of each import_path that exists
|
||||
def CreateSymlink(job,path):
|
||||
symlink='static/{}'.format(os.path.basename(path[0:-1]))
|
||||
symlink=SymlinkName(path, path)
|
||||
if not os.path.exists(symlink):
|
||||
os.symlink(path, symlink)
|
||||
return symlink
|
||||
@@ -762,7 +762,7 @@ def ProcessFilesInDir(job, e, file_func):
|
||||
def JobGetFileDetails(job):
|
||||
JobProgressState( job, "In Progress" )
|
||||
path=[jex.value for jex in job.extra if jex.name == "path"][0]
|
||||
path='static'+'/'+os.path.basename(path[0:-1])
|
||||
path=SymlinkName( path, path )
|
||||
if DEBUG==1:
|
||||
print("DEBUG: JobGetFileDetails for path={}".format( path ) )
|
||||
dir=session.query(Dir).filter(Dir.path_prefix==path).first()
|
||||
@@ -847,7 +847,7 @@ def GenVideoThumbnail(job, file):
|
||||
|
||||
def CheckForDups(job):
|
||||
path=[jex.value for jex in job.extra if jex.name == "path"][0]
|
||||
path='static'+'/'+os.path.basename(path[0:-1])
|
||||
path=SymlinkName( path, path )
|
||||
|
||||
AddLogForJob( job, f"Check for duplicates in import path: {path}" )
|
||||
res = session.execute( f"select count(e1.name) as count from entry e1, file f1, dir d1, entry_dir_link edl1, entry e2, file f2, dir d2, entry_dir_link edl2 where e1.id = f1.eid and e2.id = f2.eid and d1.eid = edl1.dir_eid and edl1.entry_id = e1.id and edl2.dir_eid = d2.eid and edl2.entry_id = e2.id and d1.path_prefix like '%{path}%' and f1.hash = f2.hash and e1.id != e2.id" )
|
||||
|
||||
Reference in New Issue
Block a user