Allow import based upon general file types.

Bug #681866 reported by David Green
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dmedia
Fix Released
High
David Green

Bug Description

Currently dmedia requires that specific file extensions be specified for import. It would be good if there was an option to import all files of a general type, such as 'image', 'audio' and 'video'. There could also be a 'media' type that matches all files of type 'image', 'audio' or 'video'. This would be especially useful for automatic imports from devices - all 'media' files could be imported. The 'media' type would also be useful as a default option for the importer.

There are 2 ways I can see to implement this:
    1) use the mime types of files to get the general type. Mime types use the following format 'general/specific'. eg. 'photo.jpg' would have the mime type 'image/jpeg' and from that the general 'image' type could be extracted.
    2) maintain a list of file extensions corresponding to each general type.

Tags: feature

Related branches

Changed in dmedia:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Hehe... I was actually just thinking about this, and am working on it in lp:~jderose/dmedia/get-on-da-bus

I think you're exactly right that we generally want to import based high-level types like 'video', 'audio', 'image'.

So I'll add this to the dbus API... import based on an explicit set of extensions, or based on high-level types. And then I'll update the dmedia script to talk to the dmedia session daemon over dbus.

Right now I'm focusing on getting the import process right for importing from memory cards, where it's fairly safe to assume that files will have correct canonical file extensions. Building the list of files to consider based on file extension is super fast.

Down the road we could also support more sophisticated type detection by inspecting the file contents. Help when file extensions aren't correct or are missing, but is also much slower.

Did you want to work on any of this, David? I'm adding this to the dbus API right now, but if you wanted to add the correct args/options to the dmedia script, have at it!

Changed in dmedia:
milestone: none → 0.2
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

If both the branches of David have been accepted and pushed in trunk, why isn't this bug marked to David Green and the status set to "Fix Committed" ?

Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Because now that the `dmedia` script is using the DBus API, filtering by extension and type currently isn't available.

In working on the file import UX design, I clarified the difference between importing (highly repetitive, merits an opinionated design with almost no options) and migrations (lots of flexibility is okay as user will only do this once or twice ever).

I'll add the Migration functions to the DBus API shortly, after which this bug can be changed to "Fix Committed".

Changed in dmedia:
assignee: nobody → David Green (david4dev)
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

I changed the status to Fix Committed as it was in fact merged into trunk... I just happen to immediately break it during my work on lp:684460

I opened lp:691887 for fixing this regression.

Changed in dmedia:
status: Triaged → Fix Committed
Changed in dmedia:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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