mirror of
https://github.com/rommapp/romm.git
synced 2026-12-05 05:07:31 +01:00
cleanup
This commit is contained in:
@@ -57,6 +57,7 @@ async def add_rom_manuals(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
if not _is_allowed_manual_file(filename):
|
||||
@@ -147,6 +148,7 @@ async def redownload_rom_manual(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
if not rom.url_manual:
|
||||
@@ -202,6 +204,7 @@ async def add_rom_manual_file(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
if rom.has_simple_single_file:
|
||||
@@ -310,6 +313,7 @@ async def delete_rom_manual_file(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
rom_file = db_rom_handler.get_rom_file_by_id(file_id)
|
||||
@@ -364,6 +368,7 @@ async def delete_rom_manuals(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
if not fs_resource_handler.manual_exists(rom):
|
||||
|
||||
@@ -37,6 +37,7 @@ async def get_rom_notes(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
if tags is None:
|
||||
@@ -67,6 +68,7 @@ async def get_rom_note_identifiers(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
notes = db_rom_handler.get_rom_notes(
|
||||
@@ -93,6 +95,7 @@ async def create_rom_note(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
note = db_rom_handler.create_rom_note(
|
||||
@@ -127,6 +130,7 @@ async def update_rom_note(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
note = db_rom_handler.update_rom_note(
|
||||
@@ -167,6 +171,7 @@ async def delete_rom_note(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
success = db_rom_handler.delete_rom_note(
|
||||
|
||||
@@ -55,6 +55,7 @@ async def add_rom_screenshots(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
if rom.has_simple_single_file:
|
||||
@@ -165,6 +166,7 @@ async def delete_rom_screenshot(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
rom_file = db_rom_handler.get_rom_file_by_id(file_id)
|
||||
|
||||
@@ -52,6 +52,7 @@ async def get_rom_soundtrack_metadata(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
tracks = db_rom_handler.get_rom_files_by_category(
|
||||
@@ -94,6 +95,7 @@ async def add_rom_soundtracks(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
if rom.has_simple_single_file:
|
||||
@@ -231,6 +233,7 @@ async def delete_rom_soundtrack(
|
||||
rom = db_rom_handler.get_rom(id)
|
||||
if not rom:
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
assert_rom_visible(request, rom)
|
||||
|
||||
rom_file = db_rom_handler.get_rom_file_by_id(file_id)
|
||||
|
||||
Reference in New Issue
Block a user