diff --git a/.gitignore b/.gitignore index 14c2bec..bc53b03 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ +# any excluded dir with a .keep file will stay in github, but all other files will not :) +!.keep + +# ignore the following folders /node_modules /public/mp3cache/** /public/imagecache/** -# any excluded dir with a .keep file will stay in github, but all other files will not :) -!.keep \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6fecb6b..95da2ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,17 @@ FROM node:12.18-alpine + +# tzdata for timzone +RUN apk update +RUN apk add tzdata + ENV NODE_ENV=production + WORKDIR /usr/src/app COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] RUN npm install --production --silent && mv node_modules ../ + COPY . . EXPOSE 3000 +HEALTHCHECK --interval=10s --start-period=60s CMD wget http://127.0.0.1:3000 -qO /dev/null || exit 1 CMD ["node", "index.js"] + diff --git a/classes/arr/radarr.js b/classes/arr/radarr.js index 53c4e98..e28ea2f 100644 --- a/classes/arr/radarr.js +++ b/classes/arr/radarr.js @@ -67,7 +67,7 @@ class Radarr { medCard.cardType = cType.CardTypeEnum.ComingSoon; // dont bother to download if only looking for premiers - if (premieres && md.episodeNumber != 1) { + if (premieres == "true" && md.episodeNumber != 1) { // dont get cached files } else { // cache mp3 file diff --git a/classes/arr/sonarr.js b/classes/arr/sonarr.js index 9228453..78be389 100644 --- a/classes/arr/sonarr.js +++ b/classes/arr/sonarr.js @@ -66,7 +66,7 @@ class Sonarr { medCard.cardType = cType.CardTypeEnum.ComingSoon; // dont bother to download if only looking for premiers - if (premieres && md.episodeNumber != 1) { + if (premieres == "true" && md.episodeNumber != 1) { // dont get cached files } else { // cache mp3 file diff --git a/classes/mediaservers/plex.js b/classes/mediaservers/plex.js index 444f76c..968a937 100644 --- a/classes/mediaservers/plex.js +++ b/classes/mediaservers/plex.js @@ -200,7 +200,7 @@ class Plex { medCard.decision = transcode; // add generic random theme if applicable - if (medCard.theme == "" && playGenenericThemes == true) { + if (medCard.theme == "" && playGenenericThemes == "true") { medCard.theme = "/randomthemes/" + (await core.GetRandomMP3()); } diff --git a/docker-compose.yml b/docker-compose.yml index 27774fb..8bf9e94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,35 @@ -version: '3.4' +version: '2.4' services: poster: image: poster + container_name: poster build: context: . dockerfile: ./Dockerfile environment: + TZ: Australia/Brisbane NODE_ENV: production + PLEXTOKEN: "" + PLEXIP: 192.168.1.135 + PLEX_HTTPS: "false" + PLEX_PORT: 32400 + SLIDE_DURATION: 7 + REFRESH_PERIOD: 120 + PLAY_THEMES: "true" + PLAY_GENERIC_THEMES: "true" + ON_DEMAND_LIBRARIES: "movies,anime,tv shows" + NUMBER_ON_DEMAND: 2 + ON_DEMAND_REFRESH: 30 + SONARR_URL: "http://192.168.1.135:8989" + SONARR_TOKEN: "" + SONARR_CAL_DAYS: 175 + SONARR_PREMIERES: "true" + RADARR_URL: "http://192.168.1.135:7878" + RADARR_TOKEN: "" + RADARR_CAL_DAYS: 15 + volumes: + - c:/code/poster/public/randomthemes:/usr/src/app/public/randomthemes ports: - - 3000:3000 + - 9876:3000 +