mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
[ROMM-1895] Fix hiding hidden roms in lists
This commit is contained in:
@@ -23,6 +23,7 @@ from sqlalchemy import (
|
||||
text,
|
||||
update,
|
||||
)
|
||||
from sqlalchemy.exc import InvalidRequestError
|
||||
from sqlalchemy.orm import InstrumentedAttribute, Query, Session, selectinload
|
||||
|
||||
from .base_handler import DBBaseHandler
|
||||
@@ -294,9 +295,7 @@ class DBRomsHandler(DBBaseHandler):
|
||||
)
|
||||
)
|
||||
|
||||
def filter_by_status(self, query: Query, selected_status: str):
|
||||
query = query.join(RomUser)
|
||||
|
||||
def filter_by_status(self, query: Query, selected_status: str | None):
|
||||
status_filter = RomUser.status == selected_status
|
||||
if selected_status == "now_playing":
|
||||
status_filter = RomUser.now_playing.is_(True)
|
||||
@@ -467,15 +466,14 @@ class DBRomsHandler(DBBaseHandler):
|
||||
if selected_age_rating:
|
||||
query = self.filter_by_age_rating(query, selected_age_rating)
|
||||
|
||||
if selected_status:
|
||||
query = self.filter_by_status(query, selected_status)
|
||||
|
||||
if selected_region:
|
||||
query = self.filter_by_region(query, selected_region)
|
||||
|
||||
if selected_language:
|
||||
query = self.filter_by_language(query, selected_language)
|
||||
|
||||
query = self.filter_by_status(query, selected_status)
|
||||
|
||||
return query
|
||||
|
||||
@with_simple
|
||||
|
||||
@@ -36,8 +36,8 @@ function closeDialog() {
|
||||
color="primary-darken"
|
||||
>
|
||||
<template #text>
|
||||
<v-row class="d-flex align-center px-2">
|
||||
<v-icon :icon="snackbarStatus.icon" class="mx-2" />
|
||||
<v-row class="d-flex align-start flex-row flex-nowrap px-2">
|
||||
<v-icon :icon="snackbarStatus.icon" class="mx-2 mt-1" />
|
||||
<span class="text-subtitle-1 font-weight-regular">
|
||||
{{ snackbarStatus.msg }}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user