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 706948 - Only show music from my ~/Music folder
Only show music from my ~/Music folder
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.13.x
Other Linux
: Normal enhancement
: ---
Assigned To: Arnel Borja
gnome-music-maint
available
: 728792 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-28 00:01 UTC by Elad Alfassa
Modified: 2014-05-16 10:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
query: Only show songs from Music directory (11.42 KB, patch)
2014-05-12 15:03 UTC, Arnel Borja
none Details | Review
query: Only show songs from Music and Downloads directory (11.48 KB, patch)
2014-05-12 15:08 UTC, Arnel Borja
committed Details | Review

Description Elad Alfassa 2013-08-28 00:01:28 UTC
I have many audio files from various projects and games scattered around my hard drive. They are all indexed by Tracker for easy searching, but not all of them are music. I expect a music player to play music, and not random sound effect files I have lying around.

I don't want to disable Tracker indexing of my entire home drive, but I also don't want Music to play stuff that are not music.
Respecting the XDG spec and only using XDG_MUSIC_DIR would make much more sense
Comment 1 Arnel Borja 2013-08-28 06:54:16 UTC
I've talked about this with Mathieu Bridon and Allan Day

Wednesday, August 21st, 2013 (PHT)
4:43 PM <bochecha_> arnel: is g-m supposed to show all audio files from ~ ?
4:43 PM <bochecha_> or should it limit itself to ~/Music ?
4:44 PM <arnel> it depends on your Tracker settings. You could change them at Control Panel > Personal > Search
4:44 PM <bochecha_> well, no
4:45 PM <bochecha_> you could want tracker to index your audio file in ~/Documents, because they correspond to a project you're working on
4:45 PM <bochecha_> but GNOME Music should probably not show them
4:45 PM <bochecha_> iirc, GNOME Photos does not show "all image files" that tracker knows about, it tries filtering them on whether or not they actually are "photos"
4:48 PM <arnel> so you mean we shouldn't show audio files in all default directories except Music? I agree on that, I have the same problem with gnome-documents. you could file a bug for it if you want ;)
4:48 PM <bochecha_> I'm not sure you should
4:48 PM <bochecha_> I'm saying that you might want to do that
4:48 PM <bochecha_> but I don't know, maybe ask the designers?
4:49 PM <bochecha_> arnel: just confirmed with rishi (GNOME Photos author) : it only takes files in ~/Pictures and ~/Downloads, but will remove the latter in the future when some things are in place (I guess the Transfer app)
4:49 PM <arnel> yes, if you file them, the designers would notice it. they periodically check the bug lists to tell us the important ones. I agree on your idea though
4:54 PM <bochecha_> arnel: I asked the person who told me about it to report it, he's a better person to do it and have the discussion with :)
4:54 PM <bochecha_> (plus, that's less work for me :-^ )
4:56 PM <arnel> I do the same thing :D
4:56 PM <bochecha_> oh, right!
4:56 PM <bochecha_> :)
4:59 PM  → •aday (opped) joined
5:17 PM <bochecha_> aday: hi, we were wondering something about Music: should it show all audio files from ~/ ? or just the ones in ~/Music/ ? (and ~/Downloads/ ?)
5:17 PM <bochecha_> right now it shows all, which elad complained about in #fedora-desktop
5:17 PM <bochecha_> fwiw, Photos shows only the ones in ~/Pictures/ and ~/Downloads/
5:18 PM <•aday> in general we've gone for the appropriate xdg folder, plus ~/Downloads
5:18 PM <•aday> so ~/Music and ~/Downloads
5:18 PM <bochecha_> aday: it makes sense, I was just wondering if the current behaviour was intentional or a bug ;)
5:19 PM <•aday> we lack a good import story right now, unfortunately. should maybe put that on the list for 3.12
5:20 PM <bochecha_> aday: "import" ? like stuff we download, to import them in the appropriate app so they become visible there / installed in the right folder ?
5:20 PM <•aday> from downloads, yes
5:21 PM <•aday> i know we have a mechanism in nautilus for this too, but i haven't investigated it much

