From e7793513f7622df1dffc7d77ef8a35e61a79239e Mon Sep 17 00:00:00 2001 From: WEBER Antoine Date: Mon, 14 Sep 2015 23:29:28 +0200 Subject: [PATCH] filtrer les vides --- routes/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/index.js b/routes/index.js index 370d1c3..d5e09bf 100644 --- a/routes/index.js +++ b/routes/index.js @@ -40,7 +40,9 @@ router.get('/', function(req, res, next) { + " FROM metadata_items i, media_parts p " + " WHERE p.media_item_id=i.id ORDER BY i.title ASC", function(err, row) { var tab = row.file.split('/'); - var filename = tab[tab.length -1]; + var tab2 = tab[tab.length -1].split('\\'); + var filename = tab2[tab2.length -1]; + if(row.title != '') html += " " + row.title + ""+row.second+""+row.year+""; }, //aprés toute les opération de la base