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,
|
||||
) -> List[Dict[str, Any]]:
|
||||
"""List media items in cache."""
|
||||
# Get items from database
|
||||
items = await self.db.list_cache_items(
|
||||
# Get items from database (uses item_types table)
|
||||
items = await self.db.get_user_items(
|
||||
actor_id=actor_id or username,
|
||||
media_type=media_type,
|
||||
offset=offset,
|
||||
item_type=media_type, # "video", "image", "audio", or None for all
|
||||
limit=limit,
|
||||
offset=offset,
|
||||
)
|
||||
return items
|
||||
|
||||
|
||||
Reference in New Issue
Block a user