Skip to content

Feature/refactor path conversion#20

Open
carlasplund wants to merge 24 commits intorobinbowes:developfrom
carlasplund:feature/refactor_path_conversion
Open

Feature/refactor path conversion#20
carlasplund wants to merge 24 commits intorobinbowes:developfrom
carlasplund:feature/refactor_path_conversion

Conversation

@carlasplund
Copy link
Copy Markdown
Contributor

refactor path_and_convert sub (step 1/5)

In a first step towards progress reporting during (parallel) 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.

carlasplund and others added 24 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.
@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