Skip to content

Commit

Permalink
merge release/1.5.1 into master
Browse files Browse the repository at this point in the history
merge release/1.5.1 into master
Merge pull request #37 from chrisism/release/1.5.1
  • Loading branch information
chrisism authored May 4, 2024
2 parents 11aaa25 + 3e98f12 commit c4b3105
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.routing" version="0.2.3"/>
<import addon="script.module.akl" version="1.1.0"/>
<import addon="script.module.akl" version="1.1.2"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>executable game</provides>
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion resources/lib/commands/api_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions resources/lib/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)

Expand Down

0 comments on commit c4b3105

Please sign in to comment.