tblancher / pymazon

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

Output filenames don't have a track number #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download some songs.
2. BAM!
3.

What is the expected output? What do you see instead?
I was expecting the track number to be included in the filenames somehow...

What version of the product are you using? On what operating system?
pymazon 0.1.0 on Ubuntu 9.10

Please provide any additional information below.
The choice of filename is a personal choice, but the code should allow for 
specifying those sorts of choices. I've attached a patch that will give the 
Track class a function that will format its info according to a given 
format string. Then, the Downloader will have an optional argument in its 
constructor for the format_string to be used. If no format string is given, 
it will default to the format currently being used. (And I will personally 
make my format string: "{NUM} - {TITLE}.mp3")

This patch doesn't change the behavior of the program immediately, but it 
does open things up a little, so that there can be a "Filename format" 
option in the GUI somewhere down the road. (Also, the patch is against 
pymazonbackend.py)

Anyways, best wishes. :)

-Ray

Original issue reported on code.google.com by raydo...@gmail.com on 21 Jan 2010 at 1:57

Attachments:

GoogleCodeExporter commented 8 years ago
... and here's a patch against the current version in the repositories. Thanks 
for 
this awesome product, btw!

-Ray

Original comment by raydo...@gmail.com on 21 Jan 2010 at 2:35

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by SCColbert@gmail.com on 21 Jan 2010 at 4:28

GoogleCodeExporter commented 8 years ago
This is a good idea, I suppose I should make a settings dialog or command line 
option 
for this. If possible, I want to stay away from config files because I dont 
know how 
those work on Windows with regards to the directory location. But at the same 
time, 
having to specify settings everytime you run Pymazon would suck...

Original comment by SCColbert@gmail.com on 21 Jan 2010 at 4:35

GoogleCodeExporter commented 8 years ago

Original comment by SCColbert@gmail.com on 21 Jan 2010 at 4:41

GoogleCodeExporter commented 8 years ago
This is fixed in the source tree. The format defaults to '${tracknum} - 
${title}' but 
can be changed via command line argument or a configuration file.

Original comment by SCColbert@gmail.com on 22 Jan 2010 at 4:29