diff --git a/addon.xml b/addon.xml
index 846d81a9..e717dac6 100644
--- a/addon.xml
+++ b/addon.xml
@@ -3,7 +3,7 @@
-
+
executable game
diff --git a/changelog.md b/changelog.md
index 952bd701..d435bde0 100644
--- a/changelog.md
+++ b/changelog.md
@@ -11,6 +11,7 @@
- Added 'edit platform' to ROMs
- Changed platform can be applied to all ROMs in a collection
- AKL webservice port number can be changed through settings
+- Fix with missing auto_scan.txt
## Previous
- Custom skin view for View ROM
diff --git a/requirements.txt b/requirements.txt
index 7770edaf..86f52656 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,6 +3,6 @@ kodi-addon-checker==0.0.31
Kodistubs==21.0.0
routing==0.2.3
pytest==6.2.5
-script.module.akl==1.1.0
+script.module.akl==1.1.2
requests==2.22.0
flake8==5.0.4
diff --git a/resources/lib/commands/api_commands.py b/resources/lib/commands/api_commands.py
index f855887f..3a5cacca 100644
--- a/resources/lib/commands/api_commands.py
+++ b/resources/lib/commands/api_commands.py
@@ -229,7 +229,7 @@ def cmd_store_scraped_roms(args) -> bool:
romcollection = romcollection_repository.find_romcollection(entity_id)
existing_roms = rom_repository.find_roms_by_romcollection(romcollection)
entity_name = romcollection.get_name()
-
+
existing_roms_by_id = {rom.get_id(): rom for rom in existing_roms}
metadata_is_updated = applied_settings.scrape_metadata_policy != constants.SCRAPE_ACTION_NONE
diff --git a/resources/lib/services.py b/resources/lib/services.py
index 3bd26486..1bbd63df 100644
--- a/resources/lib/services.py
+++ b/resources/lib/services.py
@@ -148,9 +148,12 @@ def _last_time_scanned_is_too_long_ago(self):
return
modification_time = self._get_modification_timestamp()
- then = modification_time.toordinal()
- now = datetime.now().toordinal()
- too_long_ago = (now - then) >= min_days_ago
+ if modification_time is not None:
+ then = modification_time.toordinal()
+ now = datetime.now().toordinal()
+ too_long_ago = (now - then) >= min_days_ago
+ else:
+ too_long_ago = True
if too_long_ago:
logger.info(f'Triggering automatic scan and view generation. Last scan was {now-then} days ago')
@@ -159,6 +162,8 @@ def _last_time_scanned_is_too_long_ago(self):
return too_long_ago
def _get_modification_timestamp(self):
+ if not globals.g_PATHS.SCAN_INDICATOR_FILE.exists():
+ return None
modification_timestamp = globals.g_PATHS.SCAN_INDICATOR_FILE.stat().st_mtime
modification_time = datetime.fromtimestamp(modification_timestamp)