PiRSquared17 / flac2all

Automatically exported from code.google.com/p/flac2all
0 stars 0 forks source link

Possibility to include input directory as top-level in output directory #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Enhancement request.
Right now flac2all copies the directory structure one level under input dir, I 
would like it to also create the top-level directory itself.

When I:
1. Want to copy Artist/Album directory structure with multiple albums, I would 
like it when de Artist directory is created in the output folder, with Album 
directories underneath (with Artist as input dir)
2. Want to copy a single Album directory: create the Album dir, with files in 
it.

I'm no programmer, but this modification of 3.71 seems to work for me.

606c606
<         outdirFinal = opts['outdir'] + os.path.split(current_file_local)[0]

---
>         outdirFinal = opts['outdir'] + os.path.split(opts['dirpath'])[1] + 
os.path.split(current_file_local)[0]

PS. 
Nice tool! Was searching for something like it for a while.

Original issue reported on code.google.com by ljro...@gmail.com on 4 Mar 2015 at 7:57

GoogleCodeExporter commented 9 years ago
Hmm, I understand where you are coming from, however for over 10 years flac2all 
has worked this way, and your change could break a lot of peoples current 
workflow, mine included :-)

As such I would not make this the default, but rather I would make it an option 
to include the "root" directory. I'm thinking possibly '-r'.

I will see what to do about it. 

Thanks! I'm glad you like the tool. Always nice to know it helps others as much 
as it helps me. 

Original comment by i...@ziva-vatra.com on 5 Mar 2015 at 3:58

GoogleCodeExporter commented 9 years ago
Adding this as an option sounds perfect to me, the most logical thing to do. 
Would be great to see this added! Until then I can just use my slightly 
modified version.

Original comment by ljro...@gmail.com on 9 Mar 2015 at 10:18