Fixed path issue on linux
This commit is contained in:
parent
a1d3be4fed
commit
be7791443a
@ -126,16 +126,16 @@ def fromdir(root_url, url, content_base_path, content_relative_path):
|
|||||||
print("--> LOADED 2 FILE") # try and get this as low as possible.
|
print("--> LOADED 2 FILE") # try and get this as low as possible.
|
||||||
for e in data:
|
for e in data:
|
||||||
for key, value in e.items():
|
for key, value in e.items():
|
||||||
print(key)
|
#print(key)
|
||||||
searchArr.append(key)
|
searchArr.append(key)
|
||||||
for i in searchArr:
|
for i in searchArr:
|
||||||
print(i)
|
#print(i)
|
||||||
if quote(f""+i) in c.url:
|
if quote(f""+i) in c.url:
|
||||||
conn = sqlite3.connect('app.db')
|
conn = sqlite3.connect('app.db')
|
||||||
print(data)
|
#print(data)
|
||||||
for e in data:
|
for e in data:
|
||||||
for key, value in e.items():
|
for key, value in e.items():
|
||||||
print(key)
|
#print(key)
|
||||||
if key == i:
|
if key == i:
|
||||||
query="SELECT * FROM COMICS where "
|
query="SELECT * FROM COMICS where "
|
||||||
for i in value:
|
for i in value:
|
||||||
@ -179,7 +179,7 @@ def fromdir(root_url, url, content_base_path, content_relative_path):
|
|||||||
|
|
||||||
sql = query
|
sql = query
|
||||||
#sql="SELECT * from COMICS where SERIES like '%" + i+ "%' or Title like '%" + i+ "%';"
|
#sql="SELECT * from COMICS where SERIES like '%" + i+ "%' or Title like '%" + i+ "%';"
|
||||||
print(sql)
|
#print(sql)
|
||||||
s = conn.execute(sql)
|
s = conn.execute(sql)
|
||||||
#list=[]
|
#list=[]
|
||||||
for r in s:
|
for r in s:
|
||||||
@ -200,12 +200,12 @@ def fromdir(root_url, url, content_base_path, content_relative_path):
|
|||||||
links=[link3]
|
links=[link3]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
#print(c.title)
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def mimetype(path):
|
def mimetype(path):
|
||||||
extension = path.split(".")[-1].lower()
|
extension = path.split(".")[-1].lower()
|
||||||
if extension == "pdf":
|
if extension == "pdf":
|
||||||
|
Loading…
Reference in New Issue
Block a user