This commit is contained in:
@@ -25,11 +25,19 @@ def handle_survey_form(request):
|
|||||||
url = request.GET.get('url')
|
url = request.GET.get('url')
|
||||||
external_galleries = str(request.GET.get('external_galleries'))
|
external_galleries = str(request.GET.get('external_galleries'))
|
||||||
|
|
||||||
|
stash_folder = "/stash"
|
||||||
|
|
||||||
if external_galleries:
|
if external_galleries:
|
||||||
skip_searching_gallery = True
|
print("external_galleries is not null")
|
||||||
|
performer_external_galleries = stash_folder+"/"+name+"_external_galler>
|
||||||
|
with open(performer_external_galleries, "a") as f:
|
||||||
|
f.write(external_galleries)
|
||||||
|
skip_searching_gallery = True
|
||||||
else:
|
else:
|
||||||
skip_searching_gallery = False
|
print("external_galleries is null")
|
||||||
|
print("another")
|
||||||
|
skip_searching_gallery = False
|
||||||
|
|
||||||
with open('django_code/stash_management/templates/template.stash-pornpics-dowloader.job.yml', 'r') as file:
|
with open('django_code/stash_management/templates/template.stash-pornpics-dowloader.job.yml', 'r') as file:
|
||||||
#get the manifest in a variable template_manifest from the manifest file
|
#get the manifest in a variable template_manifest from the manifest file
|
||||||
template_manifest = yaml.safe_load(file)
|
template_manifest = yaml.safe_load(file)
|
||||||
@@ -39,7 +47,7 @@ def handle_survey_form(request):
|
|||||||
template_manifest['spec']['template']['spec']['containers'][0]['name'] ="stash-pornpics-dowloader-"+name
|
template_manifest['spec']['template']['spec']['containers'][0]['name'] ="stash-pornpics-dowloader-"+name
|
||||||
|
|
||||||
#edit the command based on the input
|
#edit the command based on the input
|
||||||
command=['bash', '/config/download.sh','--skip_searching_gallery',skip_searching_gallery, '--http_proxy', 'http://gluetun-svc.gluetun.svc:8888', '--BASE_URL', url, '--pornstars', name,'--external_gallery', external_galleries]
|
command=['bash', '/config/download.sh','--skip_searching_gallery',skip_searching_gallery, '--http_proxy', 'http://gluetun-svc.gluetun.svc:8888', '--BASE_URL', url, '--pornstars', name]
|
||||||
template_manifest['spec']['template']['spec']['containers'][0]['command']=command
|
template_manifest['spec']['template']['spec']['containers'][0]['command']=command
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user