You are not logged in.

#1 2011-06-02 14:33:52

awayand
Member
Registered: 2009-09-25
Posts: 398

[SOLVED] which mimetype is qbittorrent using for previewing files?

How do I find out which mimetype qbittorent uses to preview a file when I right-click on a downloaded/-ing torrent and select "preview file"? It is definitely not application/x-directory, can someone tell me which it is and how I can figure this out myself in the future?
My problem is previewing opens in Firefox as a "file://" url, but I want this to be handled by vlc or rox...
Thanks!!

Last edited by awayand (2011-06-02 16:15:47)

Offline

#2 2011-06-02 16:15:27

awayand
Member
Registered: 2009-09-25
Posts: 398

Re: [SOLVED] which mimetype is qbittorrent using for previewing files?

I am going to answer my own question here:

The mime type somehow is in the file so it is not the app that says "use mime type x on this file" but it's rather "use whatever mime type is associated with this file". To see a mime type of a file called test.mp4 use this command:

$ xdg-mime query filetype test.mp4

In my example I got this:

audio/mp4; charset=binary

Now we set the mime-type, in my example I want to use rox to handle this file, and then configure rox to use vlc:

xdg-mime default rox.desktop audio/mp4

Since I already set the default action for that file in rox with a right-click and then using "vlc" as the command, this now works beautifully.

If you are wondering, setting the default app for a mime type will edit the file

~/.local/share/applications/defaults.list

and add the following for this magic to work:

[Default Applications]
audio/mp4=rox.desktop

On a side note, does anyone else feel that freedesktop.org's documentation really blows? Isn't all of the above supposed to be explained for example here? http://www.freedesktop.org/wiki/Specifi … -info-spec

EDIT: I added this into the wiki here: https://wiki.archlinux.org/index.php/Ch … rary_files
as this is the first page that showed up when I searched "mime" in the wiki...

Last edited by awayand (2011-06-02 16:26:12)

Offline

Board footer

Powered by FluxBB