Fix list_media to use get_user_items instead of list_cache_items
list_cache_items doesn't accept actor_id parameter. Use get_user_items which properly filters by actor_id and item_type. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -489,12 +489,12 @@ class CacheService:
|
|||||||
media_type: str = None,
|
media_type: str = None,
|
||||||
) -> List[Dict[str, Any]]:
|
) -> List[Dict[str, Any]]:
|
||||||
"""List media items in cache."""
|
"""List media items in cache."""
|
||||||
# Get items from database
|
# Get items from database (uses item_types table)
|
||||||
items = await self.db.list_cache_items(
|
items = await self.db.get_user_items(
|
||||||
actor_id=actor_id or username,
|
actor_id=actor_id or username,
|
||||||
media_type=media_type,
|
item_type=media_type, # "video", "image", "audio", or None for all
|
||||||
offset=offset,
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
offset=offset,
|
||||||
)
|
)
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user