diff --git a/app/services/id3_tag_service.rb b/app/services/id3_tag_service.rb index 4725dc43..ddca8674 100644 --- a/app/services/id3_tag_service.rb +++ b/app/services/id3_tag_service.rb @@ -66,10 +66,18 @@ def apply_track_specific_v2_tags(mp3) def apply_album_art(mp3) return unless show.album_cover.attached? + + # Process variant for ID3 tag album_cover_variant = show.album_cover.variant(:id3).processed + + # Attach album art to ID3 tag album_art_data = album_cover_variant.download mp3.tag2.add_picture(album_art_data) - album_cover_variant.blob.purge + + # Remove variant blob + blob = album_cover_variant.blob + blob.attachments.each(&:destroy) + blob.purge end def comments