Small library to allow old files be supported properly
This commit is contained in:
parent
ec55e071ca
commit
1da889a813
2 changed files with 11 additions and 3 deletions
|
@ -55,9 +55,7 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer {
|
|||
long time = System.currentTimeMillis();
|
||||
try {
|
||||
this.ctx = ctx;
|
||||
prologSystem = new Prolog(
|
||||
new String[] { "alice.tuprolog.lib.BasicLibrary",
|
||||
"alice.tuprolog.lib.ISOLibrary"}); //$NON-NLS-1$
|
||||
prologSystem = new Prolog(getLibraries());
|
||||
} catch (InvalidLibraryException e) {
|
||||
log.error("Initializing error", e); //$NON-NLS-1$
|
||||
throw new RuntimeException(e);
|
||||
|
@ -67,6 +65,11 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer {
|
|||
}
|
||||
init(voiceProvider, configFile);
|
||||
}
|
||||
|
||||
public String[] getLibraries(){
|
||||
return new String[] { "alice.tuprolog.lib.BasicLibrary",
|
||||
"alice.tuprolog.lib.ISOLibrary"};
|
||||
}
|
||||
|
||||
private void init(String voiceProvider, String configFile) throws CommandPlayerException {
|
||||
prologSystem.clearTheory();
|
||||
|
|
|
@ -45,6 +45,11 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
mediaPlayer = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLibraries() {
|
||||
return new String[] { "alice.tuprolog.lib.BasicLibrary"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playCommands(CommandBuilder builder){
|
||||
filesToPlay.addAll(builder.execute());
|
||||
|
|
Loading…
Reference in a new issue