summaryrefslogtreecommitdiff
path: root/omptagger
diff options
context:
space:
mode:
Diffstat (limited to 'omptagger')
-rwxr-xr-xomptagger8
1 files changed, 4 insertions, 4 deletions
diff --git a/omptagger b/omptagger
index 59c4f12..e5e4ad3 100755
--- a/omptagger
+++ b/omptagger
@@ -112,6 +112,9 @@ Tag Generation:
end
class Datum
+ @@mime = FileMagic.mime
+ @@mime.simplified = true
+
def initialize(filename)
raise 'File does not exist.' unless File.exist?(filename)
@@ -119,10 +122,7 @@ class Datum
@filename = File.expand_path(filename)
- mime = FileMagic.mime
- mime.simplified = true
-
- case mime.file(@filename)
+ case @@mime.file(@filename)
when 'audio/x-flac'
type = FLAC
when 'application/ogg'