diff --git a/app.js b/app.js index fb6b53b..79842c6 100644 --- a/app.js +++ b/app.js @@ -12,7 +12,7 @@ var app = express(); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); -//protection par mot de passe +//password protection if( typeof config.auth_user !== 'undefined' && typeof config.auth_password !== 'undefined' ){ console.log("SAFE MODE: votre serveur est protégé par mot de passe."); var basicAuth = require('basic-auth'); @@ -31,7 +31,7 @@ else{ console.log("UNSAFE MODE: configurez un auth_user et auth_password dans le fichier config.js"); } -//envoyer config a tout le monde +//send config to everyone app.use(function(req, res, next) { res.locals.config = config; next(); diff --git a/bin/www b/bin/www index 015a6e5..2f2b5e4 100755 --- a/bin/www +++ b/bin/www @@ -1,5 +1,5 @@ #!/usr/bin/env node - //On commence par la mise en cluster + //One begins with the clustering var cluster = require('cluster'); // Code to run if we're in the master process diff --git a/routes/channel.js b/routes/channel.js index cb58695..35d4fc3 100644 --- a/routes/channel.js +++ b/routes/channel.js @@ -23,7 +23,7 @@ router.get('/:id', function(req, res, next) { } } - //on fais toute les opération de base a la suite + //we do all the basic operations following db.serialize(function() { //db.run("CREATE TABLE if not exists user_info (info TEXT)"); @@ -47,7 +47,7 @@ router.get('/:id', function(req, res, next) { data.push(row); }, - //aprés toute les opération de la base + //after all the operations of the database function() { res.render('channel', { title: 'List of videos',videos: data, channel: channel_info }); }); diff --git a/routes/divers.js b/routes/divers.js index 582a3bd..480e191 100644 --- a/routes/divers.js +++ b/routes/divers.js @@ -42,7 +42,7 @@ router.get('/', function(req, res, next) { var db = config.init_db(); /*var data = []; - //on fais toute les opération de base a la suite + //we do all the basic operations following db.serialize(function() { //db.run("CREATE TABLE if not exists user_info (info TEXT)"); diff --git a/routes/index.js b/routes/index.js index 5e529d9..e1b8d4a 100644 --- a/routes/index.js +++ b/routes/index.js @@ -8,7 +8,7 @@ router.get('/', function(req, res, next) { var db = config.init_db(); var data = []; - //on fais toute les opération de base a la suite + //we do all the basic operations following db.serialize(function() { //db.run("CREATE TABLE if not exists user_info (info TEXT)"); @@ -22,7 +22,7 @@ router.get('/', function(req, res, next) { + " FROM library_sections ORDER BY name ASC", function(err, row) { data.push(row); }, - //aprés toute les opération de la base + //after all the operations of the database function() { res.render('index', { title: 'List of videos',channels: data, presentation: config.presentation }); }); diff --git a/routes/show.js b/routes/show.js index 1878b60..b8804b3 100644 --- a/routes/show.js +++ b/routes/show.js @@ -21,7 +21,7 @@ router.get('/:id/:incoming_chan', function(req, res, next) { var db = config.init_db(); var data = []; - //on fais toute les opération de base a la suite + //we do all the basic operations following db.serialize(function() { db.each("SELECT episode.id as id, episode.title as titre, episode.[index] as episode, episode.duration as second, season.[index] as saison, show.title as serie "+ @@ -51,7 +51,7 @@ router.get('/:id/:incoming_chan', function(req, res, next) { }); db.close(function(){ - //aprés toute les opération de la base + //after all the operations of the database var titre = "Série inexistante"; if(data.length > 0){ titre = 'Episode de '+data[0].serie; diff --git a/routes/show_list.js b/routes/show_list.js index 0b8a70e..81ffa13 100644 --- a/routes/show_list.js +++ b/routes/show_list.js @@ -8,7 +8,7 @@ router.get('/:id', function(req, res, next) { var shows = []; - //on fais toute les opération de base a la suite + //we do all the basic operations following db.serialize(function() { db.each("SELECT id, title, year" @@ -17,7 +17,7 @@ router.get('/:id', function(req, res, next) { ,req.params.id, function(err, row) { shows.push(row); }, - //aprés toute les opération de la base + //after all the operations of the database function(){ console.log(shows); res.render('show_list', { title: 'List of series',shows: shows, channel_id: req.params.id });