Bug 174984 - Editing id3 tag sometimes does not work (amarok does not remember it)
Summary: Editing id3 tag sometimes does not work (amarok does not remember it)
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.0-SVN
Platform: openSUSE Linux
: HI normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 177702 178004 178410 179704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-12 22:10 UTC by Jens
Modified: 2009-12-09 11:28 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output of amarok -d including failed change of id3 tags (73.24 KB, text/plain)
2008-12-22 00:15 UTC, Rafael Tesser
Details
Patch solving tag saving issue of files not in the collection (1.19 KB, patch)
2009-01-04 11:59 UTC, Michael Seiwert
Details
Patch removes spurious space which prevented the display of changed "composer" tag for flac files (618 bytes, patch)
2009-01-04 15:46 UTC, Michael Seiwert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens 2008-11-12 22:10:37 UTC
Version:           2.0 beta3 (using KDE 4.1.2)
OS:                Linux
Installed from:    SuSE RPMs

KDE 4.1.3 (someone should add that to the bugzilla)

I just wanted to edit the id3 tag of a whole new album that I have. So I was going through every single file and edited the song title. After 10 or so songs amarok was getting pretty slow. The metatag editor would take 10 seconds to save & close, the next time 30 seconds and then even 3 minutes.

So I closed amarok after that and restarted and some of the changes had not been saved so I had to reenter the song titles.

I also tried to edit a whole album making the first letters of the album name capital letters. I saved & closed the changes but after restarting amarok the changes were gone.
Comment 1 Michael Seiwert 2008-11-25 21:24:41 UTC
I can confirm the behavior for 2.0-rc1 and svn trunk that amarok forgets about changes made to id3 tags that were empty before. It seems that changing contents of existent id3 tags works.
Comment 2 Jonathan Herdt 2008-12-12 15:30:40 UTC
I am using Amarok 2.0 with KDE 4.1.3 and the bug is still there.

It is the same with assigning the "Various Artists"-flag (or whatever it maybe) to a single music file. These are not forgotten after a restart but take longer to perform the more you assign. In this case it doesn't matter if the file is already tagged or not.
The output looks like this:

amarok: BEGIN: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool)            
amarok: END__: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool) - Took 1.5s 
amarok: BEGIN: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool)             
amarok: END__: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool) - Took 1s   
amarok: BEGIN: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool)             
amarok: BEGIN: void Meta::SqlAlbum::setCompilation(bool)                                                           
amarok:      [WARNING!] NOT-IMPLEMENTED:  void Meta::SqlAlbum::setCompilation(bool)                                

amarok:      User selected album as compilation 
amarok: BEGIN: virtual void Meta::Album::notifyObservers() const 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::AlbumPtr) 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.0011s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00093s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00032s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00032s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.0003s  
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00031s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00031s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.0003s  
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00032s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00026s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.0003s  
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00028s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.00031s 
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)                 
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.0003s  
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::AlbumPtr) - Took 0.013s   
amarok: END__: virtual void Meta::Album::notifyObservers() const - Took 0.014s
amarok: END__: void Meta::SqlAlbum::setCompilation(bool) - Took 2e+02s
amarok: END__: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool) - Took 2e+02s

As you can see "Took 2e+02s" is a really long time (was more than 3 minutes, I think). Maybe it has something to do with the following three rows where it states that the setCompilation method is not implemented: Meta::SqlAlbum::setCompilation(bool)                                                           
amarok:      [WARNING!] NOT-IMPLEMENTED:  void Meta::SqlAlbum::setCompilation(bool)

While this operation is going on, you can't do anything else in Amarok the window is "frozen".

Sadly, you currently can't just select multiple files and make them count as "Various Artists" by rightclicking and selecting the fitting option. If you do so, only the file where you rightclicked will be filed under "Various Artists".
Comment 3 Mark Kretschmann 2008-12-14 16:02:11 UTC
*** Bug 177702 has been marked as a duplicate of this bug. ***
Comment 4 Rafael Tesser 2008-12-18 17:59:08 UTC
I am using a recent SVN version of Amarok and editing tags stopped working. The changes are not being written the the files. Please let me know if you need additional information on this issue.
Comment 5 Mikko C. 2008-12-21 13:48:42 UTC
This happened to me very recently. I kept editing a tag but Amarok would not save it. Unfortunately I don't have any output :(
Comment 6 Mikko C. 2008-12-21 23:16:43 UTC
*** Bug 178410 has been marked as a duplicate of this bug. ***
Comment 7 Rafael Tesser 2008-12-22 00:15:31 UTC
Created attachment 29528 [details]
Output of amarok -d including failed change of id3 tags
Comment 8 Mikko C. 2008-12-22 09:07:40 UTC
*** Bug 178004 has been marked as a duplicate of this bug. ***
Comment 9 Mark Kretschmann 2008-12-22 11:49:23 UTC
I'm currently trying to debug this problem. What I need to know is the following:

Is this problem a regression or an old bug?


