Changing default Survival tag to Primitive.

This commit is contained in:
Roland 2023-05-18 17:25:33 -06:00
parent 4f4009f232
commit fedbbe31d7
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
3 changed files with 6 additions and 5 deletions

View file

@ -159,6 +159,7 @@ async def archive_modeler():
with slow_logger(1, f'Modeling archive took %(elapsed)s seconds: {file_group}', logger__=logger):
if archive:
archive: Archive
try:
archive_id = archive.id
archive.validate()

View file

@ -224,13 +224,13 @@ class Archive(Base, ModelHelper):
self.domain_id = domain.id if domain else None
def apply_singlefile_title(self):
"""Get the title from the Singlefile, if its missing."""
"""Get the title from the Singlefile, if it's missing."""
from modules.archive.lib import get_title_from_html
if self.singlefile_path and not self.file_group.title:
self.file_group.title = get_title_from_html(self.singlefile_path.read_text())
def validate(self):
"""Fill in any missing data about this Archive from it's files."""
"""Fill in any missing data about this Archive from its files."""
try:
self.read_readability_data()
self.read_singlefile_data()