diff --git a/app/services/cache_service.py b/app/services/cache_service.py index 4e62823..f660512 100644 --- a/app/services/cache_service.py +++ b/app/services/cache_service.py @@ -97,7 +97,7 @@ class CacheService: if not self.cache.has_content(content_hash): return None - path = self.cache.get_content_path(content_hash) + path = self.cache.get_by_content_hash(content_hash) if not path or not path.exists(): return None @@ -193,7 +193,7 @@ class CacheService: if not self.cache.has_content(content_hash): return None, None, None - path = self.cache.get_content_path(content_hash) + path = self.cache.get_by_content_hash(content_hash) if not path or not path.exists(): return None, None, None @@ -231,7 +231,7 @@ class CacheService: if not self.cache.has_content(content_hash): return None, f"Content {content_hash} not in cache" - path = self.cache.get_content_path(content_hash) + path = self.cache.get_by_content_hash(content_hash) if not path or not path.exists(): return None, f"Content {content_hash} not in cache" @@ -354,7 +354,7 @@ class CacheService: "content_hash": content_hash, "ipfs_cid": ipfs_cid, "asset_name": meta.get("title") or content_hash[:16], - "asset_type": detect_media_type(self.cache.get_content_path(content_hash)), + "asset_type": detect_media_type(self.cache.get_by_content_hash(content_hash)), "origin": origin, "description": meta.get("description"), "tags": meta.get("tags", []), @@ -378,7 +378,7 @@ class CacheService: actor_id=actor_id, l2_server=l2_server, asset_name=meta.get("title") or content_hash[:16], - content_type=detect_media_type(self.cache.get_content_path(content_hash)) + content_type=detect_media_type(self.cache.get_by_content_hash(content_hash)) ) await self.db.update_item_metadata( content_hash=content_hash,