Posted by Michel Poulain on July 25, 2009 at 9:05am
3 followers
| Project: | iTunes |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
For the uploaded audio file «U Got Me (Burnin').m4a» this is the URL enclosure found in the iTunes RSS feed :<enclosure url="http://example.com/files/podcast_audio/U Got Me (Burnin').m4a" length="4333779" type="audio/mpeg" />
So iTunes returns this error after trying to retrieve the enclosure :
«The URL "http://example.com/files/podcast_audio/U Got Me (Burnin').m4a" could not be found on the server.»
The proper URL enclosure should have been :<enclosure url="http://example.com/files/podcast_audio/U%20Got%20Me%20%28Burnin'%29.m4a" length="4333779" type="audio/mpeg" />
Here is the fix. In script itunes.module [line 146] replace :
<?php
'url' => file_create_url($file['filepath']),
?>with :
<?php
'url' => str_replace(' ','%20',str_replace('%','%25',file_create_url($file['filepath']))),
?>Then, it works!
Comments
#1
I think your fix would work but it's kind of a band-aid on core issue. I'd actually suggest using the transliteration module: http://drupal.org/project/transliteration
#2
+1 for transliteration, very good module ! This issue should be marked as won't fix I guess !
#3
That or we can just require that transliteration be installed...
#4
thoughts?
#5
I think it's better to just advise to install the module. Because installing transliteration on 6.x will transliterate the already existing filenames and therefore break many manually edited links. See #199660: Convert pre-existing filenames