refactor(enrichment): post tag name omits post: prefix
The inner platform:artist:id identifier remains as opaque tag.name. Kind column carries 'post'. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ Metadata enrichment from Gallery-DL sidecar JSON files.
|
||||
This module handles:
|
||||
- Detection and parsing of Gallery-DL sidecar .json files
|
||||
- Extraction of metadata (dates, tags, post info) from various platforms
|
||||
- Tag generation for source tracking (source:platform, post:platform:artist:id)
|
||||
- Tag generation for source tracking (source:platform, {platform}:{artist}:{id} for post)
|
||||
- Date conflict resolution (earliest date wins)
|
||||
"""
|
||||
|
||||
@@ -449,7 +449,7 @@ def generate_source_tags(metadata: dict, artist_override: Optional[str] = None)
|
||||
Returns a list of tag dictionaries with 'name' and 'kind' keys.
|
||||
Tag format ensures uniqueness:
|
||||
- source:{platform} (kind='source')
|
||||
- post:{platform}:{artist}:{post_id} (kind='post')
|
||||
- {platform}:{artist}:{post_id} (kind='post')
|
||||
"""
|
||||
tags = []
|
||||
|
||||
@@ -469,7 +469,7 @@ def generate_source_tags(metadata: dict, artist_override: Optional[str] = None)
|
||||
# Sanitize artist name for tag (lowercase, replace spaces)
|
||||
safe_artist = artist.lower().replace(" ", "_")
|
||||
tags.append({
|
||||
"name": f"post:{platform}:{safe_artist}:{post_id}",
|
||||
"name": f"{platform}:{safe_artist}:{post_id}",
|
||||
"kind": "post"
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user