added audio file associations
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 4 Jun 2013 11:07:21 +0000 (14:07 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 4 Jun 2013 11:07:21 +0000 (14:07 +0300)
src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java

index df40676..bb08388 100755 (executable)
@@ -16,6 +16,8 @@ public class FileAssociationManager {
 
     private static final String FILE_INDICATOR = "<FILE>";
 
+    private static final String MUSIC_PLAYER = "clementine";
+
     public static HashMap<String, String[]> extensionToApplication = new HashMap<String, String[]>();
 
     public static boolean openFile(final File file) {
@@ -76,6 +78,11 @@ public class FileAssociationManager {
         extensionToApplication.put("flv", new String[] { "vlc", FILE_INDICATOR });
         extensionToApplication.put("wmv", new String[] { "vlc", FILE_INDICATOR });
 
+        extensionToApplication.put("flac", new String[] { MUSIC_PLAYER, FILE_INDICATOR });
+        extensionToApplication.put("mp3", new String[] { MUSIC_PLAYER, FILE_INDICATOR });
+        extensionToApplication.put("ogg", new String[] { MUSIC_PLAYER, FILE_INDICATOR });
+        extensionToApplication.put("wav", new String[] { MUSIC_PLAYER, FILE_INDICATOR });
+
         extensionToApplication.put("ods", new String[] { SPREADSHEET_EDITOR, FILE_INDICATOR });
         extensionToApplication.put("xls", new String[] { SPREADSHEET_EDITOR, FILE_INDICATOR });
         extensionToApplication.put("xlsx", new String[] { SPREADSHEET_EDITOR, FILE_INDICATOR });