Skip to content

Commit c4b3105

Browse files
authored
merge release/1.5.1 into master
merge release/1.5.1 into master Merge pull request #37 from chrisism/release/1.5.1
2 parents 11aaa25 + 3e98f12 commit c4b3105

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.routing" version="0.2.3"/>
6-
<import addon="script.module.akl" version="1.1.0"/>
6+
<import addon="script.module.akl" version="1.1.2"/>
77
</requires>
88
<extension point="xbmc.python.pluginsource" library="addon.py">
99
<provides>executable game</provides>

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Added 'edit platform' to ROMs
1212
- Changed platform can be applied to all ROMs in a collection
1313
- AKL webservice port number can be changed through settings
14+
- Fix with missing auto_scan.txt
1415

1516
## Previous
1617
- Custom skin view for View ROM

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ kodi-addon-checker==0.0.31
33
Kodistubs==21.0.0
44
routing==0.2.3
55
pytest==6.2.5
6-
script.module.akl==1.1.0
6+
script.module.akl==1.1.2
77
requests==2.22.0
88
flake8==5.0.4

resources/lib/commands/api_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def cmd_store_scraped_roms(args) -> bool:
229229
romcollection = romcollection_repository.find_romcollection(entity_id)
230230
existing_roms = rom_repository.find_roms_by_romcollection(romcollection)
231231
entity_name = romcollection.get_name()
232-
232+
233233
existing_roms_by_id = {rom.get_id(): rom for rom in existing_roms}
234234

235235
metadata_is_updated = applied_settings.scrape_metadata_policy != constants.SCRAPE_ACTION_NONE

resources/lib/services.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,12 @@ def _last_time_scanned_is_too_long_ago(self):
148148
return
149149

150150
modification_time = self._get_modification_timestamp()
151-
then = modification_time.toordinal()
152-
now = datetime.now().toordinal()
153-
too_long_ago = (now - then) >= min_days_ago
151+
if modification_time is not None:
152+
then = modification_time.toordinal()
153+
now = datetime.now().toordinal()
154+
too_long_ago = (now - then) >= min_days_ago
155+
else:
156+
too_long_ago = True
154157

155158
if too_long_ago:
156159
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):
159162
return too_long_ago
160163

161164
def _get_modification_timestamp(self):
165+
if not globals.g_PATHS.SCAN_INDICATOR_FILE.exists():
166+
return None
162167
modification_timestamp = globals.g_PATHS.SCAN_INDICATOR_FILE.stat().st_mtime
163168
modification_time = datetime.fromtimestamp(modification_timestamp)
164169

0 commit comments

Comments
 (0)