Converting without write permissions
I wanted to use dir2ogg to convert some files, however, they were located in a directory with which I did not have write permissions.
dir2ogg produced an error when trying to decode (unable to write), and decode (unable to find):
01 - Melatonin.flac: ERROR: can't open output file /media/
Warning: Decoding of "/media/
The solution to this issue was to modify the variables located around line 321 to allow for a path to be inserted thus any decoding, and encoding will be done in the specified directory.
The path /tmp/ogg works for me as I have write permissions for that and any work with the files does not have to be done over the network as it would if I were writting into the directory where the song is located.
I believe this change will only effect the outcome when the arguments are files, I think a different section of the script is used for directories.
I have virtually no python script experiences so who knows.
I hope that future versions might allow me to define a temporary, or "working" directory to allow for this type of situation. In addition more and more people aren't storing their sound files locally, but instead on a network drive. Allowing for a temporary directory to be define will allow for flexibility for those who do not wish to back to the original directory, or in my case are unable to transfer them back due to permissions.
Thanks for putting together such a wonderful script, it's the only one I found that is able to carry over the Tags as a feature and has a command line interface. Truly a wonderful creation.