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 328971 - Missing tags should not use "Unknown"
Missing tags should not use "Unknown"
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: User Interface
HEAD
Other All
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks: 157340
 
 
Reported: 2006-01-28 15:28 UTC by Alex Lancaster
Modified: 2018-05-24 11:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial patch (24.88 KB, patch)
2006-06-24 02:22 UTC, James "Doc" Livingston
none Details | Review
updated patch (22.63 KB, patch)
2006-10-02 01:54 UTC, James "Doc" Livingston
needs-work Details | Review

Description Alex Lancaster 2006-01-28 15:28:12 UTC
Missing tags should just be listed as blank or somehow marked using a non-standard font or colour, rather than "Unknown" to avoid confusion if there really are
albums/titles/artists that are called "Unknown".

This will be useful for addressing bug #157340, and other situations where you might want ignore tags that are blank. If this was implemented, there will also need to be options for every option menu that searches on a tag in auto playlists to select tags that are blank specially rather than search for "Unknown". 

For example, you could have:

Artist [contains]          
       [does not contain]
       [equals]
       [is blank]

If the last last option was selected it would grey-out the box.
Comment 1 James "Doc" Livingston 2006-06-24 02:22:51 UTC
Created attachment 67920 [details] [review]
initial patch

This patch makes Rhythmbox not use "Unknown" for missing tags. There are several things that need to be discussed/solved:

* The patch treats no tag the same as an empty tag. The main reason is that it would then require a lot of code to check for NULL and special case it.
* DAAP sharing should just not send a piece of metadata rather than an empty string.
* Song info windows currently treat a field being empty as "don't change". This is particularly important when multiple entries are being modified, and their values are different
* Do we need an "is blank" option for auto playlists, or just allow "equals ''" to work?
* Probably lots of other things...
Comment 2 Matti Lindell 2006-06-27 06:48:17 UTC
> * The patch treats no tag the same as an empty tag. The main reason is that it
> would then require a lot of code to check for NULL and special case it.

