Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jcraigk committed Nov 3, 2024
1 parent 37b012a commit 6fedb14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 72 deletions.
5 changes: 3 additions & 2 deletions app/models/track.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ def urls
end

def save_duration
duration = Mp3DurationQuery.call(mp3_audio)
update_column(:duration, duration)
mp3_audio.analyze unless mp3_audio.analyzed?
duration_ms = (mp3_audio.blob.metadata[:duration] * 1000).round
update_column(:duration, duration_ms)
end

def generate_waveform_image(purge_cache: false)
Expand Down
34 changes: 0 additions & 34 deletions app/services/mp3_duration_query.rb

This file was deleted.

36 changes: 0 additions & 36 deletions spec/services/mp3_duration_query_spec.rb

This file was deleted.

0 comments on commit 6fedb14

Please sign in to comment.