Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threaded batch mode #28

Merged
merged 2 commits into from Feb 19, 2019
Merged

Threaded batch mode #28

merged 2 commits into from Feb 19, 2019

Conversation

sezanzeb
Copy link
Contributor

@sezanzeb sezanzeb commented Feb 19, 2019

  • threaded conversion in batch mode
  • reduced number of prints with -q
  • -t option: when -q is provided don't print nothing at all, rather just hide errors and files without tags
    because otherwise the combination of -t and -q makes no sense at all
  • removed info about which gtk version is used and such. Not relevant to the user
  • fixed an error from one of my recent commits
  • added -c mode, doing what the gtk interface does when loading files. showing which ones cannot
    be converted.
  • the CliProgress class accepts multiple arguments like print to create messages now:
    show("a", "b")
  • nicer console output

example output of -b (-q disables all output):

SoundConverter 3.0.1

checking files and walking dirs in the specified paths...
Queue start: 36 tasks, 4 thread(s).
Queue done in 0.052s (36 tasks)

preparing converters...
overwriting '/funky_files/converted/original/audio 2.ogg'
skipping 'not_music.ogg': invalid soundfile
skipping 'not_music.flac': invalid soundfile
(...)
overwriting '/funky_files/converted/original/foo/audio 4.ogg'
overwriting '/funky_files/converted/original/foo/bar/audio 5.ogg'
overwriting '/funky_files/converted/original/foo/bar/audio 6.ogg'

starting conversion...
Queue start: 6 tasks, 4 thread(s).
1/6: '/funky_files/original/audio 2.flac'
2/6: '/funky_files/original/audio 1.flac'
3/6: '/funky_files/original/foo/audio 3.flac'
4/6: '/funky_files/original/foo/audio 4.flac'
5/6: '/funky_files/original/foo/bar/audio 5.flac'
6/6: '/funky_files/original/foo/bar/audio 6.opus'
Queue done in 12.346s (6 tasks)

example output of -c (-q just prints a naked list of file paths):

SoundConverter 3.0.1
Queue start: 36 tasks, 4 thread(s).
Queue done in 0.052s (36 tasks)

Non-Audio Files:
/funky_files/original/not_music.ogg
/funky_files/original/not_music.flac
(...)
/funky_files/original/pictures/pic (another copy).jpg

@sezanzeb
Copy link
Contributor Author

sezanzeb commented Feb 19, 2019

after this PR the last thing I want to implement in batch mode is instead of overwriting, adding a (1), (2), .. suffix, just like the gtk tool. But that has low priority for me, idk when I will do that

@sezanzeb
Copy link
Contributor Author

And I'll write a test for prepare_files_list later

@kassoulet kassoulet merged commit c25fb3f into kassoulet:py3k Feb 19, 2019
@kassoulet
Copy link
Owner

Great, thanks!

sezanzeb pushed a commit to sezanzeb/soundconverter that referenced this pull request Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants