supress warning message when bad config file
@@ -54,19 +54,19 @@ def _exclude_single_roms(roms) -> list[str]:
|
||||
excluded_extensions: list = []
|
||||
excluded_extensions = user_config['exclude']['roms']['single_file']['extensions']
|
||||
except (TypeError, KeyError):
|
||||
log.warning(f"Config file for excluding single file extensions malformed")
|
||||
pass
|
||||
try:
|
||||
excluded_names: list = []
|
||||
excluded_names = user_config['exclude']['roms']['single_file']['names']
|
||||
except (TypeError, KeyError):
|
||||
log.warning(f"Config file for excluding single file game names malformed")
|
||||
pass
|
||||
filtered_files: list = []
|
||||
for rom in roms:
|
||||
try:
|
||||
if rom.split('.')[-1] in excluded_extensions or rom in excluded_names:
|
||||
filtered_files.append(rom)
|
||||
except TypeError:
|
||||
log.warning(f"Config file is malformed")
|
||||
pass
|
||||
roms = [f for f in roms if f not in filtered_files]
|
||||
return roms
|
||||
|
||||
@@ -76,14 +76,14 @@ def _exclude_multi_roms(roms) -> list[str]:
|
||||
excluded_names: list = []
|
||||
excluded_names = user_config['exclude']['roms']['multi_file']['names']
|
||||
except (TypeError, KeyError):
|
||||
log.warning(f"Config file for excluding multi file game names malformed")
|
||||
pass
|
||||
filtered_files: list = []
|
||||
for rom in roms:
|
||||
try:
|
||||
if rom in excluded_names:
|
||||
filtered_files.append(rom)
|
||||
except TypeError:
|
||||
log.warning(f"Config file is malformed")
|
||||
pass
|
||||
roms = [f for f in roms if f not in filtered_files]
|
||||
return roms
|
||||
|
||||
@@ -93,12 +93,12 @@ def _exclude_multi_roms_parts(parts) -> list[str]:
|
||||
excluded_extensions: list = []
|
||||
excluded_extensions = user_config['exclude']['roms']['multi_file']['parts']['extensions']
|
||||
except (TypeError, KeyError):
|
||||
log.warning(f"Config file for excluding multi file game parts extensions malformed")
|
||||
pass
|
||||
try:
|
||||
excluded_names: list = []
|
||||
excluded_names = user_config['exclude']['roms']['multi_file']['parts']['names']
|
||||
except (TypeError, KeyError):
|
||||
log.warning(f"Config file for excluding multi file game parts names malformed")
|
||||
pass
|
||||
filtered_files: list = []
|
||||
for part in parts:
|
||||
try:
|
||||
|
||||
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 51 KiB |
@@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/assets/romm.svg" />
|
||||
<link rel="icon" href="/public/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>RomM</title>
|
||||
</head>
|
||||
|
||||
|
Before Width: | Height: | Size: 110 KiB |
1
frontend/public/favicon.svg
Normal file
|
After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,5 +1,6 @@
|
||||
<script setup>
|
||||
import { ref, inject } from "vue"
|
||||
import { useRouter } from 'vue-router'
|
||||
import PlatformsBtn from '@/components/AppBar/PlatformsBtn.vue'
|
||||
import UploadBtn from '@/components/AppBar/UploadBtn.vue'
|
||||
import SearchBar from '@/components/AppBar/SearchBar.vue'
|
||||
@@ -8,22 +9,25 @@ import SettingsBtn from '@/components/AppBar/SettingsBtn.vue'
|
||||
|
||||
// Props
|
||||
const scanning = ref(false)
|
||||
const router = useRouter()
|
||||
|
||||
// Event listeners bus
|
||||
const emitter = inject('emitter')
|
||||
emitter.on('scanning', (s) => { scanning.value = s })
|
||||
|
||||
// Functions
|
||||
async function goHome(){
|
||||
await router.push(import.meta.env.BASE_URL)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<v-app-bar class="elevation-3">
|
||||
|
||||
<v-progress-linear
|
||||
:active="scanning"
|
||||
:indeterminate="true"
|
||||
absolute/>
|
||||
<v-progress-linear :active="scanning" :indeterminate="true" absolute/>
|
||||
|
||||
<v-avatar size="100" class="ml-3"><v-img src="/assets/romm_home.svg"></v-img></v-avatar>
|
||||
<v-avatar size="100" class="ml-3 home-btn hidden-sm-and-down" @click="goHome()"><v-img src="/assets/romm.svg"></v-img></v-avatar>
|
||||
|
||||
<platforms-btn/>
|
||||
|
||||
@@ -41,3 +45,9 @@ emitter.on('scanning', (s) => { scanning.value = s })
|
||||
</v-app-bar>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.home-btn{
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import axios from "axios"
|
||||
import { ref, inject } from "vue"
|
||||
import { useRouter } from 'vue-router'
|
||||
import RailBtn from '@/components/PlatformsDrawer/RailBtn.vue'
|
||||
import Platform from '@/components/PlatformsDrawer/Platform.vue'
|
||||
|
||||
@@ -9,6 +10,7 @@ const selectedPlatform = ref(JSON.parse(localStorage.getItem('selectedPlatform')
|
||||
const platforms = ref([])
|
||||
const platformsDrawer = ref(null)
|
||||
const rail = (localStorage.getItem('rail') == 'true') ? ref(true) : ref(false)
|
||||
const router = useRouter()
|
||||
|
||||
// Event listeners bus
|
||||
const emitter = inject('emitter')
|
||||
@@ -23,6 +25,10 @@ async function getPlatforms() {
|
||||
}).catch((error) => {console.log(error)})
|
||||
}
|
||||
|
||||
async function goHome(){
|
||||
await router.push(import.meta.env.BASE_URL)
|
||||
}
|
||||
|
||||
getPlatforms()
|
||||
emitter.emit('selectedPlatform', selectedPlatform.value)
|
||||
</script>
|
||||
@@ -32,6 +38,11 @@ emitter.emit('selectedPlatform', selectedPlatform.value)
|
||||
<v-navigation-drawer v-model="platformsDrawer" :rail="rail" width="300" rail-width="75">
|
||||
|
||||
<v-list>
|
||||
<v-row @click="goHome()" class="justify-center hidden-md-and-up">
|
||||
<v-img src="/assets/romm.svg" class="home-btn justify-center"></v-img>
|
||||
</v-row>
|
||||
<v-divider class="border-opacity-25 hidden-md-and-up"/>
|
||||
|
||||
<platform v-for="platform in platforms" :platform="platform" :rail="rail"/>
|
||||
</v-list>
|
||||
|
||||
@@ -42,3 +53,11 @@ emitter.emit('selectedPlatform', selectedPlatform.value)
|
||||
</v-navigation-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.home-btn {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||