diff --git a/source/org/openfilebot/MediaTypes.properties b/source/org/openfilebot/MediaTypes.properties index 832a0d040..2bcbee15e 100644 --- a/source/org/openfilebot/MediaTypes.properties +++ b/source/org/openfilebot/MediaTypes.properties @@ -17,7 +17,7 @@ archive/tar: tar archive/bzip2: bzip2 audio/mp3: mp3 -audio/mp4: m4a aac +audio/mp4: m4a m4b aac audio/flac: flac audio/wma: wma audio/ogm: ogg ogm ogv oga diff --git a/test/org/openfilebot/media/MediaDetectionTest.java b/test/org/openfilebot/media/MediaDetectionTest.java index f7edf3fd1..d25516a6d 100644 --- a/test/org/openfilebot/media/MediaDetectionTest.java +++ b/test/org/openfilebot/media/MediaDetectionTest.java @@ -2,6 +2,7 @@ import static java.util.Collections.*; import static org.junit.Assert.*; +import static org.openfilebot.MediaTypes.*; import java.io.File; import java.util.Locale; @@ -10,6 +11,16 @@ public class MediaDetectionTest { + @Test + public void m4bIsAudio() { + File m4b = new File("book.m4b"); + + assertTrue(AUDIO_FILES.accept(m4b)); + assertTrue(AUDIO_FILES.accept(new File("BOOK.M4B"))); + assertFalse(VIDEO_FILES.accept(m4b)); + assertTrue(new AutoDetection(emptyList(), false, Locale.ENGLISH).isMusic(m4b)); + } + @Test public void parseMovieYear() { assertEquals("[2009]", MediaDetection.parseMovieYear("Avatar 2009 2100").toString());