wlevine / clamz

Command-line downloader for Amazon MP3
GNU General Public License v3.0
2 stars 0 forks source link

File name too long -- should truncate or use a default #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0. configure clamz to use NameFormat "${album_artist} - ${album} - ${tracknum} 
- ${title} - ${creator}.${suffix}"
1. go to <http://www.amazon.com/gp/product/B004EI4YTM>
2. select "Get MP3 Album" to download free album
3. run clamz "manually" on the .amz file (so you can see the output)

What is the expected output? What do you see instead?

* Should download all 18 tracks. Doesn't download tracks 1 and 16 because the 
resulting filenames are too long.
* For example, the first track results in:
<<
ERROR: Unable to open "/home/dcljr//Various Artists - Linn Records 'Label of
the Year' Classical Highlights - 01 - Symphony No.31 in D major
(Paris), K.297 - Allegro assai from the album Mozart Symphonies 29, 31
(Paris), 32, 35 (Haffner) - Scottish Chamber Orchestra _ Sir Charles
Mackerras.mp3" (File name too long)
>>

What version of the product are you using? On what operating system?

clamz-0.4 on Gentoo Linux (via 'net-misc/clamz-0.4' ebuild)

Please provide any additional information below.

* A workaround: temporarily change to, say, NameFormat "${album} - ${tracknum} 
- ${creator}.${suffix}" to shorten filenames.

* But if the program "knows" what the problem is (a long filename), couldn't it 
just truncate the name (to, say, 250 characters) and try again? Alternatively, 
it could use a default naming scheme, such as the .amz file name with a 
counting number (tracknum?) appended, like this: 'AmazonMP3-1298862895-01.mp3'.

Original issue reported on code.google.com by Donald.L...@gmail.com on 28 Feb 2011 at 4:08

GoogleCodeExporter commented 9 years ago
This severely affects the latest set of cheap classical albums available from 
amazon (Supreme Classical Masterpieces-Rise of the Masters" (beethoven, vivaldi 
and debussy are affected). Having to manually download 5 mp3s out of 100 is no 
fun.

I would be strongly in favour of simply truncating to maximum length, or at 
least having an option to do so (and doing so by default).

Original comment by smt...@gmail.com on 28 Jan 2012 at 9:01