Merge pull request #67 from zurdi15/feature/ngc_support

Feature/ngc support
This commit is contained in:
Zurdi
2023-03-29 09:54:44 +02:00
committed by GitHub
5 changed files with 22 additions and 7 deletions

View File

@@ -42,11 +42,11 @@ async def updateRom(req: Request, p_slug: str, filename: str):
@app.delete("/platforms/{p_slug}/roms/{filename}")
async def delete_rom(p_slug: str, filename: str):
async def delete_rom(p_slug: str, filename: str, filesystem: bool=False):
"""Detele rom from filesystem and database"""
log.info("deleting rom...")
fs.delete_rom(p_slug, filename)
if filesystem: fs.delete_rom(p_slug, filename)
dbh.delete_rom(p_slug, filename)
return {'msg': 'success'}

View File

@@ -1,3 +1,11 @@
# v1.4 (_29-03-2023_)
## Added
- Gamecube support (https://github.com/zurdi15/romm#platforms-support)
## Changed
- Now delete game only deletes it from RomM gallery. To delete it from the filesystem too you need to allow it with the checkbox.
# v1.3 (_29-03-2023_)
## Fixed

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -14,6 +14,7 @@ const romNewName = ref(rom.value.filename)
const dialogSearchRom = ref(false)
const dialogEditRom = ref(false)
const dialogDeleteRom = ref(false)
const deleteFromFs = ref(false)
const router = useRouter()
// Event listeners bus
@@ -84,7 +85,7 @@ async function editRom() {
async function deleteRom() {
console.log('deleting rom '+ rom.value.filename)
await axios.delete('/api/platforms/'+rom.value.p_slug+'/roms/'+rom.value.filename)
await axios.delete('/api/platforms/'+rom.value.p_slug+'/roms/'+rom.value.filename+'?filesystem='+deleteFromFs.value)
.then((response) => {
console.log(response)
emitter.emit('snackbarScan', {'msg': rom.value.filename+" deleted successfully!", 'icon': 'mdi-check-bold', 'color': 'green'})
@@ -189,8 +190,6 @@ async function deleteRom() {
</v-col>
</v-row>
<!-- <v-divider class="mt-10 mb-10 border-opacity-75"/> -->
<v-dialog v-model="dialogSearchRom" scroll-strategy="none" width="auto" :scrim="false">
<v-card max-width="600">
<v-toolbar v-show="searching">
@@ -249,12 +248,15 @@ async function deleteRom() {
<v-btn icon @click="dialogDeleteRom=false" class="ml-1" rounded="0"><v-icon>mdi-close</v-icon></v-btn>
</v-toolbar>
<v-card-text class="pt-5 pr-10 pl-10">
<div class="text-body-1">This action can't be reversed. Do you confirm?</div>
<div class="text-body-1">Deleting from RomM. Do you confirm?</div>
</v-card-text>
<v-card-actions class="justify-center pb-6 pt-3 pr-3 pl-3">
<v-card-actions class="justify-center pt-3 pr-3 pl-3">
<v-btn @click="deleteRom()" class="bg-red mr-5">Confirm</v-btn>
<v-btn @click="dialogDeleteRom=false" variant="tonal">Cancel</v-btn>
</v-card-actions>
<div class="pl-8">
<v-checkbox v-model="deleteFromFs" label="Delete from filesystem"></v-checkbox>
</div>
</v-card>
</v-dialog>

View File

@@ -114,6 +114,7 @@ This will change over the time, adding games metadata for more platforms. Make s
| neocd | neocd | ❌ |
| neogeo | neogeo | ❌ |
| nes | Nintendo Entertainment System | ✅ |
| ngc | Nintendo GameCube | ✅ |
| ngp | ngp | ❌ |
| odyssey | odyssey | ❌ |
| pce | pce | ❌ |
@@ -139,3 +140,7 @@ This will change over the time, adding games metadata for more platforms. Make s
## 🧾 References
* Complete [changelog](https://github.com/zurdi15/romm/blob/master/CHANGELOG.md)
## Credits
* Pc icon support - <a href="https://www.flaticon.com/free-icons/keyboard-and-mouse" title="Keyboard and mouse icons">Keyboard and mouse icons created by Flat Icons - Flaticon</a>