Skip to content

Feature/buffer message output#21

Open
carlasplund wants to merge 26 commits into
robinbowes:developfrom
carlasplund:feature/buffer_message_output
Open

Feature/buffer message output#21
carlasplund wants to merge 26 commits into
robinbowes:developfrom
carlasplund:feature/buffer_message_output

Conversation

@carlasplund

Copy link
Copy Markdown
Contributor

buffer message output (step 2/5)

In this second step towards progress reporting the messages from
transcoding and tagging are not displayed immediately on screen, but
saved to an array variable and displayed once the respective forked
child exits. Without this step, there is no control over the
order by with the messages appear when using several parallel
processes, and progress reporting would look a complete mess.

A callback subroutine is used to output the messages. It is
called via the method 'run_on_finish' from the module
Parallel::Forkmanager.

carlasplund and others added 26 commits February 27, 2013 23:38
Added option "--copyfiles" (Copy non-flac files to dest
directories)

When this option is selected, non-flac files present in the source
directories are copied to the target directories (which, for some, is
another way of handling album
art). Copying only takes place when the source and target md5
hashes don't match.
Non-flac files ar no longer copied by default.
Preparing for a a new fresh start with git flow, therefore resetting
'master' to match Robins 'develop' branch as of 2013-03-09
testing to pull request from Robin to match his 'develop' branch
Define a new subroutine msg_info which prints messages to screen only if option{info} is true. No need to use the check to info flag ( $Options{info} && msg(...) ) every time something is to be displayed.

Also fix a few bugs, where message output was not properly suppressed with the --quiet option set.
With both --copy and --pretend options selected a directory could sometimes be created in destination (it shouldn't be possible).
As a service to windows users, the paths to typical locations of lame and flac are provided. These will work for most (intended for people who haven't included these paths into the envionment variables).
Functionality is unchanged, but the way source and target file paths are retrieved is more generalized. This is an intermediary step towards the implementation of the "--delete" option.
This option works as the --delete option in "rsync": it deletes surplus files and directories in the destination, keeping in perfect sync with the source dir.
Improve readabiliy of the main program by moving the code for (non-flac) file
copying to a subroutine.
In a first step towards progress reporting during transcoding,
refactor code for the 'path_and_conversion' sub. The checking of
flags that determine whether a file should be transcoded is
lifted into this sub from 'transcode_file'. The latter sub
therefore loses a wrapping if-statement and consequently also
loses an indentation step, which makes the changeset look
much messier than it actually is.

The sub 'convert_file' is no longer used.
In this second step towards progress reporting the messages from
transcoding and tagging are not display immediately on screen, but
saved to an array variable and displayed once the respective forked
child exits. Without this step, there is no real control over the
order by with the messages appear when using several parallel
processes, and progress reporting would look a complete mess.

A callback subroutine is used to output the messages. It is
called via the method 'run_on_finish' from the module
Parallel::Forkmanager.
@robinbowes robinbowes force-pushed the develop branch 2 times, most recently from fdbfca0 to ae49d07 Compare December 23, 2014 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant