After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 76524 - Add tag editing support
Add tag editing support
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: User Interface
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 87600 122918 151073 154227 169845 303908 336859 338374 (view as bug list)
Depends on: 334375 335635 348761 413841
Blocks: 76546 96917 152334
 
 
Reported: 2002-03-26 23:00 UTC by Seth Nickell
Modified: 2009-02-27 11:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check tagger could be created (797 bytes, patch)
2005-10-19 13:39 UTC, James "Doc" Livingston
none Details | Review
check write support is backed by corresponding gst plugin (1.09 KB, patch)
2005-10-19 15:14 UTC, Artem Baguinski
none Details | Review
another patch (3.72 KB, patch)
2005-10-20 02:37 UTC, James "Doc" Livingston
committed Details | Review
not working solution to id3tag edititng (3.33 KB, patch)
2005-10-28 08:20 UTC, Artem Baguinski
committed Details | Review
grey out non-editable text fields in track properties (2.09 KB, patch)
2005-10-29 18:41 UTC, Artem Baguinski
reviewed Details | Review
check for id3tag instead of id4mux (823 bytes, patch)
2005-10-29 18:53 UTC, Artem Baguinski
committed Details | Review

Description Seth Nickell 2002-03-26 23:00:37 UTC
Add tag editing support to MonkeySound
Comment 1 Francesco Gigli 2003-09-13 18:09:38 UTC
this would be a really interesting feature, as other program (say..
easytag?) aren't good at it, with rm it would be easy to see what tag
have to be edited, simply: using the Browser and selecting "unknown",
doulbe click on the tag and edit it stright in the list.. would be
really very very cool :o)
Comment 2 Bastien Nocera 2003-11-22 14:04:04 UTC
*** Bug 122918 has been marked as a duplicate of this bug. ***
Comment 3 Colin Walters 2004-04-13 03:59:58 UTC
*** Bug 87600 has been marked as a duplicate of this bug. ***
Comment 4 Colin Walters 2004-09-16 21:19:54 UTC
*** Bug 151073 has been marked as a duplicate of this bug. ***
Comment 5 Ben Wilkinson 2004-10-08 19:30:58 UTC
the ability of the browser to actually sort songs is very limited by this, for
example the genre field is almost useless unless the user can specify what genre
they consider the music to be of.
Comment 6 Christophe Fergeau 2004-10-08 19:50:50 UTC
Well, I'd tend to mark this bug as WONTFIX since monkey-media is dead in the 0.9
branch and GStreamer will be used for tag editing ;)
The 0.9 branch has basic tag editing support for flac and mp3 but it needs work.
Comment 7 Christophe Fergeau 2004-11-01 17:28:41 UTC
*** Bug 154227 has been marked as a duplicate of this bug. ***
Comment 8 Christophe Fergeau 2005-04-04 08:00:33 UTC
*** Bug 169845 has been marked as a duplicate of this bug. ***
Comment 9 Sven Herzberg 2005-07-01 17:39:44 UTC
When will tag-editing be enabled by default? IMHO we should enable it during
0.9.x, if we don't get it working until 1.0.0, just disable it by default when
releasing.
Comment 10 Artem Baguinski 2005-10-19 11:39:51 UTC
May be when it works? ;-)

I built rhytmbox with tags editing (0.9.0, gstreamer backend) and whenever i try
to write id3 tags it would truncate the file to 0 size. I guess the problem is
in gstreamer. May be tag-editing should enable itself if working version of
gstreamer is detected? (I have gstreamer 8.11.0, the rpm from gstreamer's own
repository).

Also as far as I can see this version (as well as CVS HEAD) only supports tag
writing for mp3 or flac. But it's not very obvious from the file properties
dialog which renders the edit fields with the same color wether on not tag
writing is supported.
Comment 11 James "Doc" Livingston 2005-10-19 12:27:17 UTC
Currently tag-editing only work for mp3 and flac files, and it occasionally
destroys files.

Perhaps after creating the tag-edited temporarly file, we could try to play it
with "... ! decodebin ! fakesink", and if that can't then we know tag-writing
failed (and so wouldn't replace the original).
Comment 12 Artem Baguinski 2005-10-19 13:21:15 UTC
after some experimentation i've found that the problem is both mine and rhytmbox's:

i had removed gstreamer mp3 support plugins while building rhythmbox this
morning (i had a mess of different versions of gstreamer available from
different repos and didn't notice that)

rhythmbox built with tag writing support doesn't check if for either of the two
supported for writing tag formats (id3 and flac) there is a corresponding
plugin. if there isn't it will try to write tags and fail, truncating the file. 

I guess the correct(er) approach would be to check if the necessary plugins are
available when doing this bit:

	add_supported_type (md, "application/x-id3", rb_add_id3_tagger, "MP3");
	add_supported_type (md, "audio/mpeg", rb_add_id3_tagger, "MP3");
	add_supported_type (md, "application/ogg", NULL, "Ogg");
	add_supported_type (md, "audio/x-flac", rb_add_flac_tagger, "FLAC");
	add_supported_type (md, "audio/x-mod", NULL, "MOD");
	add_supported_type (md, "audio/x-wav", NULL, "WAV");

like it is now it adds tagger-functions which would either create a tagger
element or return NULL. but if you would do something like:

        ...
        tagger_func = (id3_plugin_present) ? rb_add_id3_tagger : NULL;
	add_supported_type (md, "application/x-id3", tagger_func, "MP3");
        ...

also in the bit that uses the tagger function it should check if it has returned
NULL (better safe then sorry - this is something which actually shouldn't
happen). I think I'll add this two bits after lunch (hope I can figure out the
gstreamer bits).

....

so i installed the -extra-audio rpm and now it reads the tags and doesn't crash
when i change them. It saves the tags I have entered in its database and
displays them when playing the song. But it strips all tags from the file itself. 

this means what you propose (try to play tmp file) won't help - the file is
perfectly playable, it just has no tags anymore. Again, could be my fault of course.
Comment 13 James "Doc" Livingston 2005-10-19 13:39:01 UTC
Created attachment 53654 [details] [review]
check tagger could be created

This patch makes it abort tag-writing, if the tagger element can't be created.
This should also stop it truncating the file, when the necessary plugin isn't
installed.
Comment 14 Artem Baguinski 2005-10-19 15:14:01 UTC
Created attachment 53657 [details] [review]
check write support is backed by corresponding gst plugin

this patch makes sure the tag support will be enabled only for media types for
which the necessery plugins exist. (doesn't obsolete previous patch for element
creation could have failed for another reason).
Comment 15 James "Doc" Livingston 2005-10-20 02:37:10 UTC
Created attachment 53672 [details] [review]
another patch

This patch includes both the two previous ones, and adds a post-write check to
ensure that the file hasn't been corrupted and amde unplayable.

It should be fairly easy to add checks to ensure that the tags have been
written correctly, although this is made more compilated by the fact that some
file type don't support any/all metadata.
Comment 16 Artem Baguinski 2005-10-20 09:13:33 UTC
I'm trying to investigate why it removes the tags in the first place, but all
the  gstreamer stuff is greek to me. BTW, can you confirm that for you it
doesn't remove the tags (if you look at the file with some other software, e.g.
id3info or easytag)? we could then compare our setups to pinpoint the offending
part.

I run rhythmbox 0.9.0 with your latest patch (which applies cleanly) 
and gstreamer 0.8.11 from nrpms repository (gstreamer, gstreamer-plugins,
gstreamer-plugins-audio) + gstreamer-plugins-extra-audio from gstreamer
repository (this is the only relevant bit of gstreamer that nrpms doesn't
provide, but i don't think there should be anyproblem - gstreamer in nrpms is a
standard build). 

Comment 17 James "Doc" Livingston 2005-10-20 09:28:26 UTC
Now that I've actually got it writing the tags, yes it is stripping them out.
Previously it was failing to write the tags, and removing the temporary silently.

I don't know a that much about gstreamer tag writing, but I'll check how Sound
Juicer adds tags to make sure we're not doing something stupid.
Comment 18 Artem Baguinski 2005-10-20 12:00:25 UTC
while you're at it: like many people posting to this and duplicate bugs I have
hundreds of mp3/ogg/wav files with inconsistent/wrong/missing metadata. They
mess the database pretty bad, while it is the main reason for me to use
rhythmbox. May be the better way to deal with the metadata/tags is the
following: let the song properties be editable whether they can be written or
not, so user can organise her collection, if tags are writable - wonderfull -
save them. If not - show somehow that the database and the file tags are out of
sync. When that's the case and the tags are writable (e.g. user has upgraded the
corresponding plugins) - provide the interface (in properties dialog?) to sync
them. 

Comment 19 Artem Baguinski 2005-10-20 12:18:06 UTC
Sound Juicer creates the encoder pipeline automagically using "audioconvert" and
then searches the result for an element implementing GstTagSetter interface. I
wonder if audioconvert can build "audio pass through" pipelines which would
leave encoded audio packets as is and but still allow to change the metadata?
Comment 20 James "Doc" Livingston 2005-10-20 13:04:19 UTC
That's basically what RB does now, most of the differences stem from the fact
that it's just changing the tags and not encoding. The rb_add_*_tagger functions
return an element that implements GstTagSetter (flactag and id3mux).

On furthur inspection the flac tagger works perfectly for me - it's just the td3
tagger that isn't working. I'm going to do some tracing of what exactly is
happening with the id3 tagger, and I'll report what I find here.
Comment 21 Artem Baguinski 2005-10-20 13:46:50 UTC
I'm doing the same, hopefully looking in other places ;-)

Have you seen retag example in gstreamer? it's in examples/retag/

<blockquote>
 This example shows how to use interfaces and the tag subsystem.
 It takes an mp3 file as input, and makes an ogg file out of it. While doing
 this, it parses the filename and sets artist and title in the ogg file.
 It assumes the filename to be "<artist> - <title>.mp3"
</blockquote>

despite what the comment sais it doesn't actually make an ogg (the comment is
copy pasted from the neighbour example - transcode.c). 

they insert "id3tag" element in the recoding pipeline. I assume this element
receives tags on one end and spits on the other. they don't use "spider" like
rhythmbox. 

i built the example and it fails miserably just like rhythmbox (deletes the tags
altogether). I think we can safely file a bug to gstreamer. (or check if id3tag
from gstreamer 0.9 works?)
Comment 22 Artem Baguinski 2005-10-20 14:00:49 UTC
which i did:

http://bugzilla.gnome.org/show_bug.cgi?id=319316
Comment 23 James "Doc" Livingston 2005-10-26 07:25:09 UTC
Patch committed to cvs.
Comment 24 Artem Baguinski 2005-10-28 08:18:51 UTC
i tried to implement the solution from
http://bugzilla.gnome.org/show_bug.cgi?id=319316 gstreamer bug in rb, but it
still strips tags. Could someone have a look at the patch (attaching...)
Comment 25 Artem Baguinski 2005-10-28 08:20:30 UTC
Created attachment 53977 [details] [review]
not working solution to id3tag edititng 

this is the patch which doesn't work and I can't see why.
Comment 26 James "Doc" Livingston 2005-10-28 08:31:28 UTC
The patch works for me, and successfully sets the ID3 tags.
Comment 27 James "Doc" Livingston 2005-10-28 10:19:04 UTC
Patch committed, ID3 tag writing seems to work well now. However it may write
v2.4 tags which a lot of non-libid3tag software can't read.
Comment 28 Artem Baguinski 2005-10-28 15:49:35 UTC
Some interface notes

(1) pressing Next / Previous in properties discards whatever changes you made to
the current tag

(2) no indication of whether tags can be edited and saved to file

(3) genres box could suggest genres, e.g. standard id3v1 genres, genres from my
library etc. Autofill would be better then combo box here.

(4) It seems that the genre doesn't get saved - i gave up entering genres
because they keep returning to whatever there was originally.

(5) The usual "batch editing, more tags (year? total album tracks? custom?),
bla" wishlist.

I'd like to work on these after consensus is reached on wether RB continues to
use GStreamer for tagging or not.
Comment 29 Christophe Fergeau 2005-10-28 15:59:05 UTC
I think you can go ahead with polishing the UI, even if we choose to use
something different to write tags, the UI shouldn't change, so your work
wouldn't get lost. (except maybe for 4)
For 3), I'd look at what sound-juicer does wrt genres for extra consistency, I
don't think s-j exposes all the "standard" genres.
And for 5), if it adds much to the UI, it may need to be discussed first.
Comment 30 James "Doc" Livingston 2005-10-28 16:30:49 UTC
The metadata backend can be made a compile-time options, as the playback backend
is (although we only have one playback backend at the moment). That means we
could add a taglib backend, and then choose the default based on what we think
is best.


But as Christophe said, the UI can be improved regardless of the backend.
Comment 31 Artem Baguinski 2005-10-29 18:41:21 UTC
Created attachment 54053 [details] [review]
grey out non-editable text fields in track properties

solves (2) from my list
Comment 32 Artem Baguinski 2005-10-29 18:47:50 UTC
About (1)

what do you think should happen: 

(a) changes get saved as soon as user clicks Next/Prev
(b) if changes were made and user clicks Next / Previous confirmation dialog appears
(c) changes are remembered and only applied when Close is pressed

I prefer (b), I would also like to add a confirmation dialog to save on close. 

I don't like that saving happens on "Close" button. Shouldn't there rather be

  Apply Cancel Previous Next 

?
Comment 33 Artem Baguinski 2005-10-29 18:53:57 UTC
Created attachment 54055 [details] [review]
check for id3tag instead of id4mux

even though they come from the same plugin, it's more correct for the element
rb actually uses.
Comment 34 James "Doc" Livingston 2005-10-30 02:46:29 UTC
I've committed the "id3tag" patch.


Simply making the background gray looks horrible with any theme that does not
use that exact shade of gray for window background (especially those where the
background isn't gray at all).

One of the other bugs (I can't find which one atm) said that we should use
GtkLabels for uneditable propreties. That will make everything correct, but will
make setting up the dialog much more complicated, because we can't put it into
glade.
Comment 35 Artem Baguinski 2005-10-30 08:20:04 UTC
Well, I tried to make "grey" theme agnostic - I copy fg/bg into text/base. But
these styles seem to differ for GtkEntry and other chrome. I think I can copy
fg/bg from some GtkLabel. 
Comment 36 Christophe Fergeau 2005-10-30 08:54:41 UTC
Wouldn't gtk_editable_set_editable (widget, FALSE) do the right thing to disable
non-editable fields? (though a label would be even nicer but more complicated to
code).
Comment 37 James "Doc" Livingston 2005-10-30 09:06:17 UTC
That's what we currently do, but (in most themes) it looks exactly the same.
Comment 38 Bastien Nocera 2005-10-30 11:21:27 UTC
Which would be theme bugs. They should look different... (maybe disabling the
label attached to the entry would help show that the entry is disabled).
Comment 39 Artem Baguinski 2005-10-30 12:05:10 UTC
Is there any theme where non-editable entries have different colours then the
editable ones? I think it's the theme engine that would have to take care of
that because non-editable doesn't exist as a separate style. 

What does exist is "non-sesitive" style, but setting entries to nonsensitive
will result in that people can't select text in them (and again not every theme
uses different colours for non sensitive GtkEntries).

That's why I tried to circumvent the problem by copying the fg/bg colours to
text/base. But apparently these colours are wrong shades of grey. I'll try to
steal from GtkLabel now.
Comment 40 Thierry Moisan 2005-12-10 13:53:38 UTC
*** Bug 303908 has been marked as a duplicate of this bug. ***
Comment 41 Alex Lancaster 2006-01-27 12:15:51 UTC
Rhythmbox doesn't use Monkey Media anymore AFAIK, switching component to "User Interface".  There is ongoing work at bug #309609 to get tag editing working for gstreamer 0.10. Currently tag editing works but is largely broken for gstreamer 0.8, see bug #323658.  

Perhaps this bug could be closed as a duplicate or retitled to be more about the user interface side of tag editing.
Comment 42 Teppo Turtiainen 2006-03-05 14:12:29 UTC
*** Bug 333468 has been marked as a duplicate of this bug. ***
Comment 43 Alex Lancaster 2006-03-23 10:26:37 UTC
Tag support has been added for ID3 tagging in: bug #309609.  However it can be a lossy in that tags unknown to gstreamer are removed in the retagging, see: bug #334375.

Also we currently don't have OGG retagging ability, see bug #335635.
Comment 44 Alex Lancaster 2006-03-23 10:35:14 UTC
Removing blocker bugs that were empty in any case.
Comment 45 Alex Lancaster 2006-04-01 21:45:00 UTC
*** Bug 336859 has been marked as a duplicate of this bug. ***
Comment 46 James "Doc" Livingston 2006-04-14 01:37:25 UTC
*** Bug 338374 has been marked as a duplicate of this bug. ***
Comment 47 Snark 2007-03-02 09:54:26 UTC
Eh... I was hit by the "can't edit but the entry looks like I should" bug, so I thought I'd both report this ui glitch as a bug and ask for the editing as an enhancement. Now I know better.

The problem I still see is that the file is a .flac, to which I have both read&write permission... and according to some comments here, it should work! This is with debian unstable's 0.9.8-1 package ; is there something I can do?
Comment 48 Alex Lancaster 2007-03-02 12:53:38 UTC
(In reply to comment #47)

> The problem I still see is that the file is a .flac, to which I have both
> read&write permission... and according to some comments here, it should work!
> This is with debian unstable's 0.9.8-1 package ; is there something I can do?

I think those comments were probably referring to gstreamer 0.8.  As I understand it, the flactag element (that retags flac files) has not yet been ported to gstreamer 0.10.  Can't find a bug on that right now, but if one doesn't exist, one should be opened about that. 

Comment 49 Snark 2007-03-02 13:03:34 UTC
Well, from comment #6 : "The 0.9 branch has basic tag editing support for flac and mp3 but it needs work." (that was in early 2005!)

And 0.9.8 is in this branch... I'll check in gstreamer if I find it.
Comment 50 Alex Lancaster 2007-03-02 13:13:13 UTC
(In reply to comment #49)
> Well, from comment #6 : "The 0.9 branch has basic tag editing support for flac
> and mp3 but it needs work." (that was in early 2005!)

> And 0.9.8 is in this branch... I'll check in gstreamer if I find it.

0.9.x of *rhythmbox* does have support for flac tagging, but you need to be using gstreamer 0.8 to take advantage of it.


Comment 51 Alex Lancaster 2007-03-02 13:15:33 UTC
(In reply to comment #50)

> 0.9.x of *rhythmbox* does have support for flac tagging, but you need to be
> using gstreamer 0.8 to take advantage of it.

i.e. rhythmbox needs to be compiled against gstreamer 0.8.  But I wouldn't recommend that because gstreamer 0.8 is way more deficient than 0.10 in so many other areas. 

Comment 52 Snark 2007-03-02 13:19:22 UTC
Yes, that's it ; filled as bug #413841.
Comment 53 Lionel Dricot 2009-02-27 11:08:23 UTC
Tag editing is working fine for me with latest rhythmbox for Ogg and MP3.

I'm closing this bug (and it's also a bit messy). Feel free to open a new bug if you have a particular issue with tag editing. Please also add a way to reproduce the bug (attaching a particular file if needed). Thanks.