Bug 133571 - Amarok causes Ipod database corruption
Summary: Amarok causes Ipod database corruption
Status: RESOLVED WORKSFORME
Alias: None
Product: amarok
Classification: Applications
Component: Collections/iPod iPhone (show other bugs)
Version: 1.4.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-05 00:15 UTC by Paul
Modified: 2011-12-20 11:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul 2006-09-05 00:15:10 UTC
Version:           1.4.2 (using KDE KDE 3.5.4)
Installed from:    Ubuntu Packages
OS:                Linux

I am also having problems with Amarok since the 1.4 betas and my 60gig photo ipod. When the ipod is connected and mounted, Amarok instantly does something to wipe all the songs except one artist from the menu's database. All the tracks appear as invisible.

Here is a screen shot -

http://img462.imageshack.us/img462/1107/untitled4ro2.png

When the ipod is unmounted and ejected, only that one artist shown in the image appears on the ipod's artist menu. I boot into windows and use anapod to restore everything and it is all back to normal. This does not happen with any other application such as rhythmbox for linux. I don't even have to play a file from the ipod for this to happen. This never happened with 1.38. I am using Kubuntu and this has occured with the 1.4 betas, release and is happening with the new 1.41 release. Any ideas how I can fix this?

Also see the thread here - 

http://amarok.kde.org/forum/index.php/topic,9127.0.html
Comment 1 Paul 2006-09-05 00:16:22 UTC
I have never used itunes only anapod on Windows. The ipod functioned fine with Amarok 1.38 and works perfect with rhythmbox.
Comment 2 Seb Ruiz 2006-09-05 00:54:41 UTC
Works fine for me with a 60gb video ipod.

There is an entry in the browser which says either stale or orphan items, suggesting there is no database entry for those files.  You will still notice that the files are still on the disk (look at the disk capacity at the bottom).

Right click on the item with the red X, and select add items to database to repair the ipod.

FWIW, which version of libgpod are you using?
Comment 3 Paul 2006-09-05 02:16:16 UTC
Hi,
I am using libgpod 03.2.0, amarok 1.42

> There is an entry in the browser which says either
> stale or orphan items, suggesting there is no
> database entry for those files.  You will still
> notice that the files are still on the disk (look at
> the disk capacity at the bottom).
> 
> Right click on the item with the red X, and select
> add items to database to repair the ipod.


I do not have that option to "add items to database" I
have:

Load
Append To Playlist
Queue Tracks
Copy Files To Collection
Burn to CD as Data
Burn To CD As Audio
Delete 6172 tracks from Ipod
Repair Ipod
      -Scan For Orphaned And Missing Files
      -Refresh cover images

Is it one of those?

Thank you,
Paul
Comment 4 Seb Ruiz 2006-09-05 02:33:56 UTC
You should be right clicking on the Item which says either Stale or Orphaned Items
Comment 5 Paul 2006-09-05 02:43:39 UTC
I do not see that option. Even though this picture is
a few months old, it looks exactly like it.

http://img462.imageshack.us/img462/1107/untitled4ro2.png

--- Seb Ruiz <me@sebruiz.net> wrote:

[bugs.kde.org quoted mail]
Comment 6 Seb Ruiz 2006-09-05 04:38:27 UTC
Strange, seems like those items are invisible.  I'll add Martin to this list, as he is the ipod dev.
Comment 7 Martin Aumueller 2006-09-06 04:46:00 UTC
What's the difference between this single artist that remains and the others? Was this artist added originally by anything other than anapod?

Do you use ipod smart playlists?

An explanation what 'invisible' means: invisible tracks are not on your 'master playlist'. This means, that they are not accessible from the artist/genre/album/whatever browser on your ipod - at least that was what happened to me.
Comment 8 Paul 2006-09-06 05:15:27 UTC
> What's the difference between this single artist
> that remains and the others?


There doesn't seem to be any. If I remove them from my
ipod it will just randomly occur with another artist
after I have rebuilt the database and connect it to
Amarok. It was also put there on the same day as 99
percent of the files. I did a clean install of my ipod
last month using Apple's restore.

> Do you use ipod smart playlists?


No, I do not.

> An explanation what 'invisible' means: invisible
> tracks are not on your 'master playlist'.