"Regression" means, it worked a while ago in Amarok 2, but then it stopped working.

"Bug" means, it has never worked in Amarok 2.
Comment 10 Mark Kretschmann 2008-12-22 13:32:20 UTC
Ok, the class is clearly buggy in a number of ways. I've inserted lots of debugging code and found some issues. E.g. this here:


amarok: BEGIN: void TagDialog::storeTags(const Meta::TrackPtr&)
amarok:         [TagDialog] TagDialog::TAGSCHANGED
amarok:         [TagDialog] TagDialog::SCORECHANGED
amarok:         [TagDialog] TagDialog::LYRICSCHANGED
amarok: END__: void TagDialog::storeTags(const Meta::TrackPtr&) - Took 0.004s
amarok: END__: void TagDialog::storeTags() - Took 0.0041s
amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr)
amarok: END__: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) - Took 0.0013s
amarok:     [TagDialog] Tags not editable. Aborting loop.


I'll try to fix it up.
Comment 11 Dan Meltzer 2008-12-22 16:55:24 UTC
SVN commit 900336 by dmeltzer:

QFile::isWritable is apparently not accurate.  Use this construct instead.  Please test to see if it works.
CCBUG: 174984
CCBUG: 177058


 M  +4 -2      collection/sqlcollection/SqlMeta.cpp  
 M  +2 -1      meta/file/File.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=900336
Comment 12 Michael Seiwert 2008-12-22 20:01:40 UTC
It seems that tags won't get saved if one modifies and saves tags from the filebrowser via "Edit track details".  
Comment 13 Dan Meltzer 2008-12-22 20:08:25 UTC
Have you updated to latest svn?
Comment 14 Michael Seiwert 2008-12-22 20:14:09 UTC
yes
Comment 15 Rafael Tesser 2008-12-22 23:37:24 UTC
It seems to be working for me now.

Thanks.
Comment 16 Mark Kretschmann 2008-12-23 08:56:28 UTC
@Michael Seiwert:

What you describe seems to be a different bug. If I open the context menu in the Files browser, the "Edit Track Details" entry is always disabled. So the dialog cannot be opened in the first place. I'll try to fix that.

But if I drag an album from the Files tab to the playlist, the tag editing works fine (of course the album must be in the collection).

So I think this report can be closed.
Comment 17 Mark Kretschmann 2008-12-23 11:35:36 UTC
Update:

"Edit Track Details" _does_ actually work from the Files tab, if the track is in the collection. I initially made the mistake to click on the directory instead of the file. </stupid>
Comment 18 Dan Meltzer 2008-12-23 15:08:03 UTC
It should work even if the file is not in the collection...
Comment 19 Michael Seiwert 2009-01-04 10:18:58 UTC
@Dan: I've tested editing id3 tags of files which are not in the collection  again, and it seems that one can edit artist, track, title, tack, comment, genre but not composer and disc number could you please have a look at this ? Btw. Should I open a new bug report for this ?
Comment 20 Michael Seiwert 2009-01-04 11:59:00 UTC
Created attachment 29886 [details]
Patch solving tag saving issue of files not in the collection

Could anybody please review and apply the attached patch which should solve the tag saving issues (discnumber, composer) mentioned in comment #19 ? Thx!
Comment 21 Mark Kretschmann 2009-01-04 12:28:41 UTC
SVN commit 905370 by markey:

Allow setting the "discnumber" and "composer" tags for local files.

Thanks for the patch go to Michael Seiwert <seiwert@kde.org>.

CCBUG: 174984

 M  +6 -10     File.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=905370
Comment 22 Michael Seiwert 2009-01-04 15:46:09 UTC
Created attachment 29893 [details]
Patch removes spurious space which prevented the display of changed "composer" tag for flac files

please review & apply. Thx!
Comment 23 Mikko C. 2009-01-05 13:35:11 UTC
*** Bug 179704 has been marked as a duplicate of this bug. ***
Comment 24 Rindert Vonk 2009-01-05 16:55:34 UTC
Change the composer of a file outside collection now works.
But the discnumber doesn't get saved. The new value doesn't stay in the field when focus leaves the field.
Comment 25 Michael Seiwert 2009-01-05 17:14:50 UTC
@Rindert: Saving the discnumber works for me with latest svn. What do you mean by "doesn't stay in the field when focus leaves the field" - Does it mean that if you set the discnumber to say 1 and swich to edit genre the discnumber ist lost ? Which filetype are you editing (mp3, flac, ogg ...) ?  
Comment 26 Rindert Vonk 2009-01-05 17:41:27 UTC
After playing with meta data some more, I found out that setting discnumber (or year or track) to "0" (zero) or any other value does work and does save it as it should.

But setting any of year,track and discnumber to "" (nothing) doesn't save the entered value and put back the of old value. This behaviour is for files in and outside of a localcollection. So it might be more a bug of the used widgets in the metadata-dialog.
Comment 27 Michael Seiwert 2009-01-05 17:58:22 UTC
Try using the down arrow in case of the discnumber to set the discnumber value to "".