diff --git a/Dockerfile-nvidia b/Dockerfile-nvidia index 64a9569..740d98a 100644 --- a/Dockerfile-nvidia +++ b/Dockerfile-nvidia @@ -6,7 +6,7 @@ COPY --from=vexorian/dizquetv:nexecache /var/nexe/linux-x64-12.16.2 /var/nexe/ COPY . . RUN npm run build && LINUXBUILD=dizquetv sh make_dist.sh linuxonly -FROM jrottenberg/ffmpeg:4.3-nvidia +FROM jrottenberg/ffmpeg:4.3-nvidia1804 EXPOSE 8000 WORKDIR /home/node/app ENTRYPOINT [ "./dizquetv" ] diff --git a/README.md b/README.md index 6ff58a9..6ec4761 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ npm run dev-server ## Contribute * Pull requests welcome but please read the [Code of Conduct](CODE_OF_CONDUCT.md) and the [Pull Request Template](pull_request_template.md) first. -* We use [Conventional Commits](https://www.conventionalcommits.org/), a specification for adding human and machine readable meaning to commit messages. Add files with `git add` and call `git commit` to use your command line utility and create a commit. * Tip Jar: https://buymeacoffee.com/vexorian ## License diff --git a/index.js b/index.js index fc06018..b97c8c7 100644 --- a/index.js +++ b/index.js @@ -42,6 +42,12 @@ console.log( '------------' `); +const NODE = parseInt( process.version.match(/^[^0-9]*(\d+)\..*$/)[1] ); + +if (NODE < 12) { + console.error(`WARNING: Your nodejs version ${process.version} is lower than supported. dizqueTV has been tested best on nodejs 12.16.`); +} + for (let i = 0, l = process.argv.length; i < l; i++) { if ((process.argv[i] === "-p" || process.argv[i] === "--port") && i + 1 !== l) diff --git a/src/api.js b/src/api.js index cc17398..f778059 100644 --- a/src/api.js +++ b/src/api.js @@ -37,6 +37,7 @@ function api(db, channelService, fillerDB, customShowDB, xmltvInterval, guideSe res.send( { "dizquetv" : constants.VERSION_NAME, "ffmpeg" : v, + "nodejs" : process.version, } ); } catch(err) { console.error(err); diff --git a/web/controllers/version.js b/web/controllers/version.js index 7fedd00..5b5fe83 100644 --- a/web/controllers/version.js +++ b/web/controllers/version.js @@ -4,6 +4,7 @@ module.exports = function ($scope, dizquetv) { dizquetv.getVersion().then((version) => { $scope.version = version.dizquetv; $scope.ffmpegVersion = version.ffmpeg; + $scope.nodejs = version.nodejs; }) diff --git a/web/directives/channel-config.js b/web/directives/channel-config.js index 7d730f7..db7cb5e 100644 --- a/web/directives/channel-config.js +++ b/web/directives/channel-config.js @@ -1711,7 +1711,7 @@ function validURL(url) { } function checkChannelNumber(number) { - if ( /^[1-9][0-9]+$/.test(number) ) { + if ( /^(([1-9][0-9]*)|(0))$/.test(number) ) { let x = parseInt(number); return (0 <= x && x < 10000); } else { diff --git a/web/public/views/version.html b/web/public/views/version.html index 13b531c..01d77c5 100644 --- a/web/public/views/version.html +++ b/web/public/views/version.html @@ -20,7 +20,12 @@