Skip to content

Commit

Permalink
move playlist driver choice to config file
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Neme <lacrymology@gmail.com>
  • Loading branch information
Lacrymology committed Apr 3, 2013
1 parent 059d532 commit 47cc3fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.json
@@ -1,3 +1,3 @@
{

"playlist_server": "mongo"
}
5 changes: 3 additions & 2 deletions mosto.js
Expand Up @@ -109,15 +109,16 @@ function mosto(configFile) {
this.configFile = configFile;
this.config = false;
this.playlists = [];
this.server = new mvcp_server("melted");
this.driver = new playlists_driver("mongo");

if (!this.configFile)
this.configFile = './config.json';

console.log("mbc-mosto: [INFO] Reading configuration from " + this.configFile);

this.config = require(this.configFile);

this.server = new mvcp_server("melted");
this.driver = new playlists_driver(this.config.playlist_server);

console.log("mbc-mosto: [INFO] Starting mbc-mosto... ") ;

Expand Down

0 comments on commit 47cc3fc

Please sign in to comment.