diff --git a/app/src/main/java/com/kamwithk/ankiconnectandroid/routing/LocalAudioAPIRouting.java b/app/src/main/java/com/kamwithk/ankiconnectandroid/routing/LocalAudioAPIRouting.java index 89e50fb..1ea9b7e 100644 --- a/app/src/main/java/com/kamwithk/ankiconnectandroid/routing/LocalAudioAPIRouting.java +++ b/app/src/main/java/com/kamwithk/ankiconnectandroid/routing/LocalAudioAPIRouting.java @@ -22,6 +22,7 @@ import com.kamwithk.ankiconnectandroid.routing.localaudiosource.JPodAudioSource; import com.kamwithk.ankiconnectandroid.routing.localaudiosource.LocalAudioSource; import com.kamwithk.ankiconnectandroid.routing.localaudiosource.NHK16AudioSource; +import com.kamwithk.ankiconnectandroid.routing.localaudiosource.Shinmeikai8AudioSource; import java.io.ByteArrayInputStream; import java.io.File; @@ -63,9 +64,11 @@ public LocalAudioAPIRouting(Context context) { this.sourceIdToSource = new HashMap<>(); + // TODO: read config this.sourceIdToSource.put("jpod", new JPodAudioSource()); this.sourceIdToSource.put("jpod_alternate", new JPodAltAudioSource()); this.sourceIdToSource.put("nhk16", new NHK16AudioSource()); + this.sourceIdToSource.put("shinmeikai8", new Shinmeikai8AudioSource()); this.sourceIdToSource.put("forvo", new ForvoAudioSource()); } diff --git a/app/src/main/java/com/kamwithk/ankiconnectandroid/routing/localaudiosource/Shinmeikai8AudioSource.java b/app/src/main/java/com/kamwithk/ankiconnectandroid/routing/localaudiosource/Shinmeikai8AudioSource.java new file mode 100644 index 0000000..47fd35e --- /dev/null +++ b/app/src/main/java/com/kamwithk/ankiconnectandroid/routing/localaudiosource/Shinmeikai8AudioSource.java @@ -0,0 +1,14 @@ +package com.kamwithk.ankiconnectandroid.routing.localaudiosource; + +import com.kamwithk.ankiconnectandroid.routing.database.Entry; + +public class Shinmeikai8AudioSource extends LocalAudioSource { + public Shinmeikai8AudioSource() { + super("shinmeikai8", "user_files/shinmeikai8_files"); + } + + @Override + public String getSourceName(Entry entry) { + return "SMK8 " + entry.display; + } +}