Bug 305134 - Amarok fails to copy mp3 tracks from Local Collection to iPod in de locale saying MP3 format is not supported
Summary: Amarok fails to copy mp3 tracks from Local Collection to iPod in de locale sa...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/iPod iPhone (show other bugs)
Version: 2.6.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 2.7
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-14 13:20 UTC by Adrian Batzill
Modified: 2012-08-15 00:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.7
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Batzill 2012-08-14 13:20:15 UTC
Hey there,
I just tried amarok 2.6 for the improved IPod support. However, it doesn't work at all for me.
Some of the errors and messages below might be a bit different in the english version. I'm translating freely from german.
IPod specifics:
Model: Nono (Black)
Generation: Nano Video (4th Gen.)
Video: Supported
Album-Cover: Supported
System-Info-File: Available
Extended System-Info-File: Available
Nano Video (4th Gen.) family uses SysInfoExtended file to generate correct database checksum
Ipod Name: kos Nanopod (yes, there is a space in there. Could this possibly cause the issue?)

The version I'm using is the one from the Ubuntu Quantal 12.10 repository. However, I installed the package and the required dependencies on Precise 12.04.
So everytime I try to copy files (mp3) to the IPod, I get this error (again, translated freely from german):
The transfer of some Songs failed.
Upon clicking on the "Details" button, it says:
1 Song could not be copied, because it is not playable - the MP3 format is not supported.

