Translated comment to eng using g trans
This commit is contained in:
parent
6760ff6a7a
commit
a9c80e1318
4
app.js
4
app.js
@ -12,7 +12,7 @@ var app = express();
|
|||||||
app.set('views', path.join(__dirname, 'views'));
|
app.set('views', path.join(__dirname, 'views'));
|
||||||
app.set('view engine', 'jade');
|
app.set('view engine', 'jade');
|
||||||
|
|
||||||
//protection par mot de passe
|
//password protection
|
||||||
if( typeof config.auth_user !== 'undefined' && typeof config.auth_password !== 'undefined' ){
|
if( typeof config.auth_user !== 'undefined' && typeof config.auth_password !== 'undefined' ){
|
||||||
console.log("SAFE MODE: votre serveur est protégé par mot de passe.");
|
console.log("SAFE MODE: votre serveur est protégé par mot de passe.");
|
||||||
var basicAuth = require('basic-auth');
|
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");
|
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) {
|
app.use(function(req, res, next) {
|
||||||
res.locals.config = config;
|
res.locals.config = config;
|
||||||
next();
|
next();
|
||||||
|
2
bin/www
2
bin/www
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
//On commence par la mise en cluster
|
//One begins with the clustering
|
||||||
var cluster = require('cluster');
|
var cluster = require('cluster');
|
||||||
|
|
||||||
// Code to run if we're in the master process
|
// Code to run if we're in the master process
|
||||||
|
@ -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.serialize(function() {
|
||||||
|
|
||||||
//db.run("CREATE TABLE if not exists user_info (info TEXT)");
|
//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);
|
data.push(row);
|
||||||
},
|
},
|
||||||
//aprés toute les opération de la base
|
//after all the operations of the database
|
||||||
function() {
|
function() {
|
||||||
res.render('channel', { title: 'List of videos',videos: data, channel: channel_info });
|
res.render('channel', { title: 'List of videos',videos: data, channel: channel_info });
|
||||||
});
|
});
|
||||||
|
@ -42,7 +42,7 @@ router.get('/', function(req, res, next) {
|
|||||||
var db = config.init_db();
|
var db = config.init_db();
|
||||||
|
|
||||||
/*var data = [];
|
/*var data = [];
|
||||||
//on fais toute les opération de base a la suite
|
//we do all the basic operations following
|
||||||
db.serialize(function() {
|
db.serialize(function() {
|
||||||
|
|
||||||
//db.run("CREATE TABLE if not exists user_info (info TEXT)");
|
//db.run("CREATE TABLE if not exists user_info (info TEXT)");
|
||||||
|
@ -8,7 +8,7 @@ router.get('/', function(req, res, next) {
|
|||||||
var db = config.init_db();
|
var db = config.init_db();
|
||||||
|
|
||||||
var data = [];
|
var data = [];
|
||||||
//on fais toute les opération de base a la suite
|
//we do all the basic operations following
|
||||||
db.serialize(function() {
|
db.serialize(function() {
|
||||||
|
|
||||||
//db.run("CREATE TABLE if not exists user_info (info TEXT)");
|
//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) {
|
+ " FROM library_sections ORDER BY name ASC", function(err, row) {
|
||||||
data.push(row);
|
data.push(row);
|
||||||
},
|
},
|
||||||
//aprés toute les opération de la base
|
//after all the operations of the database
|
||||||
function() {
|
function() {
|
||||||
res.render('index', { title: 'List of videos',channels: data, presentation: config.presentation });
|
res.render('index', { title: 'List of videos',channels: data, presentation: config.presentation });
|
||||||
});
|
});
|
||||||
|
@ -21,7 +21,7 @@ router.get('/:id/:incoming_chan', function(req, res, next) {
|
|||||||
var db = config.init_db();
|
var db = config.init_db();
|
||||||
var data = [];
|
var data = [];
|
||||||
|
|
||||||
//on fais toute les opération de base a la suite
|
//we do all the basic operations following
|
||||||
db.serialize(function() {
|
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 "+
|
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(){
|
db.close(function(){
|
||||||
//aprés toute les opération de la base
|
//after all the operations of the database
|
||||||
var titre = "Série inexistante";
|
var titre = "Série inexistante";
|
||||||
if(data.length > 0){
|
if(data.length > 0){
|
||||||
titre = 'Episode de '+data[0].serie;
|
titre = 'Episode de '+data[0].serie;
|
||||||
|
@ -8,7 +8,7 @@ router.get('/:id', function(req, res, next) {
|
|||||||
|
|
||||||
var shows = [];
|
var shows = [];
|
||||||
|
|
||||||
//on fais toute les opération de base a la suite
|
//we do all the basic operations following
|
||||||
db.serialize(function() {
|
db.serialize(function() {
|
||||||
|
|
||||||
db.each("SELECT id, title, year"
|
db.each("SELECT id, title, year"
|
||||||
@ -17,7 +17,7 @@ router.get('/:id', function(req, res, next) {
|
|||||||
,req.params.id, function(err, row) {
|
,req.params.id, function(err, row) {
|
||||||
shows.push(row);
|
shows.push(row);
|
||||||
},
|
},
|
||||||
//aprés toute les opération de la base
|
//after all the operations of the database
|
||||||
function(){
|
function(){
|
||||||
console.log(shows);
|
console.log(shows);
|
||||||
res.render('show_list', { title: 'List of series',shows: shows, channel_id: req.params.id });
|
res.render('show_list', { title: 'List of series',shows: shows, channel_id: req.params.id });
|
||||||
|
Loading…
Reference in New Issue
Block a user