Maybe we could add a filter to the queries so that it will only show songs from ~/Music and ~/Downloads.
Comment 2 Vadim Rutkovsky 2013-08-28 08:27:36 UTC
(In reply to comment #0)
> I don't want to disable Tracker indexing of my entire home drive, but I also
> don't want Music to play stuff that are not music.
Many people store music on external HDDs, the proposed solution will break this (as soon as tracker can't handle symlinks we can't simply 'ln -s' the music scattered around the whole system)
Comment 3 WM 2013-09-06 17:34:39 UTC
I've seen that gnome-music 3.90 on Fedora 19 shown and played the songs from the folder I just 'ln -s' to ~/Music/Library.

But now I didn't see it working again.
Comment 4 Arnel Borja 2013-09-07 05:14:33 UTC
(In reply to comment #3)
> I've seen that gnome-music 3.90 on Fedora 19 shown and played the songs from
> the folder I just 'ln -s' to ~/Music/Library.
> 
> But now I didn't see it working again.

That's probably a tracker issue, I also have the same problem before. Tracker has some functions for determining if files are in a unmountable partition/removable drive, but I don't know if tracker uses them aside from caching album cover art.
Comment 5 WM 2013-09-07 16:36:25 UTC
Thanks for your explanation, Arnel.

So I bookmarked those music folders which not in my home directory and make tracker index them.
Comment 6 gatlin 2013-12-18 03:24:39 UTC
I agree that ~/Music should be the default. If the Value was alterable, then using external media would still be a viable option.

I had a copy of a Friend's iPod under ~/Documents while he was purchasing a new external drive. His music was undesirably added to the displayed collection. It made many more scrolls and clicks of "Load More".
Comment 7 johnvile 2013-12-23 13:24:44 UTC
personally I keep my music on a USB drive and have no need to change that.

How would U like it if I came round your house and started rearranging your furniture?

I've tried loads of work around's to get GnomeMusic to behave and obey my file structure but it just won't play nice. 
It worked once when I edited .conf/user-dirs.dirs but this is not persistent.
Mainly I get No Music Found!
PLS can we get a choice?
Without this choice I won't be able to use it :-(
Comment 8 André Klapper 2013-12-23 13:32:15 UTC
johnvile: It's not your house. Create a symlink or whatever.
Bugzilla is not a forum; *technical* comments are welcome however.
(Disclaimer: I'm not involved in gnome-music.)
Comment 9 johnvile 2014-03-21 15:40:37 UTC
What a *ucking cry baby.
Comment 10 Seán de Búrca 2014-04-20 22:07:50 UTC
Would it be possible to do this by adding a filter/WHERE clause to queries to optionally restrict based on a specified location, defaulting to the XDG music directory?
Comment 11 Vadim Rutkovsky 2014-04-21 16:22:56 UTC
(In reply to comment #10)
> Would it be possible to do this by adding a filter/WHERE clause to queries to
> optionally restrict based on a specified location, defaulting to the XDG music
> directory?
Yes, but I'm not really convinced that this would be the solution. For instance, should we include ~/Downloads?

The ideal solution for this is actually properly tagging your music.

Allan, any thoughts?
Comment 12 Rowan Lewis 2014-04-21 16:42:49 UTC
An anecdote about properly tagging your music:

If I use bandcamp, I always download the flac version to ~/Downloads, extract it and then use beets to import it into my library and fix any tag issues. In this case I definitely do not want ~/Downloads to be included as it's not part of my ~/Music library.
Comment 13 Seán de Búrca 2014-04-21 17:57:57 UTC
I'm not sure I see how properly tagging music addresses this issue. My music is well-tagged and organized and that's _part_ of why I'm looking for this change. Having a large amount of miscellaneous sounds cluttering my library while I'm looking for the well-tagged music is frustrating.
Comment 14 Rowan Lewis 2014-04-21 18:06:53 UTC
I'd also like to add the concept in Windows of libraries makes a lot of sense, even if their specific implementation is flawed because of a lack of audio format support. We could adopt this idea and place control over what is considered Music centrally instead of every application having its own implementation. Perhaps starting with the defaults that everyone expects now and then adding a UI to the Tweak Tool, or the Control Panel.
Comment 15 Elad Alfassa 2014-04-21 18:39:41 UTC
Assuming we want the XDG music directory, we don't have to hardcode the default, we can use the CONFIGURED xdg music directory. Yes, these dirs are configurable (.config/user-dirs.dirs), and thus your requirement of customization exists.

It's also very intuitive: This dir is called "Music", I should put my music in it so the app named "Music" will see it.

Later on, when the "Importing" workflow is implemented across the GNOME desktop (along with the Transfers app) it will become even easier for users, without needing to use a file browser to put the music in the right directory.
Comment 16 Julien Olivier 2014-04-21 20:13:08 UTC
I think a good solution could be to only show music from the ~/Music folder, and have an "import music" button which would present the user with audio files from all other locations (including ~/Downloads and external disks). When music is imported, it would be copied to ~/Music, and, thus, appear in the library.
Comment 17 Allan Day 2014-04-22 19:57:33 UTC
(In reply to comment #11)
...
> Allan, any thoughts?

The other core content apps follow the standard XDG folders, with the addition of ~/Downloads. The reasoning is that file types aren't always a good guide about what they mean to you as a user. A drawing or an audio file in ~/Documents could be treated as a "document", for example.

In the music case, all audio files are clearly not "music". I might have a set of interview recordings in ~/Documents for a project, for example - and I won't want them included in my music collection.

I don't think the solution to using external storage for your music collection is to show every audio file. Not only does it create issues like those I've described above, but we don't know how someone wants to use their USB hard drive or whatever: maybe it's a backup, or maybe they want to import the content from it. Work has been done to enable Documents to read removable devices; I've filed bug 728751 for Music.

tl;dr: let's default to ~/Music and ~/Downloads for now.
Comment 18 Vadim Rutkovsky 2014-04-23 13:41:28 UTC
*** Bug 728792 has been marked as a duplicate of this bug. ***
Comment 19 darwell 2014-04-24 07:50:26 UTC
To the people opposing this change: I store my music on raspberry pi. The media partition is mounted on my desktop computer and I have these settings:

XDG_MUSIC_DIR="/mnt/media/music"
XDG_PICTURES_DIR="/mnt/media/photos"
XDG_VIDEOS_DIR="/mnt/media/videos"
Comment 20 Arnel Borja 2014-05-12 15:03:31 UTC
Created attachment 276387 [details] [review]
query: Only show songs from Music directory

Filter out songs if they are not a descendant of the user's Music
directory.

Note: The URL of the Music directory should be in double quotes since
URLs allow single quotes, but since it is uncommon for Music directory
to have a single quote, and tracker:uri-is-descendant do not accept
arguments enclosed in double quotes, use single quotes instead.
Comment 21 Arnel Borja 2014-05-12 15:08:37 UTC
Created attachment 276389 [details] [review]
query: Only show songs from Music and Downloads directory

Filter out songs if they are not a descendant of the user's Music
or Downloads directory.

Note: The URLs of the Music and Downloads directory should be in double
quotes since URLs allow single quotes, but since it is uncommon for
Music and Downloads directory to have a single quote in path, and
tracker:uri-is-descendant do not accept arguments enclosed in double
quotes, use single quotes instead.

(Attached wrong patch, updated.)
Comment 23 Vadim Rutkovsky 2014-05-12 16:08:55 UTC
Also pushed https://git.gnome.org/browse/gnome-music/commit/?id=7fb5825 for gnome-3-12, will be a part of 3.12.2 release
Comment 24 Rowan Lewis 2014-05-16 10:15:16 UTC
Apologies in advance for disputing this fix now, and not earlier.

The issue with including something other than XDG_MUSIC_DIR in the Music library, and that is you cannot assume the audio files you have found elsewhere (including in ~/Downloads) are actually music.

I talked with Allen Day about this on IRC a while ago, and from that conversation it was my understanding that eventually the Transfers app would allow music to be imported into the music library on Download, correctly handling the situation that we're trying to solve by including the ~/Downloads folder.