Skip to content

Commit

Permalink
add logging to recording composer
Browse files Browse the repository at this point in the history
  • Loading branch information
codez committed Apr 16, 2018
1 parent 0188755 commit d4f788a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* create script to import partial broadcasts
* reduce memory usage of import
* create script to adjust playback formats to update old playback formats to the current ones

* add podcasts
3 changes: 3 additions & 0 deletions app/services/import/recording/composer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module Recording
# In the case that recordings overlap each other, they are trimmed to build an adjacent stream.
class Composer

include Loggable

attr_reader :mapping, :recordings

def initialize(mapping, recordings)
Expand Down Expand Up @@ -140,6 +142,7 @@ def trim_available(recording, start, duration)
end

def trim(file, start, duration)
inform("Trimming #{file} from #{start.round}s to #{(start + duration).round}s")
new_tempfile(file).tap do |target_file|
proc = AudioProcessor.new(file)
proc.trim(target_file.path, start, duration)
Expand Down

0 comments on commit d4f788a

Please sign in to comment.