소스 검색

Add region and ps2 to scraped systems

Colin Powell 3 년 전
부모
커밋
e4ca3ffdaf
2개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. 4 1
      emus/settings.py
  2. 8 6
      templates/games/_game_card.html

+ 4 - 1
emus/settings.py

@@ -174,6 +174,7 @@ RETROPIE_RETROARCH_WEB_SYSTEM_MAP = {
 GAME_SYSTEM_SLUG_MAP = {
     "3do": "3DO",
     "atarijaguar": "Atari Jaguar",
+    "atarilynx": "Atari Lynx",
     "coleco": "Colecovision",
     "dreamcast": "Dreamcast",
     "gb": "Game Boy",
@@ -181,8 +182,8 @@ GAME_SYSTEM_SLUG_MAP = {
     "gbc": "Game Boy Color",
     "gc": "GameCube",
     "megadrive": "Genesis/Mega Drive",
+    "model3": "Sega Model 3",
     "gamgear": "Game Gear",
-    "atarilynx": "Atari Lynx",
     "msx": "MSX",
     "n64": "Nintendo 64",
     "nds": "Nintendo DS",
@@ -191,8 +192,10 @@ GAME_SYSTEM_SLUG_MAP = {
     "ngpc": "Neo Geo Pocket Color",
     "nes": "Nintendo",
     "pcengine": "PC Engine/TurboGrafix 16",
+    "ps2": "Playstation 2",
     "psp": "Playstation Portable",
     "psx": "Playstation",
+    "ports": "Ports",
     "saturn": "Saturn",
     "scummvm": "ScummVM",
     "sega32x": "Sega 32X",

+ 8 - 6
templates/games/_game_card.html

@@ -1,15 +1,17 @@
 <div class="card">
     <div class="row no-gutters">
         <div class="col-auto">
-	{% if game.screenshot %}
-            <img src="{{game.screenshot.url}}" class="img-fluid" alt="Screenshot of {{game.name}}">
+        {% if game.screenshot %}
+        <img src="{{game.screenshot.url}}" class="img-fluid" alt="Screenshot of {{game.name}}">
+        {% elif game.marquee %}
+        <img src="{{game.marquee.url}}" class="img-fluid" alt="Title of {{game.name}}">
         {% else %}
-            <img src="{{game.marquee.url}}" class="img-fluid" alt="Title of {{game.name}}">
-	{% endif %}
+        <h2>{{game.name}}</h2>
+        {% endif %}
         </div>
         <div class="col">
             <div class="card-block px-2">
-		    <h4 class="card-title">{{game.name}}{% if game.region %} [{{game.region}}]{% endif %}</h4>
+                <h4 class="card-title">{{game.name}}{% if game.region %} [{{game.region}}]{% endif %}</h4>
                 <p class="card-text">{{game.description|truncatechars:220}}</p>
                 <a href="{{game.get_absolute_url}}" class="btn btn-primary">More</a>
                 <a href="{{game.rom_file.url}}" class="btn btn-alert">Download</a>
@@ -20,7 +22,7 @@
         <a href="{{game.game_system.get_absolute_url}}">
             <span class="system-badge badge badge-success {{game.game_system.retropie_slug}}">{{game.game_system.name|upper}}</span>
         </a>
-        &nbsp;&nbsp;{{game.rating_by_100}}/100
+        <b>&nbsp;&nbsp;{{game.rating_by_100}}/100</b>
 
         <div id="genre-badges" style="float:right">
         {% for genre in game.genre.all %}