From b946c83239d61fc456a501ef10c7b61588014422 Mon Sep 17 00:00:00 2001 From: Jason House Date: Tue, 5 Jan 2021 21:52:20 +0900 Subject: [PATCH 1/2] Fixing tvdb to tmdb --- .../java/com/jasonhhouse/gaps/BasicMovie.java | 4 ++-- .../main/java/com/jasonhhouse/gaps/Rss.java | 18 +++++++++--------- GapsWeb/rssFeed.json | 6 +++--- .../gaps/service/GapsSearchService.java | 12 ++++++------ .../src/main/resources/templates/index.html | 2 +- .../duplication/duplication.spec.js | 6 +++--- docker-compose.yaml | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Core/src/main/java/com/jasonhhouse/gaps/BasicMovie.java b/Core/src/main/java/com/jasonhhouse/gaps/BasicMovie.java index 499f296..3edc011 100755 --- a/Core/src/main/java/com/jasonhhouse/gaps/BasicMovie.java +++ b/Core/src/main/java/com/jasonhhouse/gaps/BasicMovie.java @@ -156,7 +156,7 @@ public final class BasicMovie implements Comparable { } BasicMovie basicMovie = (BasicMovie) o; - //Compare tvdb id first + //Compare tmdb id first if (tmdbId != -1 && tmdbId.equals(basicMovie.tmdbId)) { return true; } @@ -192,7 +192,7 @@ public final class BasicMovie implements Comparable { ", moviesInCollection=" + moviesInCollection + ", collection='" + collectionTitle + '\'' + ", collectionId=" + collectionId + - ", tvdbId=" + tmdbId + + ", tmdbId=" + tmdbId + ", ratingKey=" + ratingKey + ", key='" + key + '\'' + '}'; diff --git a/Core/src/main/java/com/jasonhhouse/gaps/Rss.java b/Core/src/main/java/com/jasonhhouse/gaps/Rss.java index 73a659c..6437940 100755 --- a/Core/src/main/java/com/jasonhhouse/gaps/Rss.java +++ b/Core/src/main/java/com/jasonhhouse/gaps/Rss.java @@ -20,8 +20,8 @@ public final class Rss { @JsonProperty("release_date") private final Integer releaseDate; - @JsonProperty("tvdb_id") - private final Integer tvdbId; + @JsonProperty("tmdb_id") + private final Integer tmdbId; @JsonProperty("title") private final String title; @@ -29,10 +29,10 @@ public final class Rss { @JsonProperty("poster_path") private final String posterPath; - public Rss(String imdbId, Integer releaseDate, Integer tvdbId, String title, String posterPath) { + public Rss(String imdbId, Integer releaseDate, Integer tmdbId, String title, String posterPath) { this.imdbId = imdbId; this.releaseDate = releaseDate; - this.tvdbId = tvdbId; + this.tmdbId = tmdbId; this.title = title; this.posterPath = posterPath; } @@ -45,8 +45,8 @@ public final class Rss { return releaseDate; } - public Integer getTvdbId() { - return tvdbId; + public Integer getTmdbId() { + return tmdbId; } public String getTitle() { @@ -64,14 +64,14 @@ public final class Rss { Rss rss = (Rss) o; return Objects.equals(imdbId, rss.imdbId) && Objects.equals(releaseDate, rss.releaseDate) && - Objects.equals(tvdbId, rss.tvdbId) && + Objects.equals(tmdbId, rss.tmdbId) && Objects.equals(title, rss.title) && Objects.equals(posterPath, rss.posterPath); } @Override public int hashCode() { - return Objects.hash(imdbId, releaseDate, tvdbId, title, posterPath); + return Objects.hash(imdbId, releaseDate, tmdbId, title, posterPath); } @Override @@ -79,7 +79,7 @@ public final class Rss { return "Rss{" + "imdbId='" + imdbId + '\'' + ", releaseDate=" + releaseDate + - ", tvdbId=" + tvdbId + + ", tmdbId=" + tmdbId + ", title='" + title + '\'' + ", posterPath='" + posterPath + '\'' + '}'; diff --git a/GapsWeb/rssFeed.json b/GapsWeb/rssFeed.json index bc20f20..2fd6f4b 100755 --- a/GapsWeb/rssFeed.json +++ b/GapsWeb/rssFeed.json @@ -2,21 +2,21 @@ { "imdb_id": "tt0078748", "release_date": 1986, - "tvdb_id": 348, + "tmdb_id": 348, "title": "Alien", "poster_path": "" }, { "imdb_id": "tt0078748", "release_date": 1992, - "tvdb_id": 348, + "tmdb_id": 348, "title": "Alien", "poster_path": "" }, { "imdb_id": "tt0078748", "release_date": 1997, - "tvdb_id": 348, + "tmdb_id": 348, "title": "Alien", "poster_path": "" } diff --git a/GapsWeb/src/main/java/com/jasonhhouse/gaps/service/GapsSearchService.java b/GapsWeb/src/main/java/com/jasonhhouse/gaps/service/GapsSearchService.java index 98da7c2..34e771d 100755 --- a/GapsWeb/src/main/java/com/jasonhhouse/gaps/service/GapsSearchService.java +++ b/GapsWeb/src/main/java/com/jasonhhouse/gaps/service/GapsSearchService.java @@ -86,7 +86,7 @@ public class GapsSearchService implements GapsSearch { private final SimpMessagingTemplate template; - private final AtomicInteger tempTvdbCounter; + private final AtomicInteger tempTmdbCounter; private final FileIoService fileIoService; @@ -102,7 +102,7 @@ public class GapsSearchService implements GapsSearch { this.fileIoService = fileIoService; this.notificationService = notificationService; - tempTvdbCounter = new AtomicInteger(); + tempTmdbCounter = new AtomicInteger(); cancelSearch = new AtomicBoolean(true); } @@ -162,7 +162,7 @@ public class GapsSearchService implements GapsSearch { searchForMovies(plexProperties, machineIdentifier, key, ownedBasicMovies, everyBasicMovie, recommended, searched, searchedMovieCount); watch.stop(); LOGGER.info("Time Elapsed: {} seconds.", TimeUnit.MILLISECONDS.toSeconds(watch.getTime())); - LOGGER.info("Times used TVDB ID: {}", tempTvdbCounter); + LOGGER.info("Times used TMDB ID: {}", tempTmdbCounter); } catch (SearchCancelledException e) { String reason = "Search cancelled"; LOGGER.error(reason); @@ -252,12 +252,12 @@ public class GapsSearchService implements GapsSearch { LOGGER.info(basicMovie.toString()); if (basicMovie.getTmdbId() != -1 && basicMovie.getCollectionId() != -1) { LOGGER.info("Used Collection ID to get {}", basicMovie.getName()); - tempTvdbCounter.incrementAndGet(); + tempTmdbCounter.incrementAndGet(); handleCollection(plexProperties, machineIdentifier, key, ownedBasicMovies, everyBasicMovie, recommended, searched, searchedMovieCount, basicMovie, client, languageCode); continue; } else if (basicMovie.getTmdbId() != -1) { - LOGGER.info("Used TVDB ID to get {}", basicMovie.getName()); - tempTvdbCounter.incrementAndGet(); + LOGGER.info("Used TMDB ID to get {}", basicMovie.getName()); + tempTmdbCounter.incrementAndGet(); searchMovieDetails(plexProperties, machineIdentifier, key, ownedBasicMovies, everyBasicMovie, recommended, searched, searchedMovieCount, basicMovie, client, languageCode); continue; } else if (StringUtils.isNotBlank(basicMovie.getImdbId())) { diff --git a/GapsWeb/src/main/resources/templates/index.html b/GapsWeb/src/main/resources/templates/index.html index 6a782bd..cfcf75f 100755 --- a/GapsWeb/src/main/resources/templates/index.html +++ b/GapsWeb/src/main/resources/templates/index.html @@ -93,7 +93,7 @@ 'Alien³ (1992)' to be added to your collection.

Getting Started

-

To get started, head to configuration and enter your TVDB ID and +

To get started, head to configuration and enter your TMDB ID and Plex Server information.

diff --git a/cypress/integration/duplication/duplication.spec.js b/cypress/integration/duplication/duplication.spec.js index 0c7771a..632cf03 100644 --- a/cypress/integration/duplication/duplication.spec.js +++ b/cypress/integration/duplication/duplication.spec.js @@ -19,14 +19,14 @@ function checkForDuplicates(ownedMovies, recommendedMovies) { Object.values(recommendedMovies).forEach((recommendedMovie) => { Object.values(ownedMovies).forEach((ownedMovie) => { - if (recommendedMovie.tvdbId === ownedMovie.tvdbId + if (recommendedMovie.tmdbId === ownedMovie.tmdbId || recommendedMovie.imdbId === ownedMovie.imdbId) { cy.log(`Recommended Movie: ${recommendedMovie}`); cy.log(`Owned Movie: ${ownedMovie}`); } - if ((recommendedMovie.tvdbId !== undefined && ownedMovie.tvdbId !== undefined)) { - expect(recommendedMovie.tvdbId).to.not.eq(ownedMovie.tvdbId); + if ((recommendedMovie.tmdbId !== undefined && ownedMovie.tmdbId !== undefined)) { + expect(recommendedMovie.tmdbId).to.not.eq(ownedMovie.tmdbId); } if ((recommendedMovie.imdbId !== undefined && ownedMovie.imdbId !== undefined)) { diff --git a/docker-compose.yaml b/docker-compose.yaml index 9b2c514..2d33d28 100755 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -gapsz: +gaps: image: housewrecker/gaps:latest container_name: gaps environment: From 525712847672b07a29b278371b574927b4f8b296 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 5 Jan 2021 18:29:34 -0500 Subject: [PATCH 2/2] 0.8.8 --- Core/pom.xml | 4 ++-- Dockerfile | 2 +- Dockerfile.arm64 | 2 +- Dockerfile.ppc64le | 2 +- Dockerfile.raspbian | 2 +- Dockerfile.riscv64 | 2 +- GapsAsJar/gaps.nsi | 2 +- GapsWeb/pom.xml | 8 ++++---- GapsWeb/src/main/resources/application.yaml | 2 +- GapsWeb/src/main/resources/templates/about.html | 2 +- GapsWeb/src/main/resources/templates/index.html | 2 +- GapsWeb/src/main/resources/templates/updates.html | 5 +++++ Plex/pom.xml | 2 +- RadarrV3/pom.xml | 2 +- application-custom.yml | 2 +- build | 2 +- build.bat | 2 +- cypress/integration/about/about.spec.js | 2 +- package-lock.json | 2 +- package.json | 2 +- pom.xml | 2 +- 21 files changed, 29 insertions(+), 24 deletions(-) diff --git a/Core/pom.xml b/Core/pom.xml index f064c28..ad03dd4 100755 --- a/Core/pom.xml +++ b/Core/pom.xml @@ -5,7 +5,7 @@ Gaps com.jasonhhouse - 0.8.7 + 0.8.8 4.0.0 @@ -15,7 +15,7 @@ com.jasonhhouse Plex - 0.8.7 + 0.8.8 diff --git a/Dockerfile b/Dockerfile index c631d18..3899429 100755 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data WORKDIR /usr/app -COPY GapsWeb/target/GapsWeb-0.8.7.jar /usr/app/gaps.jar +COPY GapsWeb/target/GapsWeb-0.8.8.jar /usr/app/gaps.jar COPY start.sh /usr/app/ diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index fea5b72..c9c9bc1 100755 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -26,7 +26,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data WORKDIR /usr/app -COPY GapsWeb/target/GapsWeb-0.8.7.jar /usr/app/gaps.jar +COPY GapsWeb/target/GapsWeb-0.8.8.jar /usr/app/gaps.jar COPY start.sh /usr/app/ diff --git a/Dockerfile.ppc64le b/Dockerfile.ppc64le index 988c65f..4ce243f 100755 --- a/Dockerfile.ppc64le +++ b/Dockerfile.ppc64le @@ -22,7 +22,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data WORKDIR /usr/app -COPY GapsWeb/target/GapsWeb-0.8.7.jar /usr/app/gaps.jar +COPY GapsWeb/target/GapsWeb-0.8.8.jar /usr/app/gaps.jar COPY start.sh /usr/app/ diff --git a/Dockerfile.raspbian b/Dockerfile.raspbian index 2fc98ab..bd10cd1 100755 --- a/Dockerfile.raspbian +++ b/Dockerfile.raspbian @@ -20,7 +20,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data WORKDIR /usr/app -COPY GapsWeb/target/GapsWeb-0.8.7.jar /usr/app/gaps.jar +COPY GapsWeb/target/GapsWeb-0.8.8.jar /usr/app/gaps.jar COPY start.sh /usr/app/ diff --git a/Dockerfile.riscv64 b/Dockerfile.riscv64 index 5a1e81a..1ee720d 100755 --- a/Dockerfile.riscv64 +++ b/Dockerfile.riscv64 @@ -24,7 +24,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data WORKDIR /usr/app -COPY GapsWeb/target/GapsWeb-0.8.7.jar /usr/app/gaps.jar +COPY GapsWeb/target/GapsWeb-0.8.8.jar /usr/app/gaps.jar COPY start.sh /usr/app/ diff --git a/GapsAsJar/gaps.nsi b/GapsAsJar/gaps.nsi index 0881af7..cf5e40c 100644 --- a/GapsAsJar/gaps.nsi +++ b/GapsAsJar/gaps.nsi @@ -48,4 +48,4 @@ RMDIR /r $INSTDIR SectionEnd # name the installer -OutFile "gaps-0.8.7-installer.exe" \ No newline at end of file +OutFile "gaps-0.8.8-installer.exe" \ No newline at end of file diff --git a/GapsWeb/pom.xml b/GapsWeb/pom.xml index 4e837a2..6ac5b8a 100755 --- a/GapsWeb/pom.xml +++ b/GapsWeb/pom.xml @@ -5,7 +5,7 @@ Gaps com.jasonhhouse - 0.8.7 + 0.8.8 4.0.0 @@ -21,19 +21,19 @@ com.jasonhhouse Core - 0.8.7 + 0.8.8 com.jasonhhouse Plex - 0.8.7 + 0.8.8 com.jasonhhouse RadarrV3 - 0.8.7 + 0.8.8 diff --git a/GapsWeb/src/main/resources/application.yaml b/GapsWeb/src/main/resources/application.yaml index 51a1440..7f42374 100755 --- a/GapsWeb/src/main/resources/application.yaml +++ b/GapsWeb/src/main/resources/application.yaml @@ -47,7 +47,7 @@ info: app: name: Gaps description: Gaps searches through your Plex Server or local folders for all movies, then queries for known movies in the same collection. If those movies don't exist in your library, Gaps will recommend getting those movies, legally of course. - version: 0.8.7 + version: 0.8.8 storageFolder: /usr/data properties: rssFeed: rssFeed.json diff --git a/GapsWeb/src/main/resources/templates/about.html b/GapsWeb/src/main/resources/templates/about.html index 635ebdb..88bfd36 100755 --- a/GapsWeb/src/main/resources/templates/about.html +++ b/GapsWeb/src/main/resources/templates/about.html @@ -78,7 +78,7 @@ Gaps Logo

About

-

v0.8.7

+

v0.8.8

Gaps searches through your Plex Server. It then queries for known diff --git a/GapsWeb/src/main/resources/templates/index.html b/GapsWeb/src/main/resources/templates/index.html index cfcf75f..9907902 100755 --- a/GapsWeb/src/main/resources/templates/index.html +++ b/GapsWeb/src/main/resources/templates/index.html @@ -77,7 +77,7 @@

Gaps Logo -

v0.8.7

+

v0.8.8

Gaps searches through your Plex Server. It then queries for known diff --git a/GapsWeb/src/main/resources/templates/updates.html b/GapsWeb/src/main/resources/templates/updates.html index eff42b5..0f6cd0d 100755 --- a/GapsWeb/src/main/resources/templates/updates.html +++ b/GapsWeb/src/main/resources/templates/updates.html @@ -78,6 +78,11 @@ Gaps Logo

Updates

+

v0.8.8

+
    +
  • Fixed RSS bug with tvdb_id needing to be tmdb_id
  • +
+

v0.8.7

  • Fixing Docker exposed ports for reverse proxies.
  • diff --git a/Plex/pom.xml b/Plex/pom.xml index 4f71715..b032e43 100755 --- a/Plex/pom.xml +++ b/Plex/pom.xml @@ -5,7 +5,7 @@ Gaps com.jasonhhouse - 0.8.7 + 0.8.8 4.0.0 diff --git a/RadarrV3/pom.xml b/RadarrV3/pom.xml index 765c4fa..f9954a7 100755 --- a/RadarrV3/pom.xml +++ b/RadarrV3/pom.xml @@ -5,7 +5,7 @@ Gaps com.jasonhhouse - 0.8.7 + 0.8.8 4.0.0 diff --git a/application-custom.yml b/application-custom.yml index 7272957..7c04610 100644 --- a/application-custom.yml +++ b/application-custom.yml @@ -44,7 +44,7 @@ info: app: name: Gaps description: Gaps searches through your Plex Server or local folders for all movies, then queries for known movies in the same collection. If those movies don't exist in your library, Gaps will recommend getting those movies, legally of course. - version: 0.8.7 + version: 0.8.8 storageFolder: /{CUSTOM_FOLDER} #Change to folder that gaps has permission to read, write, and delete in. properties: rssFeed: rssFeed.json diff --git a/build b/build index 9a5b832..c302dfc 100755 --- a/build +++ b/build @@ -1,6 +1,6 @@ #!/bin/bash set -e -VERSION=0.8.7 +VERSION=0.8.8 JAR_VERSION="GapsWeb/target/GapsWeb-$VERSION.jar" ZIP_VERSION="GapsAsJar-$VERSION.zip" npm ci diff --git a/build.bat b/build.bat index 6d408c0..93d54c9 100644 --- a/build.bat +++ b/build.bat @@ -7,7 +7,7 @@ call npm run uglifyjs-pages call mvn clean install del GapsOnWindows\*.jar del GapsOnWindows\README.md -copy GapsWeb\target\GapsWeb-0.8.7.jar GapsOnWindows\gaps.jar +copy GapsWeb\target\GapsWeb-0.8.8.jar GapsOnWindows\gaps.jar copy README.md GapsOnWindows\ cd GapsOnWindows makensis gaps.nsi \ No newline at end of file diff --git a/cypress/integration/about/about.spec.js b/cypress/integration/about/about.spec.js index 9224773..0439b6e 100644 --- a/cypress/integration/about/about.spec.js +++ b/cypress/integration/about/about.spec.js @@ -21,7 +21,7 @@ describe('Verify About Page', () => { .should('have.text', 'About'); cy.get('.container > :nth-child(3)') - .should('have.text', 'v0.8.7'); + .should('have.text', 'v0.8.8'); cy.get('.container > :nth-child(6)') .should('have.text', 'Software'); diff --git a/package-lock.json b/package-lock.json index c8b22fe..fd91f28 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gaps", - "version": "0.8.7", + "version": "0.8.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a90128b..1fc80b6 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gaps", - "version": "0.8.7", + "version": "0.8.8", "description": "Gaps searches through your Plex Server or local folders for all movies, then queries for known movies in the same collection. If those movies don't exist in your library, Gaps will recommend getting those movies, legally of course.", "main": "/", "dependencies": { diff --git a/pom.xml b/pom.xml index 824bdef..0d80b7f 100755 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ com.jasonhhouse Gaps - 0.8.7 + 0.8.8 Gaps Demo project for Spring Boot