debug
This commit is contained in:
parent
512c8bbbb7
commit
04ae434870
@ -54,7 +54,7 @@ router.get('/:id', function(req, res, next) {
|
|||||||
channel_info = row;
|
channel_info = row;
|
||||||
});
|
});
|
||||||
|
|
||||||
db.each("SELECT i.id as id, i.title as title, t.hints as hints i.duration as second, t.size as size, i.year as year"
|
db.each("SELECT i.id as id, i.title as title, t.hints as hints, i.duration as second, t.size as size, i.year as year"
|
||||||
+ " FROM media_items t, metadata_items i "
|
+ " FROM media_items t, metadata_items i "
|
||||||
+ " WHERE t.metadata_item_id = i.id AND i.title != '' AND t.library_section_id = ? "
|
+ " WHERE t.metadata_item_id = i.id AND i.title != '' AND t.library_section_id = ? "
|
||||||
+ " ORDER BY i.title ASC",req.params.id, function(err, row) {
|
+ " ORDER BY i.title ASC",req.params.id, function(err, row) {
|
||||||
|
@ -16,7 +16,7 @@ router.get('/:id', function(req, res, next) {
|
|||||||
row.rating = Math.round(row.rating,2);
|
row.rating = Math.round(row.rating,2);
|
||||||
row.file = [];
|
row.file = [];
|
||||||
|
|
||||||
db.each("SELECT id,file,size,hash,duration FROM media_parts where media_item_id IN (SELECT id FROM media_items WHERE metadata_items_id = ? )",req.params.id, function(error, ligne) {
|
db.each("SELECT id,file,size,hash,duration FROM media_parts where media_item_id IN (SELECT id FROM media_items WHERE metadata_item_id = ? )",req.params.id, function(error, ligne) {
|
||||||
var tab = ligne.file.split('/');
|
var tab = ligne.file.split('/');
|
||||||
var tab2 = tab[tab.length -1].split('\\');
|
var tab2 = tab[tab.length -1].split('\\');
|
||||||
var filename = tab2[tab2.length -1];
|
var filename = tab2[tab2.length -1];
|
||||||
|
@ -10,9 +10,9 @@ router.get('/:id', function(req, res, next) {
|
|||||||
//on fais toute les opération de base a la suite
|
//on fais toute les opération de base a la suite
|
||||||
db.serialize(function() {
|
db.serialize(function() {
|
||||||
|
|
||||||
db.each("SELECT i.id as id, i.title as title, t.hints as hints, p.file as file, i.duration as second, t.size as size, i.year as year"
|
db.each("SELECT i.id as id, i.title as title, t.hints as hints, i.duration as second, t.size as size, i.year as year"
|
||||||
+ " FROM media_items t, metadata_items i, media_parts p "
|
+ " FROM media_items t, metadata_items i "
|
||||||
+ " WHERE p.media_item_id=t.id AND t.metadata_item_id = i.id AND t.hints = '%Walkin%' "
|
+ " WHERE t.metadata_item_id = i.id AND t.hints = '%?%' "
|
||||||
+ " ORDER BY i.title ASC",req.params.id, function(err, row) {
|
+ " ORDER BY i.title ASC",req.params.id, function(err, row) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
console.log(row);
|
console.log(row);
|
||||||
|
Loading…
Reference in New Issue
Block a user