Fix image upload v2 (#91)

* Add upload_image functionality to new beta script

* Updated for new location of files with Boolean flag for front/rear image
This commit is contained in:
J vanBemmel
2023-03-28 08:37:50 -05:00
committed by GitHub
parent 362056e552
commit 0f79f452c4
3 changed files with 96 additions and 45 deletions

View File

@ -95,6 +95,9 @@ class DTLRepo:
data['manufacturer'] = {
'name': manufacturer, 'slug': self.slug_format(manufacturer)}
# Save file location to resolve any relative paths for images
data['src'] = file
if slugs and True not in [True if s.casefold() in data['slug'].casefold() else False for s in slugs]:
self.handle.verbose_log(f"Skipping {data['model']}")
continue