-def getCollectionName(arv, uuid):
- if uuid not in collectionNameCache:
- u = arv.collections().get(uuid=uuid).execute()
- collectionNameCache[uuid] = u["name"]
- return collectionNameCache[uuid]
+def getCollectionName(arv, pdh):
+ if pdh not in collectionNameCache:
+ u = arv.collections().list(filters=[["portable_data_hash","=",pdh]]).execute().get("items")
+ if len(u) < 1:
+ return "(deleted)"
+ collectionNameCache[pdh] = u[0]["name"]
+ return collectionNameCache[pdh]