We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4c9860 commit c7964d4Copy full SHA for c7964d4
app/services/id3_tag_service.rb
@@ -69,7 +69,7 @@ def apply_album_art(mp3)
69
70
# Process and download the ID3 variant
71
album_cover_variant = show.album_cover.variant(:id3).processed
72
- album_art_data = album_cover_variant.download
+ return unless album_art_data = album_cover_variant.download
73
74
# Attach album art to ID3 tag
75
mp3.tag2.add_picture(album_art_data)
app/services/track_inserter.rb
@@ -33,12 +33,13 @@ def show
33
end
34
35
def insert_new_track
36
- track = Track.new \
+ track = Track.new(
37
show:,
38
title:,
39
songs: [ Song.find(song_id) ],
40
position:,
41
set:
42
+ )
43
track.slug = slug if slug.present?
44
track.save!
45
track.mp3_audio.attach(io: File.open(file), filename: File.basename(file))
0 commit comments