Skip to content

Commit

Permalink
maybe fixes archive updates. #313
Browse files Browse the repository at this point in the history
  • Loading branch information
eichblatt committed Aug 20, 2022
1 parent 9ff993d commit a254400
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions timemachine/Archivary.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ def load_archive(self, reload_ids, with_latest):
logger.info(f"Archivary loading {a.archive_type}")
a.load_archive(reload_ids=reload_ids, with_latest=with_latest)
logger.info(f"Archivary now contains {len(self.tape_dates)} tapes")
# reload the tape dates, so that the Time Machine knows about the new stuff.
self.tape_dates = self.get_tape_dates()
self.dates = sorted(self.tape_dates.keys())

def year_artists(self, start_year, end_year=None):
for a in self.archives:
Expand Down Expand Up @@ -284,6 +287,10 @@ def __repr__(self):
def year_list(self):
return sorted(set([to_date(x).year for x in self.dates]))

def build_idpath(self): # This may be needed for dynamic update of COLLECTIONS
self.idpath = [os.path.join(self.dbpath, f'{x}_ids') for x in self.collection_list]
return self.idpath

def tape_at_date(self, dt, which_tape=0):
then_date = dt.date()
then = then_date.strftime('%Y-%m-%d')
Expand Down

1 comment on commit a254400

@eichblatt
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hard fix to test. I have to wait for something new to come into the database, and then see if I can access it before restarting the program.

Please sign in to comment.