diff --git a/autopost/server.js b/autopost/server.js index 8331a21..77aeebd 100644 --- a/autopost/server.js +++ b/autopost/server.js @@ -210,13 +210,15 @@ autopostRouter.get('/', (req, res) => { default: statusText = 'INCONNU'; } - let logLink = row.status !== 0 - ? ` | Log` - : ''; - let mediainfoLink = ` | Mediainfo`; + let logLink = (parseInt(row.status) === 1 || parseInt(row.status) === 2) + ? ' | Log' + : ''; + let mediainfoLink = (parseInt(row.status) === 0 || parseInt(row.status) === 1 || parseInt(row.status) === 2) + ? ' | Mediainfo' + : ''; let dlLink = row.status === 1 - ? ` | DL` - : ''; + ? ` | DL` + : ''; html += ` @@ -306,13 +308,16 @@ autopostRouter.get('/', (req, res) => { default: statusText = 'INCONNU'; } - let logLink = parseInt(row.status) !== 0 - ? ' | Log' - : ''; - let mediainfoLink = ' | Mediainfo'; + + let logLink = parseInt(row.status) === 1 || parseInt(row.status) === 2 + ? ' | Log' + : ''; + let mediainfoLink = parseInt(row.status) === 0 || parseInt(row.status) === 1 || parseInt(row.status) === 2 + ? ' | Mediainfo' + : ''; let dlLink = parseInt(row.status) === 1 - ? ' | DL' - : ''; + ? ' | DL' + : ''; let tr = \` \${row.nom}