This happens with every song.
I have no idea what could cause the problem. But I suspect that the space in the filename might be bad (but can't rename it right now to test).

Reproducible: Always

Steps to Reproduce:
1. Start amarok
2. Connect IPod
3. Right click on any item in the collection and try to copy it to the IPod
4. Error
Actual Results:  
The files are not copied, an error is displayed

Expected Results:  
The files should be copied.

The only console output when running amarok -d and the error comes up is this:
amarok: [CollectionTreeView] checking for global actions 
amarok: BEGIN: void CollectionTreeView::copyTracks(const QSet<CollectionTreeItem*>&, Collections::Collection*, bool) const 
amarok:   [CollectionTreeView] starting source->prepareCopy 
amarok:   BEGIN: void Collections::CollectionLocation::prepareCopy(Collections::QueryMaker*, Collections::CollectionLocation*) 
amarok:   END__: void Collections::CollectionLocation::prepareCopy(Collections::QueryMaker*, Collections::CollectionLocation*) [Took: 0s] 
amarok: END__: void CollectionTreeView::copyTracks(const QSet<CollectionTreeItem*>&, Collections::Collection*, bool) const [Took: 0s] 
amarok: BEGIN: void Collections::CollectionLocation::queryDone() 
amarok:   [CollectionLocation] we were about to copy something, lets proceed 
amarok:   BEGIN: void Collections::CollectionLocation::startWorkflow(const TrackList&, bool) 
amarok:   END__: void Collections::CollectionLocation::startWorkflow(const TrackList&, bool) [Took: 0s] 
amarok: END__: void Collections::CollectionLocation::queryDone() [Took: 0s] 
amarok: BEGIN: virtual void Collections::CollectionLocation::getKIOCopyableUrls(const TrackList&) 
amarok:   [CollectionLocation] adding url  KUrl("file:///home/ben/Musik/The Beatles/1964_Beatles For Sale/02 I'm A Loser.mp3") 
amarok:   BEGIN: void Collections::CollectionLocation::slotStartCopy(const QMap<KSharedPtr<Meta::Track>, KUrl>&, const Transcoding::Configuration&) 
amarok:   END__: void Collections::CollectionLocation::slotStartCopy(const QMap<KSharedPtr<Meta::Track>, KUrl>&, const Transcoding::Configuration&) [Took: 0s] 
amarok: END__: virtual void Collections::CollectionLocation::getKIOCopyableUrls(const TrackList&) [Took: 0s] 
QWidget::setMinimumSize: (Media Sources dock/BrowserDock) Negative sizes (144,-1) are not possible
amarok: BEGIN: void Collections::CollectionLocation::slotFinishCopy() 
amarok: END__: void Collections::CollectionLocation::slotFinishCopy() [Took: 0s] 
QWidget::setMinimumSize: (Media Sources dock/BrowserDock) Negative sizes (144,-1) are not possible
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x5800270


The last X Error comes up when I press the close button of the window.
Comment 1 Matěj Laitl 2012-08-14 20:41:39 UTC
(In reply to comment #0)
> Hey there,
> I just tried amarok 2.6 for the improved IPod support. However, it doesn't
> work at all for me.

Hi Adrian, thanks for your report.

> Some of the errors and messages below might be a bit different in the
> english version. I'm translating freely from german.
> Nano Video (4th Gen.) family uses SysInfoExtended file to generate correct
> database checksum
> Ipod Name: kos Nanopod (yes, there is a space in there. Could this possibly
> cause the issue?)

No, even crazy iPod names should be handled just fine.

> So everytime I try to copy files (mp3) to the IPod, I get this error (again,
> translated freely from german):
> The transfer of some Songs failed.
> Upon clicking on the "Details" button, it says:
> 1 Song could not be copied, because it is not playable - the MP3 format is
> not supported.

While this seems silly, I think the problem is that the "MP3" is upper-cased here. (if this string is carbon-copy) Can you confirm it by clicking the "Edit Track Details" of the track that fails to copy, what exactly does it's Format show?

The thing is that all tracks should return lowercased format, but it seems that we're accidentally translating more that we thought since Albert Astals Cid's commit that fixed another thing ( http://commits.kde.org/amarok/6f6161417c83c3841b2814742cf72ca0443d6edf ) and Germain translation perhaps translates "mp3" to "MP3".

Albert, could that be?

Adrian, would you be able to build from sources [1]? The patch will be simple fix to FileTypeSupport::toString() to translate only what should be translated, but now it won't unfortunately make it to 2.6.0. And an obvious work-around would be to switch to non-de locale using Help -> Switch Application Language.

[1] http://blogs.fsfe.org/myriam/2009/09/compiling-amarok-from-git-locally-full-summary/
Comment 2 Adrian Batzill 2012-08-14 20:47:21 UTC
Hey there,
I can't compile from source right now, sorry.
However, your guess was absolutely right! The format is shown as MP3 instead of mp3.
Changing the language to english solved the problem.
Comment 3 Albert Astals Cid 2012-08-14 21:09:09 UTC
Yes, it can be, sorry my patch created this untought consequence, documenting what we discussed on irc.

We can do the quick fix that is going back to only translating the "Other" or the "correct" fix that is investigating all the calls to that function and deciding if it has to be a visible string or not and then creating a new function that returns the non translated string for the cases it is not a visible string.
Comment 4 Matěj Laitl 2012-08-15 00:11:19 UTC
Git commit fd3ae2019e5fee4400de996daaef472205e35d85 by Matěj Laitl.
Committed on 15/08/2012 at 01:47.
Pushed by laitl into branch 'master'.

FileType: don't translate all file types, just the "Other"

This fixes a bug where tracks cannot be copied to iPods in de locale
because mp3 is apparently translated to MP3 there and IpodCollection
compares it case-sensitively against a list of supported file types,
which fails.

For easier back-portability, this patch includes only the actual fix,
second part with misc changes (like ChangeLog and docstrings) will
follow.
FIXED-IN: 2.7

M  +3    -3    shared/FileType.cpp

http://commits.kde.org/amarok/fd3ae2019e5fee4400de996daaef472205e35d85
Comment 5 Matěj Laitl 2012-08-15 00:11:57 UTC
Git commit bf949a8825d954ec29505659c69e14ecbb7e2ce8 by Matěj Laitl.
Committed on 15/08/2012 at 01:55.
Pushed by laitl into branch 'master'.

ChangeLog for previous commit

...this time it is intentionally split.

M  +1    -0    ChangeLog

http://commits.kde.org/amarok/bf949a8825d954ec29505659c69e14ecbb7e2ce8
Comment 6 Matěj Laitl 2012-08-15 00:12:32 UTC
Git commit 8057ab648444ffcbb8f02df42c0e96b4deb972e4 by Matěj Laitl.
Committed on 15/08/2012 at 02:03.
Pushed by laitl into branch 'master'.

FileType: document pitiful situation wrt i18n, sketch solution

Also document other Amarok::FileType methods.
CCMAIL: Albert Astals Cid <aacid@kde.org>

M  +19   -0    shared/FileType.h
M  +6    -1    src/core/meta/Meta.h

http://commits.kde.org/amarok/8057ab648444ffcbb8f02df42c0e96b4deb972e4