Provide a way to hide images from a particular location

Bug #1445755 reported by David Planella
104
This bug affects 25 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Committed
High
Bill Filler
canonical-scopes-project
New
Undecided
Unassigned
gallery-app (Ubuntu)
Fix Released
High
Arthur Mello
mediascanner2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I've put about 30GB of music in my SD card. Some of the music files don't have embedded cover art and their folders contain those cover art images.

When I then opened the Gallery app, I noticed I now have thousands of "pictures" imported from the cover art images showing up in my Events and Pictures tabs, cluttering the real pictures I've taken with the camera.

Is there a way to tell either mediascanner or the Gallery app to ignore a path and not import/show the images there? E.g. similar to Android, where you can put a .nomedia file in a folder and its images won't show up in the picture viewer.

Related branches

David Planella (dpm)
summary: - Provide a way to hide images
+ Provide a way to hide images from a particular location
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gallery-app (Ubuntu):
status: New → Confirmed
Changed in mediascanner2 (Ubuntu):
status: New → Confirmed
no longer affects: mediascanner2
Revision history for this message
Kai Mast (kai-mast) wrote :

Seems like the gallery-app scans your whole home folder and media folders. Starting the app for the first time takes like 10 minutes for me because of that.

I also store my pictures on a different drive (mounted to /mnt/xyz), and there seems no way to configure that. Should I file a separate bug for this?

Revision history for this message
Michi Henning (michihenning) wrote :

Media scanner should treat images from Folder.jpg files (and similar) differently because these are known to be cover art and, therefore, should not appear as pictures in the photo roll and gallery.

Bill Filler (bfiller)
Changed in gallery-app (Ubuntu):
assignee: nobody → Arthur Mello (artmello)
importance: Undecided → High
no longer affects: gallery-app
Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → High
Revision history for this message
Michael Zanetti (mzanetti) wrote :

the files in question are located in

/media/phablet/<sdcard-id>/Music
/home/phablet/Music

Blacklisting those folders might do to as a quickfix? Perhaps in addition to ignoring files named ".folder.png" and ".folder.jog" as Michi pointed out?

Bill Filler (bfiller)
Changed in canonical-devices-system-image:
milestone: none → 13
Revision history for this message
James Henstridge (jamesh) wrote :

Doing a grep over the gallery-app source code, it doesn't look like it is using mediascanner.

Note that if you stick .nomedia files in the music folder, mediascanner will respect those and make that music disappear from the music scope and app though.

Mediascanner is driving the local photos scope though, and these pieces of folder cover art will likely show up there.

For internal storage, we could filter out photos in the Music folder (should we also filter out videos? What if an album shipped with some music and some videos and the user stuck the whole lot in the music folder?).

For removable media we don't scan media type specific folders, but instead scan the entire volume. So we don't have an obvious way to suppress folder cover art, other than ignoring file names that might be folder art entirely.

Revision history for this message
Michi Henning (michihenning) wrote :

> Mediascanner is driving the local photos scope though, and these pieces of folder cover art will likely show up there.

Indeed, they do, which is annoying. For me, it picks up images from AlbumArtSmall.jpg and Folder.jpg. (These names are used by iTunes.)

Would be good to ignore those.

Revision history for this message
Bill Filler (bfiller) wrote :

I'm having a hard time reproducing this and don't know what I'm doing wrong. I copy a bunch of music from my desktop to ~/Music of phone. I see the album art in the Music app but don't see the album art in the gallery-app. Repeat the same steps but copy music from desktop to sd card then insert the sd in phone. Same thing - I correctly see album art in Music player and My Music scope but not in gallery. Doing find for AlbumArtSmall.jpg and Folder.jpg yields nothing. What am I doing wrong?

Revision history for this message
Michi Henning (michihenning) wrote :

This happens if someone inserts a flash card or copies a collection from some other music library, such as iTunes. For songs that don't have embedded artwork, various music players store the artwork in a file inside an album's folder. iTunes uses AlbumArtSmall.jpg and Folder.jpg. Other players use cover.ext, album.ext, album art.ext, .folder.ext, or folder.ext (where ext could be png, jpg, or jpeg).

It seems that gallery app shows these files as if they were photos taken with the camera app.

For a test case, drop an image called AlbumArtSmall.jpg or cover.jpg into a music album folder somewhere. I believe you'll find that image in the gallery app then.

Arthur Mello (artmello)
Changed in canonical-devices-system-image:
status: New → In Progress
Changed in gallery-app (Ubuntu):
status: Confirmed → In Progress
Bill Filler (bfiller)
Changed in mediascanner2 (Ubuntu):
status: Confirmed → Invalid
Changed in canonical-devices-system-image:
milestone: 13 → backlog
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gallery-app - 0.0.67+16.10.20160921-0ubuntu1

---------------
gallery-app (0.0.67+16.10.20160921-0ubuntu1) yakkety; urgency=medium

  [ Arthur Mello ]
  * Fix how autopilot tests select media entries from Organic media view
    (LP: #1613816)
  * Add support to blacklist directories from scan process based on
    regexp (LP: #1445755)
  * Add yaml file and place icon to the expected path to add initial
    support to build a gallery snap pkg
  * Add upstart as a build dep so gallery will not be build against
    archs that do not have it

  [ Florian Boucault ]
  * Fixes for crossbuilding.

 -- Arthur Renato Mello <email address hidden> Wed, 21 Sep 2016 19:07:23 +0000

Changed in gallery-app (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Michi Henning (michihenning) wrote :

This is fixed in gallery app, but the photo scope also has this problem. I'm still seeing loads of album covers when I open the photo scope.

Adding photo scope as affected.

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.