Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/org/openfilebot/MediaTypes.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions test/org/openfilebot/media/MediaDetectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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());
Expand Down