diff --git a/app/models/packages.py b/app/models/packages.py index 0af72c4d..4ed28e7f 100644 --- a/app/models/packages.py +++ b/app/models/packages.py @@ -765,6 +765,14 @@ class Package(db.Model): review_scores = [ 100 * r.as_weight() for r in self.reviews ] self.score = self.score_downloads + sum(review_scores) + def get_conf_file_name(self): + if self.type == PackageType.MOD: + return "mod.conf" + elif self.type == PackageType.TXP: + return "texture_pack.conf" + elif self.type == PackageType.GAME: + return "game.conf" + class MetaPackage(db.Model): id = db.Column(db.Integer, primary_key=True) diff --git a/app/templates/packages/game_support.html b/app/templates/packages/game_support.html index 75797348..c389ef33 100644 --- a/app/templates/packages/game_support.html +++ b/app/templates/packages/game_support.html @@ -48,7 +48,7 @@ {% elif support.confidence == 11 %} {{ _("Added by Editor") }} {% elif support.confidence == 10 %} - {{ _("mod.conf") }} + {{ package.get_conf_file_name() }} {% else %} {{ support.confidence }} {% endif %} @@ -72,7 +72,7 @@ {% if mod_conf_lines %} -
{{ mod_conf_lines }}
{% endif %}