Jump to content

Troubles with File filter (workflow input) and mkv files


Recommended Posts

Hello,
 
I use a workflow to view movies via Beamer. And recently, I have some troubles with the file filter and mkv files. 
I type the keyword (beam) and the First letters of a mkv movie and nothing appears ! No problems with avi or mov or mp4 files. 
I didn't get this problem before but I don't know if this Bug is due to the last Update of mavericks or Alfred ?!

 

Some pictures to illustrate the problem :

 

871704Capturedcran20140316232855.jpg

 

610138Capturedcran20140316233015.jpg

 

510464Capturedcran20140316233032.jpg

 

227129Capturedcran20140316233022.jpg

 

OSX 10.9.2 / Alfred v2.2 (243)

Edited by FlyingTruelle
Link to comment

 

Hello,
 
I use a workflow to view movies via Beamer. And recently, I have some troubles with the file filter and mkv files. 
I type the keyword (beam) and the First letters of a mkv movie and nothing appears ! No problems with avi or mov or mp4 files. 
I didn't get this problem before but I don't know if this Bug is due to the last Update of mavericks or Alfred ?!

 

 

OSX 10.9.2 / Alfred v2.2 (243)

 

 

The first thing to try is reindex your OS X metadata. There is a shortcut for this action in Alfred's Advanced preferences. The other thing to check is that these files are within Alfred's search scope (or the filter's search scope if you have set this specifically for that filter).
 
We can find out if there is a deeper metadata issue with the file by dropping it into this little too and showing the output:
 
 
Cheers,
Andrew
 
[moving to workflow help]
Link to comment

Hi Andrew,

 

I already reindexed the OS X metadata.

 

These video files are in Alfred's search scope :

278262Capturedcran20140317120502.jpg

 

 

And the result of your Metadata tool :

 

/Users/Julien/Movies/Films/test.mkv
 
Internal File Metadata
======================
 
 Display Name: test.mkv
    Alt Names: 
    File Type: org.perian.matroska
     Comments: 
     Keywords: 
    Last Used: 2014-03-16 23:07:02 +0000
 
Raw mdls File Metadata
======================
 
kMDItemContentCreationDate     = 2014-03-08 14:33:36 +0000
kMDItemContentModificationDate = 2014-03-16 08:36:55 +0000
kMDItemContentType             = "org.perian.matroska"
kMDItemContentTypeTree         = (
    "org.perian.matroska",
    "public.movie",
    "public.audiovisual-content",
    "public.data",
    "public.item",
    "public.content"
)
kMDItemDateAdded               = 2014-03-17 11:02:18 +0000
kMDItemDisplayName             = "test.mkv"
kMDItemFSContentChangeDate     = 2014-03-16 08:36:55 +0000
kMDItemFSCreationDate          = 2014-03-08 14:33:36 +0000
kMDItemFSCreatorCode           = ""
kMDItemFSFinderFlags           = 0
kMDItemFSHasCustomIcon         = 0
kMDItemFSInvisible             = 0
kMDItemFSIsExtensionHidden     = 0
kMDItemFSIsStationery          = 0
kMDItemFSLabel                 = 0
kMDItemFSName                  = "test.mkv"
kMDItemFSNodeCount             = 393886925
kMDItemFSOwnerGroupID          = 20
kMDItemFSOwnerUserID           = 501
kMDItemFSSize                  = 4688854221
kMDItemFSTypeCode              = ""
kMDItemKind                    = "Matroska Video"
kMDItemLastUsedDate            = 2014-03-16 23:07:02 +0000
kMDItemLogicalSize             = 4688854221
kMDItemPhysicalSize            = 4688859136
kMDItemUseCount                = 2
kMDItemUsedDates               = (
    "2014-03-16 23:00:00 +0000"
Edited by FlyingTruelle
Link to comment

I've just found a solution :

I had manually "org.perian.matroska" in the info.plist of the workflow, and now it works !

I'm just wondering why when I dropped my file in the file filter area it did not add the file type !

 

Alfred should have added the file type... he adds the kMDItemContentType. Have you tried again with the specific file you put in the metadata tool?

Link to comment

Since I put Manually "org.perian.matroska" in the info.plist, it works.

I removed "org.perian.matroska" from file type filter of the workflow and I tried to drop my test.mkv in the "file type area", but it didn't work : I've got a "beamer.mkv" added instead of "org.perian.matroska"

Link to comment

Since I put Manually "org.perian.matroska" in the info.plist, it works.

I removed "org.perian.matroska" from file type filter of the workflow and I tried to drop my test.mkv in the "file type area", but it didn't work : I've got a "beamer.mkv" added instead of "org.perian.matroska"

 

How odd, I'll make a note to look into this. Glad you had the initiative to work out your solution, nice one :)

Link to comment

This is a problem I often have with MKV files. It's because there's no standard (or at least common) UTI and installing new apps will often assign the .MKV extension to a new UTI.

 

I usually find reinstalling MPlayer and rebuilding the launch services database fixes it, but it can come up time and time again if you install new video software that declares yet another UTI.

 

You might want to consider adding "public.movie" to info.plist: that will encompass most video formats and hopefully avoid problems with re-defined UTIs.

Link to comment
  • 1 year later...

How odd, I'll make a note to look into this. Glad you had the initiative to work out your solution, nice one :)

Hi Andrew,

 

I still encounter this problem, even though I manually add the org.perian.matroska and the public.movie to my .plist file.

Is there a better solution for this problem already?

 

Thanks in advance.

 

BR, PK

Link to comment

Not really, no. As mentioned, it's a fundamental problem with the OS X metadata database and application developers naughtily declaring their own UTIs. Some developers are even too dumb to declare that their UTI for MKV is a subclass of "public.movie".

 

There's nothing Alfred can do about this.
 
If you have all your MKVs in one or two folders, and aren't afraid of Terminal, this should fix the issue:

# See what UTIs are assigned to your MKV files.
# This searches the current directory and its subdirectories.
find /PATH/TO/MOVIES/FOLDER -name '*.mkv' -exec mdls -name kMDItemContentType {} \;

# Tell the metadata subsystem to re-import the files.
# This will update the UTI to whatever your system currently thinks
# is the right one.
find /PATH/TO/MOVIES/FOLDER -name '*.mkv' -exec mdimport {} \;

# See what has changed
find /PATH/TO/MOVIES/FOLDER -name '*.mkv' -exec mdls -name kMDItemContentType {} \;

Obviously, you need to change "/PATH/TO/MOVIES/FOLDER" to the path to your movies folder. Run again for each root folder that contains MKVs (e.g. "~/Movies" and/or "/Volumes/Media/Movies").

 

Your MKV files should now all have the same UTI. Make sure that's included in your File Filter. BTW, in the latest version of Alfred, you can manually add UTIs to the File Types list in your File Filter config screen. No need to edit info.plist any more.

Edited by deanishe
Link to comment
  • 11 months later...

I just want to say, thanks to Deanishe for this terminal command. It really helped.

find /PATH/TO/MOVIES/FOLDER -name '*.mkv' -exec mdls -name kMDItemContentType {} \;

It showed me that every one of my MKVs had the UTI of "org.matroska.mkv" - go figure. Not sure why Alfred (3) didn't realize that when I dropped one in, but after adding it to the file filter list, all is well, and my "find movies" filter is working perfectly. Thanks for the help!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...