Ignore:
Timestamp:
07/18/14 07:49:27 (7 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
b5bed61
Parents:
ba6f48c
Message:

Add auto-detection of multimedia file extensions into lumina-fm, and also add a function into libLumina for converting a mime-type into a list of file extensions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lumina/libLumina/LuminaXDG.cpp

    rd435362e r0494142  
    350350} 
    351351 
     352QStringList LXDG::findFilesForMime(QString mime){ 
     353  QStringList out; 
     354  QStringList mimes = LXDG::loadMimeFileGlobs2().filter(mime); 
     355  for(int i=0; i<mimes.length(); i++){ 
     356    out << mimes[i].section(":",2,2); // "*.<extension>" 
     357  } 
     358  //qDebug() << "Mime to Files:" << mime << out; 
     359  return out; 
     360} 
     361 
    352362QStringList LXDG::loadMimeFileGlobs2(){ 
    353363  //output format: <weight>:<mime type>:<file extension (*.something)> 
Note: See TracChangeset for help on using the changeset viewer.