Correct. After Amarok does this they are no longer on
the playlist or visable on the Ipod at all. I need to
rebuild the database in order for them to be viewed on
the ipod itself. The invisible files can be added to
Amarok's play list though and from there they play
fine. It is just that once it is disconnected, I can't
really use the ipod to go anywhere until I fix the
database. The database can be read fine by Rythmmbox
in linux and foobar/winamp on Windows. Once
disconnected from those application the database
remains intact.
I did a fresh, clean installation of Kubuntu today
with KDE 3.54 and Amarok 1.4.2 and still have the same
problem. It worked fine with the 1.39 Amarok that came
installed by default, but I still have a few m4a files
that I would like to play.
Thanks,
Paul


--- Martin Aumueller <aumuell@reserv.at> wrote:

[bugs.kde.org quoted mail]
----------------------------------------------------------------------------
>              Status|RESOLVED                   
> |UNCONFIRMED
>          Resolution|WORKSFORME                  |
> 
> 
> 
> ------- Additional Comments From aumuell reserv at 
> 2006-09-06 04:46 -------
> What's the difference between this single artist
> that remains and the others? Was this artist added
> originally by anything other than anapod?
> 
> Do you use ipod smart playlists?
> 
> An explanation what 'invisible' means: invisible
> tracks are not on your 'master playlist'. This
> means, that they are not accessible from the
> artist/genre/album/whatever browser on your ipod -
> at least that was what happened to me.
> 

Comment 9 Martin Aumueller 2006-09-25 23:58:36 UTC
Could you please try if you also have this problem with gtkpod? And could you please also try if libgpod 0.4.0 fixes this? (You will have to recompile Amarok for using the updated libgpod, though.)
Comment 10 Martin Aumueller 2006-10-21 11:33:35 UTC
What hardware platform are you on (32 bit, 64 bit, powerpc, ...)? Does edgy fix this?
Comment 11 Martin Aumueller 2006-10-21 12:43:42 UTC
And could you possibly send me the file iPod_Control/iTunes/iTunesDB on your ipod?
Comment 12 Hiren Joshi 2006-10-24 19:06:01 UTC
Added myself to the CC list as it looks like I may be having simalare problems.

FYI, 5th gen video (black) iPod.
Comment 13 Martin Aumueller 2006-10-24 23:16:37 UTC
Hiren, if you also have this problem: could you please make your iTunesDB (see above) available to me? Did you also use Anapod? Which other tools did you use to transfer to your ipod?
Comment 14 Hiren Joshi 2006-10-25 12:17:39 UTC
I fixed the iTunesDB with gtkpod (File, Check iPods files) it took a while but it worked.

I'm going to try to reproduce the problem and hopefully put up instruction on how to do it.

Please note, my problem was similar but not the same, I have 5371 orphaned files and 5371 stale entries in the DB.
Comment 15 Hiren Joshi 2006-10-25 12:45:14 UTC
Steps to reproduce:
1. remove the iTunesDB and iTunesDB.ext (not sure if the second file is nessasary)
2. open ipod in amarok (it'll ask you to intitlize, click yes)
3. you'll notice the DB is empty but the iPod is full.
4. Right click, repair ipod, scan missing/orphend files.
5. add all orphends files to DB (for some reason, J.E.E.P by sterophonics does not get added.)
6. disconnect ipod, at this point you'll notice you can "see" all the mp3s but won't be able to play them on the iPod.
7. Connect in amarok, right click scan for missing/orphend files.
8..... now, I have 5373 orphend files and 5373 stale entries in the database.

I've emailed the iTunesDB to aumuell at reserv dot at.... is that the right one?
Comment 16 cparg 2007-01-20 23:58:55 UTC
Hello, 

I have a very similar problem. The playlists are always destroyed after syncing with amarok or gtkpod (/usr/lib/libgpod.so.0.302.0).

I reseted the iPod (80GB, 5th Gen. Video, black, Firmware 1.2.1) using the Apple SW and tar'ed up the contend of the iPod. Than I synched with amaora and tar'ed up again. Only two files differ:

flanders:~/ipod> diff -r clean/ipod/ corrupt/ipod/
Binary files clean/ipod/iPod_Control/Artwork/ArtworkDB and corrupt/ipod/iPod_Control/Artwork/ArtworkDB differ
Binary files clean/ipod/iPod_Control/iTunes/iTunesDB and corrupt/ipod/iPod_Control/iTunes/iTunesDB differ
Only in corrupt/ipod/iPod_Control/iTunes: iTunesSD

Regards,
Chris
Comment 17 Martin Aumueller 2007-01-28 03:55:36 UTC
#15: your problem is very probably an incompatible version of libgpod: amarok was compiled against 0.3.2, while you are using 0.4.0.
Comment 18 Martin Aumueller 2007-01-28 03:56:51 UTC
Closing for lack of feedback.

Paul, if you can attach your iTunesDB as created by anapod, please reopen.