Will this allow to distinguish empty tag from missing tag on playlist view
and how does this affect on playlist sorting?
Comment 3 James "Doc" Livingston 2006-06-28 05:06:33 UTC
(In reply to comment #2)
> Will this allow to distinguish empty tag from missing tag on playlist view
> and how does this affect on playlist sorting?


It doesn't distinguish them, it treats then identically. Having them be different will make UI more complicated in many places, as we will need some indication of which it is, and complicated editing UI too.

Can anyone give me an example of when you'd actually want to have "" stored in a file's metadata, and how it should be treated differently from no tag? As I can't really think of any, I don't know how it should affect things.
Comment 4 Alex Lancaster 2006-06-29 21:12:53 UTC
(In reply to comment #3)

> It doesn't distinguish them, it treats then identically. Having them be
> different will make UI more complicated in many places, as we will need some
> indication of which it is, and complicated editing UI too.
> 
> Can anyone give me an example of when you'd actually want to have "" stored in
> a file's metadata, and how it should be treated differently from no tag? As I
> can't really think of any, I don't know how it should affect things.

It's not so much that you'd *want* this, and it would be fine if everything was within the rhythmbox universe.   But when you are importing mp3s that have been ripped elsewhere (e.g. under iTunes or god forbid some ugly software like MusicMatch) that the ID3 tags added blank tags rather than simply not tagging them at all.

In the case you are cleaning up a lot of files like that, you'd want to be able to find all the tags that are simply set to blank vs. all the tags where they weren't set at all.  It's also possible that an album title is actually "" (think John Cage type music).  

I'd prefer that the distinction be noted somehow, but having this patch applied in the meantime (haven't tested it yet), will probably be a step forward.

Comment 5 Alex Lancaster 2006-06-29 21:19:19 UTC
Just tested, I notice that the music will need to be re-imported for this to take effect.  Perhaps the version of the rhythmdb.xml could be bumped and file metadata be reimported upon the application of this patch.
Comment 6 Alex Lancaster 2006-06-29 21:33:16 UTC
Also justed noticed that the Year is still marked as "Unknown".  

In terms of UI for this, I suggest a different colour for that cell in the interface (both in song info and in entry view) for actual missing tag (vs. "").
Comment 7 Alex Lancaster 2006-07-01 20:04:03 UTC
Patch doesn't apply cleanly against current CVS.
Comment 8 Daniel Holbach 2006-09-06 07:57:58 UTC
Mentioned in https://launchpad.net/distros/ubuntu/+source/rhythmbox/+bug/58941 as well.
Comment 9 Alex Lancaster 2006-09-24 01:37:39 UTC
Any chance this patch could be updated against CVS?
Comment 10 James "Doc" Livingston 2006-10-02 01:54:41 UTC
Created attachment 73826 [details] [review]
updated patch

Updated to cvs. Duration, bitrate and mime-type still use "unknown", because they aren't directly extracted from the file.
Comment 11 Alex Lancaster 2006-10-05 17:44:08 UTC
Hmm, still doesn't apply cleanly.  I am also using the lastfm patch on bug #313049.  Perhaps they conflict?


$ patch -p0 < patches-manual/active/rb-metadata-unknown.diff
patching file daapsharing/rb-daap-connection.c
patching file lib/rb-cut-and-paste-code.c
patching file lib/rb-util.c
patching file metadata/rb-metadata-gst.c
Hunk #1 succeeded at 1278 (offset 1 line).
patching file plugins/artdisplay/artdisplay/AmazonCoverArtSearch.py
patching file plugins/artdisplay/artdisplay/CoverArtDatabase.py
patching file plugins/audioscrobbler/rb-audioscrobbler.c
Hunk #2 succeeded at 1022 (offset -1 lines).
patching file podcast/rb-feed-podcast-properties-dialog.c
patching file podcast/rb-podcast-manager.c
patching file podcast/rb-podcast-properties-dialog.c
patching file rhythmdb/rb-refstring.c
patching file rhythmdb/rhythmdb-tree.c
patching file rhythmdb/rhythmdb.c
Hunk #1 succeeded at 1293 (offset 37 lines).
Hunk #3 succeeded at 2577 (offset 37 lines).
patching file shell/rb-shell-player.c
Hunk #1 FAILED at 2816.
1 out of 1 hunk FAILED -- saving rejects to file shell/rb-shell-player.c.rej
patching file sources/rb-audiocd-source.c
Hunk #1 succeeded at 142 (offset 3 lines).
Hunk #2 succeeded at 196 (offset 1 line).
patching file sources/rb-ipod-source.c
Hunk #1 succeeded at 230 (offset 2 lines).
patching file sources/rb-iradio-source.c
Hunk #1 succeeded at 547 (offset 68 lines).
patching file widgets/rb-entry-view.c
patching file widgets/rb-song-info.c
Comment 12 Alex Lancaster 2006-10-05 17:46:37 UTC
(In reply to comment #11)
> Hmm, still doesn't apply cleanly.  I am also using the lastfm patch on bug
> #313049.  Perhaps they conflict?

Actually, no.  I got a clean copy of rb-shell-player.c from CVS and the patch still fails.  I think this change in CVS broke the patch:

2006-10-02  Jonathan Matthew  <jonathan@kaolin.wh9.net>

....
        * shell/Makefile.am:
        * shell/rb-shell-player.c: (rb_shell_player_class_init),
        (rb_shell_player_constructor), (rb_shell_player_init),
        (rb_shell_player_get_property), (open_location_thread),
        (rb_shell_player_open_location),
        (rb_shell_player_sync_with_source),
        (rb_shell_player_set_playing_source_internal), (tick_cb):
        * shell/rb-shell.c: (construct_widgets), (construct_sources),
        (rb_shell_player_elapsed_changed_cb):
        Remove iradio-specific code, use extra metadata fields for streaming
        title and artist name.
Comment 13 Alex Lancaster 2006-10-09 10:20:20 UTC
Actually, the patch seems to work for me if I ignore the rejection on the rb-shell-player.c file as suggested by Doc on IRC.

As I said before, itt might be the case that there is a track title/album/genre that is truly the empty string "" which wouldn't be missing data.  It would therefore not be possible to create (say) an autoplaylist for all missing tags without it including tags that were the empty string on purpose.

However the behaviour of this patch is infinitely better than the old behaviour so I'd say commit it and we can worry about that corner case later.
Comment 14 Alex Lancaster 2006-10-10 09:00:49 UTC
Do not use patch 73826!  It will blank your db.  Needs work.
Comment 15 Alex Lancaster 2006-10-10 09:12:45 UTC
On IRC, Jonathan Matthew pointed out that:

if (str == NULL || strcmp (str, ""))

is missing the "== 0" and should be:

if (str == NULL || strcmp (str, "") == 0)
Comment 16 antistress 2008-07-27 14:45:31 UTC
i was about to fill a bug report but that one seems to be the good place to do it.

I'm using RB 0.11.5 / Ubuntu Hardy

When i want to edit a tag to fill the genre of the song, i've first to erase the "unknown" string before to complete the genre
It means :
1. selecting the field
2. selecting the string
3. pressing the delete key
4. then filling the field with the genre
It's very boring.

I'd like to see the "unknown" string disappear by itself when selecting the field.
It would mean from a user point of view :
1. selecting the field
2. filling the field with the genre

This would save lots of time

For a mockup, you can look at search field in Firefox 3 for instance : there is a "google" string (or any other search website) in light grey in the search field that dispappear when the user select the field.
Comment 17 Carnë Draug 2013-06-01 16:23:46 UTC
*** Bug 556828 has been marked as a duplicate of this bug. ***
Comment 18 GNOME Infrastructure Team 2018-05-24 11:10:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/128.