Filter out recipes from media list

Recipes have their own section under /recipes, so exclude them
from the media list by checking node_type == "recipe".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-09 03:59:03 +00:00
parent 5ba66ed11e
commit 83244aaa05

View File

@@ -2380,6 +2380,10 @@ async def list_media(
if content_hash not in user_hashes:
continue
# Skip recipes - they have their own section
if cached_file.node_type == "recipe":
continue
meta = await database.load_item_metadata(content_hash, ctx.actor_id)
# Apply folder filter
@@ -3790,6 +3794,10 @@ async def ui_media_list(
if content_hash not in user_hashes:
continue
# Skip recipes - they have their own section
if cached_file.node_type == "recipe":
continue
# Load metadata for filtering
meta = await database.load_item_metadata(content_hash, ctx.actor_id)