mirror of
https://github.com/JasonHHouse/gaps.git
synced 2026-05-25 12:28:25 -05:00
Merge pull request #233 from JasonHHouse/improvement/genres
Improvement/genres
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>Gaps</artifactId>
|
||||
<groupId>com.jasonhhouse</groupId>
|
||||
<version>0.9.3</version>
|
||||
<version>0.9.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
private String backdropPathUrl;
|
||||
@NotNull
|
||||
private Integer tmdbId;
|
||||
@NotNull
|
||||
private List<String> genres;
|
||||
|
||||
private BasicMovie(@NotNull String name,
|
||||
@NotNull Integer year,
|
||||
@@ -64,7 +66,8 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
@NotNull String overview,
|
||||
@NotNull List<MovieFromCollection> moviesInCollection,
|
||||
@NotNull Integer ratingKey,
|
||||
@NotNull String key) {
|
||||
@NotNull String key,
|
||||
@NotNull List<String> genres) {
|
||||
this.name = name;
|
||||
this.nameWithoutBadCharacters = name.replaceAll("[<>`~\\[\\]()*&^%$#@!|{}.,?\\-_=+:;]", "");
|
||||
this.year = year;
|
||||
@@ -79,6 +82,7 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
this.moviesInCollection = moviesInCollection;
|
||||
this.ratingKey = ratingKey;
|
||||
this.key = key;
|
||||
this.genres = genres;
|
||||
}
|
||||
|
||||
public @NotNull Integer getCollectionId() {
|
||||
@@ -137,12 +141,20 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
return moviesInCollection;
|
||||
}
|
||||
|
||||
public @NotNull String getBackdropPathUrl() {
|
||||
return backdropPathUrl;
|
||||
}
|
||||
|
||||
public void setBackdropPathUrl(@NotNull String backdropPathUrl) {
|
||||
this.backdropPathUrl = backdropPathUrl;
|
||||
}
|
||||
|
||||
public @NotNull String getBackdropPathUrl() {
|
||||
return backdropPathUrl;
|
||||
public @NotNull List<String> getGenres() {
|
||||
return genres;
|
||||
}
|
||||
|
||||
public void setGenres(@NotNull List<String> genres) {
|
||||
this.genres = genres;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@@ -198,7 +210,6 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
", year=" + year +
|
||||
", nameWithoutBadCharacters='" + nameWithoutBadCharacters + '\'' +
|
||||
", posterUrl='" + posterUrl + '\'' +
|
||||
", backdropPathUrl='" + backdropPathUrl + '\'' +
|
||||
", language='" + language + '\'' +
|
||||
", overview='" + overview + '\'' +
|
||||
", moviesInCollection=" + moviesInCollection +
|
||||
@@ -207,7 +218,9 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
", imdbId='" + imdbId + '\'' +
|
||||
", collectionTitle='" + collectionTitle + '\'' +
|
||||
", collectionId=" + collectionId +
|
||||
", backdropPathUrl='" + backdropPathUrl + '\'' +
|
||||
", tmdbId=" + tmdbId +
|
||||
", genres=" + genres +
|
||||
'}';
|
||||
}
|
||||
|
||||
@@ -268,6 +281,10 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
@JsonProperty
|
||||
private String key;
|
||||
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private List<String> genres;
|
||||
|
||||
@JsonCreator
|
||||
public Builder(@JsonProperty(value = "name") @NotNull String name,
|
||||
@JsonProperty(value = "year") @NotNull Integer year) {
|
||||
@@ -284,10 +301,11 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
this.moviesInCollection = new ArrayList<>();
|
||||
this.ratingKey = -1;
|
||||
this.key = "";
|
||||
this.genres = new ArrayList<>();
|
||||
}
|
||||
|
||||
public @NotNull BasicMovie build() {
|
||||
return new BasicMovie(name, year, posterUrl, backdropPathUrl, collectionTitle, collectionId, tmdbId, imdbId, language, overview, moviesInCollection, ratingKey, key);
|
||||
return new BasicMovie(name, year, posterUrl, backdropPathUrl, collectionTitle, collectionId, tmdbId, imdbId, language, overview, moviesInCollection, ratingKey, key, genres);
|
||||
}
|
||||
|
||||
public @NotNull Builder setPosterUrl(@NotNull String posterUrl) {
|
||||
@@ -344,5 +362,10 @@ public final class BasicMovie implements Comparable<BasicMovie> {
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public @NotNull Builder setGenres(@NotNull List<String> genres) {
|
||||
this.genres = genres;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data
|
||||
|
||||
WORKDIR /usr/app
|
||||
|
||||
COPY GapsWeb/target/GapsWeb-0.9.3.jar /usr/app/gaps.jar
|
||||
COPY GapsWeb/target/GapsWeb-0.9.4.jar /usr/app/gaps.jar
|
||||
|
||||
COPY start.sh /usr/app/
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data
|
||||
|
||||
WORKDIR /usr/app
|
||||
|
||||
COPY GapsWeb/target/GapsWeb-0.9.3.jar /usr/app/gaps.jar
|
||||
COPY GapsWeb/target/GapsWeb-0.9.4.jar /usr/app/gaps.jar
|
||||
|
||||
COPY start.sh /usr/app/
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data
|
||||
|
||||
WORKDIR /usr/app
|
||||
|
||||
COPY GapsWeb/target/GapsWeb-0.9.3.jar /usr/app/gaps.jar
|
||||
COPY GapsWeb/target/GapsWeb-0.9.4.jar /usr/app/gaps.jar
|
||||
|
||||
COPY start.sh /usr/app/
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data
|
||||
|
||||
WORKDIR /usr/app
|
||||
|
||||
COPY GapsWeb/target/GapsWeb-0.9.3.jar /usr/app/gaps.jar
|
||||
COPY GapsWeb/target/GapsWeb-0.9.4.jar /usr/app/gaps.jar
|
||||
|
||||
COPY start.sh /usr/app/
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data
|
||||
|
||||
WORKDIR /usr/app
|
||||
|
||||
COPY GapsWeb/target/GapsWeb-0.9.3.jar /usr/app/gaps.jar
|
||||
COPY GapsWeb/target/GapsWeb-0.9.4.jar /usr/app/gaps.jar
|
||||
|
||||
COPY start.sh /usr/app/
|
||||
|
||||
|
||||
+1
-1
@@ -48,4 +48,4 @@ RMDIR /r $INSTDIR
|
||||
SectionEnd
|
||||
|
||||
# name the installer
|
||||
OutFile "gaps-0.9.3-installer.exe"
|
||||
OutFile "gaps-0.9.4-installer.exe"
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>Gaps</artifactId>
|
||||
<groupId>com.jasonhhouse</groupId>
|
||||
<version>0.9.3</version>
|
||||
<version>0.9.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -36,9 +36,11 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@@ -71,6 +73,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
|
||||
public static final String COLLECTION_ID = "belongs_to_collection";
|
||||
public static final String BACKDROP_PATH = "backdrop_path";
|
||||
public static final String GENRES = "genres";
|
||||
public static final String TITLE = "title";
|
||||
public static final String NAME = "name";
|
||||
public static final String ID = "id";
|
||||
@@ -78,6 +81,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
public static final String PARTS = "parts";
|
||||
public static final String MOVIE_RESULTS = "movie_results";
|
||||
public static final String FINISHED_SEARCHING_URL = "/finishedSearching";
|
||||
private static final String languageCode = "en-US";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GapsSearchService.class);
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@@ -95,8 +99,10 @@ public class GapsSearchService implements GapsSearch {
|
||||
|
||||
private final NotificationService notificationService;
|
||||
|
||||
|
||||
@Autowired
|
||||
public GapsSearchService(@Qualifier("real") UrlGenerator urlGenerator, SimpMessagingTemplate template, FileIoService fileIoService, TmdbService tmdbService, NotificationService notificationService) {
|
||||
public GapsSearchService(@Qualifier("real") UrlGenerator urlGenerator,
|
||||
SimpMessagingTemplate template, FileIoService fileIoService, TmdbService tmdbService, NotificationService notificationService) {
|
||||
this.template = template;
|
||||
this.tmdbService = tmdbService;
|
||||
this.urlGenerator = urlGenerator;
|
||||
@@ -108,7 +114,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(@NotNull String machineIdentifier,@NotNull Integer key) {
|
||||
public void run(@NotNull String machineIdentifier, @NotNull Integer key) {
|
||||
LOGGER.info("run( {}, {} )", machineIdentifier, key);
|
||||
|
||||
PlexProperties plexProperties = fileIoService.readProperties();
|
||||
@@ -228,7 +234,6 @@ public class GapsSearchService implements GapsSearch {
|
||||
}
|
||||
|
||||
for (BasicMovie basicMovie : ownedBasicMovies) {
|
||||
String languageCode = "en-US";
|
||||
|
||||
//Cancel search if needed
|
||||
if (cancelSearch.get()) {
|
||||
@@ -397,6 +402,9 @@ public class GapsSearchService implements GapsSearch {
|
||||
basicMovie.setCollectionTitle(collectionName);
|
||||
basicMovie.setBackdropPathUrl(backdropPath);
|
||||
|
||||
List<String> genres = getGenres(movieDetails);
|
||||
basicMovie.setGenres(genres);
|
||||
|
||||
int indexOfMovie = everyBasicMovie.indexOf(basicMovie);
|
||||
if (indexOfMovie != -1) {
|
||||
LOGGER.info("Merging movie data");
|
||||
@@ -404,6 +412,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
everyBasicMovie.get(indexOfMovie).setCollectionId(basicMovie.getCollectionId());
|
||||
everyBasicMovie.get(indexOfMovie).setCollectionTitle(basicMovie.getCollectionTitle());
|
||||
everyBasicMovie.get(indexOfMovie).setBackdropPathUrl(basicMovie.getBackdropPathUrl());
|
||||
everyBasicMovie.get(indexOfMovie).setGenres(genres);
|
||||
} else {
|
||||
BasicMovie newBasicMovie = new BasicMovie.Builder(basicMovie.getName(), basicMovie.getYear())
|
||||
.setTmdbId(basicMovie.getTmdbId())
|
||||
@@ -411,6 +420,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
.setCollectionTitle(basicMovie.getCollectionTitle())
|
||||
.setCollectionId(basicMovie.getCollectionId())
|
||||
.setBackdropPathUrl(basicMovie.getBackdropPathUrl())
|
||||
.setGenres(basicMovie.getGenres())
|
||||
.build();
|
||||
everyBasicMovie.add(newBasicMovie);
|
||||
}
|
||||
@@ -422,6 +432,19 @@ public class GapsSearchService implements GapsSearch {
|
||||
}
|
||||
}
|
||||
|
||||
private @NotNull List<String> getGenres(@NotNull JsonNode movieDetails) {
|
||||
List<String> genres = new ArrayList<>();
|
||||
|
||||
Iterator<JsonNode> jsonNodeIterator = movieDetails.get(GENRES).elements();
|
||||
|
||||
while (jsonNodeIterator.hasNext()) {
|
||||
JsonNode genre = jsonNodeIterator.next();
|
||||
genres.add(genre.get(NAME).textValue());
|
||||
}
|
||||
|
||||
return genres;
|
||||
}
|
||||
|
||||
private void handleCollection(PlexProperties plexProperties, String machineIdentifier, Integer key, List<BasicMovie> ownedBasicMovies, List<BasicMovie> everyBasicMovie, Set<BasicMovie> recommended, List<BasicMovie> searched,
|
||||
AtomicInteger searchedMovieCount, BasicMovie basicMovie, OkHttpClient client, String languageCode) {
|
||||
LOGGER.debug("handleCollection()");
|
||||
@@ -506,6 +529,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
.setOverview(basicMovie.getOverview())
|
||||
.setPosterUrl(basicMovie.getPosterUrl())
|
||||
.setBackdropPathUrl(basicMovie.getBackdropPathUrl())
|
||||
.setGenres(basicMovie.getGenres())
|
||||
.build();
|
||||
everyBasicMovie.add(newBasicMovie);
|
||||
|
||||
@@ -547,6 +571,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
.setPosterUrl(posterUrl)
|
||||
.setMoviesInCollection(moviesInCollection)
|
||||
.setBackdropPathUrl(basicMovie.getBackdropPathUrl())
|
||||
.setGenres(basicMovie.getGenres())
|
||||
.build();
|
||||
|
||||
if (ownedBasicMovies.contains(basicMovieFromCollection)) {
|
||||
@@ -608,6 +633,8 @@ public class GapsSearchService implements GapsSearch {
|
||||
basicMovieFromCollection.setCollectionTitle(collection.get(NAME).textValue());
|
||||
}
|
||||
|
||||
List<String> genres = getGenres(movieDet);
|
||||
|
||||
// Add movie with imbd_id and other details for RSS to recommended list
|
||||
BasicMovie recommendedBasicMovie = new BasicMovie.Builder(movieDet.get(TITLE).textValue(), year)
|
||||
.setTmdbId(movieDet.get(ID).intValue())
|
||||
@@ -618,6 +645,7 @@ public class GapsSearchService implements GapsSearch {
|
||||
.setBackdropPathUrl("https://image.tmdb.org/t/p/original/" + movieDet.get(COLLECTION_ID).get(BACKDROP_PATH).textValue())
|
||||
.setOverview(movieDet.get("overview").textValue())
|
||||
.setMoviesInCollection(moviesInCollection)
|
||||
.setGenres(genres)
|
||||
.build();
|
||||
|
||||
if (ownedBasicMovies.contains(recommendedBasicMovie)) {
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -268,7 +269,7 @@ public class PlexQueryImpl implements PlexQuery {
|
||||
public void findAllMovieIds(@NotNull List<BasicMovie> basicMovies, @NotNull PlexServer plexServer, @NotNull PlexLibrary plexLibrary) {
|
||||
LOGGER.info("findAllMovieIds( {}, {} )", plexServer, plexLibrary);
|
||||
|
||||
if(plexLibrary.getScanner().equals("Plex Movie Scanner")) {
|
||||
if (plexLibrary.getScanner().equals("Plex Movie Scanner")) {
|
||||
LOGGER.info("PlexLibrary {} uses old scanner", plexLibrary.getTitle());
|
||||
return;
|
||||
}
|
||||
@@ -348,10 +349,10 @@ public class PlexQueryImpl implements PlexQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull PlexServer getPlexServerFromMachineIdentifier(@NotNull PlexProperties plexProperties, @NotNull String machineIdentifier) throws IllegalArgumentException{
|
||||
public @NotNull PlexServer getPlexServerFromMachineIdentifier(@NotNull PlexProperties plexProperties, @NotNull String machineIdentifier) throws IllegalArgumentException {
|
||||
LOGGER.info("generatePlexUrl( {} )", machineIdentifier);
|
||||
for(PlexServer plexServer : plexProperties.getPlexServers()) {
|
||||
if(plexServer.getMachineIdentifier().equals(machineIdentifier)) {
|
||||
for (PlexServer plexServer : plexProperties.getPlexServers()) {
|
||||
if (plexServer.getMachineIdentifier().equals(machineIdentifier)) {
|
||||
return plexServer;
|
||||
}
|
||||
}
|
||||
@@ -360,9 +361,9 @@ public class PlexQueryImpl implements PlexQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull PlexLibrary getPlexLibraryFromKey(@NotNull PlexServer plexServer,@NotNull Integer key) throws IllegalArgumentException {
|
||||
for(PlexLibrary plexLibrary : plexServer.getPlexLibraries()) {
|
||||
if(plexLibrary.getKey().equals(key)) {
|
||||
public @NotNull PlexLibrary getPlexLibraryFromKey(@NotNull PlexServer plexServer, @NotNull Integer key) throws IllegalArgumentException {
|
||||
for (PlexLibrary plexLibrary : plexServer.getPlexLibraries()) {
|
||||
if (plexLibrary.getKey().equals(key)) {
|
||||
return plexLibrary;
|
||||
}
|
||||
}
|
||||
@@ -460,7 +461,17 @@ public class PlexQueryImpl implements PlexQuery {
|
||||
ratingKey = Integer.valueOf(node.getAttributes().getNamedItem("ratingKey").getNodeValue());
|
||||
}
|
||||
|
||||
BasicMovie basicMovie = getOrCreateOwnedMovie(previousMovies, title, year, tmdbId, imdbId, thumbnail, summary, ratingKey, key);
|
||||
List<String> genres = new ArrayList<>();
|
||||
if (node.hasChildNodes()) {
|
||||
for (int j = 0; j < node.getChildNodes().getLength(); j++) {
|
||||
Node childNode = node.getChildNodes().item(j);
|
||||
if (childNode.getNodeName().equalsIgnoreCase("genre")) {
|
||||
genres.add(childNode.getAttributes().getNamedItem("tag").getNodeValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BasicMovie basicMovie = getOrCreateOwnedMovie(previousMovies, title, year, tmdbId, imdbId, thumbnail, summary, ratingKey, key, genres);
|
||||
ownedBasicMovies.add(basicMovie);
|
||||
}
|
||||
LOGGER.info("{} movies found in plex", ownedBasicMovies.size());
|
||||
@@ -483,7 +494,10 @@ public class PlexQueryImpl implements PlexQuery {
|
||||
return ownedBasicMovies;
|
||||
}
|
||||
|
||||
private BasicMovie getOrCreateOwnedMovie(Map<Pair<String, Integer>, BasicMovie> previousMovies, @NotNull String title, int year, @NotNull Integer tmdbId, @NotNull String imdbId, @NotNull String thumbnail, @NotNull String summary, @NotNull Integer ratingKey, @NotNull String key) {
|
||||
private BasicMovie getOrCreateOwnedMovie(Map<Pair<String, Integer>, BasicMovie> previousMovies, @NotNull String title, int year,
|
||||
@NotNull Integer tmdbId, @NotNull String imdbId, @NotNull String thumbnail,
|
||||
@NotNull String summary, @NotNull Integer ratingKey, @NotNull String key,
|
||||
@NotNull List<String> genres) {
|
||||
Pair<String, Integer> moviePair = new Pair<>(title, year);
|
||||
if (previousMovies.containsKey(moviePair)) {
|
||||
BasicMovie previousBasicMovie = previousMovies.get(moviePair);
|
||||
@@ -497,6 +511,7 @@ public class PlexQueryImpl implements PlexQuery {
|
||||
.setLanguage(previousBasicMovie.getLanguage())
|
||||
.setTmdbId(previousBasicMovie.getTmdbId())
|
||||
.setCollectionId(previousBasicMovie.getCollectionId())
|
||||
.setGenres(genres)
|
||||
.build();
|
||||
} else {
|
||||
return new BasicMovie.Builder(title, year)
|
||||
@@ -506,6 +521,7 @@ public class PlexQueryImpl implements PlexQuery {
|
||||
.setRatingKey(ratingKey)
|
||||
.setTmdbId(tmdbId)
|
||||
.setImdbId(imdbId)
|
||||
.setGenres(genres)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,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.9.3
|
||||
version: 0.9.4
|
||||
storageFolder: /usr/data
|
||||
properties:
|
||||
rssFeed: rssFeed.json
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<img loading="lazy" th:src="@{/images/final-2.svg}" alt="Gaps Logo" style="width:50%;height:50%;" class="center">
|
||||
|
||||
<h3 class="top-margin">About</h3>
|
||||
<h4 class="top-margin text-primary">v0.9.3</h4>
|
||||
<h4 class="top-margin text-primary">v0.9.4</h4>
|
||||
|
||||
<p class="text-muted">Gaps searches through your Plex Server. It then queries
|
||||
for known
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="container bottom-margin">
|
||||
<img loading="lazy" th:src="@{/images/final-2.svg}" alt="Gaps Logo" style="width:50%;height:50%;" class="center">
|
||||
|
||||
<h3 class="top-margin">v0.9.3</h3>
|
||||
<h3 class="top-margin">v0.9.4</h3>
|
||||
|
||||
<p class="text-muted">Gaps searches through your Plex Server. It then queries
|
||||
for known
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="card">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-12 col-md-auto">
|
||||
<img loading="lazy" data-cy="{{imdbId}}" style="height: auto; width: 225px; display: block;"
|
||||
<img loading="lazy" style="height: auto; width: 225px; display: block;"
|
||||
src="http://{{address}}:{{port}}{{posterUrl}}/?X-Plex-Token={{plexToken}}"
|
||||
class="card-img" alt="Plex Poster">
|
||||
</div>
|
||||
@@ -122,7 +122,9 @@
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{name}} ({{year}})</h5>
|
||||
<p class="card-text text-muted">{{overview}}</p>
|
||||
<p class="card-text"><small class="text-info">English</small></p>
|
||||
{{#each genres}}
|
||||
<div data-cy="{{this.tmdbId}}{{this}}" class="card-text">{{this}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -123,12 +123,13 @@
|
||||
<script id="movieCard" type="text/x-handlebars-template">
|
||||
<div class="card">
|
||||
<img loading="lazy" style="height: 450px;width: auto;display: block;filter: brightness(0.20);"
|
||||
data-cy="backdropPath-{{imdbId}}"
|
||||
src="{{backdropPathUrl}}" class="card-img" alt="Backdrop Poster">
|
||||
<div class="card-img-overlay">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-12 col-md-auto">
|
||||
<img loading="lazy" style="height: auto; width: 225px; display: block;"
|
||||
data-cy="{{imdbId}}"
|
||||
data-cy="posterUrl-{{imdbId}}"
|
||||
src="{{posterUrl}}"
|
||||
class="card-img" alt="Plex Poster">
|
||||
</div>
|
||||
@@ -137,7 +138,11 @@
|
||||
<h5 class="card-title">{{name}} ({{year}})</h5>
|
||||
<h6 class="card-title">{{collectionTitle}}</h6>
|
||||
<p class="card-text">{{overview}}</p>
|
||||
<p class="card-text"><small class="text-info">English</small></p>
|
||||
<div>
|
||||
{{#each genres}}
|
||||
<div data-cy="{{this.tmdbId}}{{this}}" class="card-text">{{this}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,17 +153,10 @@
|
||||
<div class="list-group">
|
||||
{{#each moviesInCollection}}
|
||||
{{#if this.owned}}
|
||||
{{#if (isEqual this.tmdbId @root.tmdbId)}}
|
||||
<a data-cy="{{@root.imdbId}}-{{this.tmdbId}}"
|
||||
href="https://www.themoviedb.org/movie/{{this.tmdbId}}" target="_blank"
|
||||
class="list-group-item list-group-item-action active"
|
||||
rel="noopener noreferrer">{{this.title}}</a>
|
||||
{{else}}
|
||||
<a data-cy="{{@root.imdbId}}-{{this.tmdbId}}"
|
||||
href="https://www.themoviedb.org/movie/{{this.tmdbId}}" target="_blank"
|
||||
class="list-group-item list-group-item-action"
|
||||
rel="noopener noreferrer">{{this.title}}</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
<img loading="lazy" th:src="@{/images/final-2.svg}" alt="Gaps Logo" style="width:50%;height:50%;" class="center">
|
||||
|
||||
<h3 class="top-margin">Updates</h3>
|
||||
<h4 class="top-margin text-primary">v0.9.4</h4>
|
||||
<ul class="text-muted">
|
||||
<li>Adding genres to owned and recommended movies</li>
|
||||
</ul>
|
||||
|
||||
<h4 class="top-margin text-primary">v0.9.3</h4>
|
||||
<ul class="text-muted">
|
||||
<li>Improved UI for recommended movies</li>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>Gaps</artifactId>
|
||||
<groupId>com.jasonhhouse</groupId>
|
||||
<version>0.9.3</version>
|
||||
<version>0.9.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>Gaps</artifactId>
|
||||
<groupId>com.jasonhhouse</groupId>
|
||||
<version>0.9.3</version>
|
||||
<version>0.9.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -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.9.3
|
||||
version: 0.9.4
|
||||
storageFolder: /{CUSTOM_FOLDER} #Change to folder that gaps has permission to read, write, and delete in.
|
||||
properties:
|
||||
rssFeed: rssFeed.json
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
##
|
||||
|
||||
set -e
|
||||
VERSION=0.9.3
|
||||
VERSION=0.9.4
|
||||
JAR_VERSION="GapsWeb/target/GapsWeb-$VERSION.jar"
|
||||
ZIP_VERSION="GapsAsJar-$VERSION.zip"
|
||||
npm ci
|
||||
|
||||
@@ -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.9.3.jar GapsOnWindows\gaps.jar
|
||||
copy GapsWeb\target\GapsWeb-0.9.4.jar GapsOnWindows\gaps.jar
|
||||
copy README.md GapsOnWindows\
|
||||
cd GapsOnWindows
|
||||
makensis gaps.nsi
|
||||
@@ -21,7 +21,7 @@ describe('Verify About Page', () => {
|
||||
.should('have.text', 'About');
|
||||
|
||||
cy.get('.container > :nth-child(3)')
|
||||
.should('have.text', 'v0.9.3');
|
||||
.should('have.text', 'v0.9.4');
|
||||
|
||||
cy.get('.container > :nth-child(6)')
|
||||
.should('have.text', 'Software');
|
||||
|
||||
@@ -35,6 +35,12 @@ describe('Find owned movies', () => {
|
||||
.clear()
|
||||
.type('Saw');
|
||||
|
||||
cy.get('[data-cy=Horror]')
|
||||
.should('have.text', 'Horror');
|
||||
|
||||
cy.get('[data-cy=Crime]')
|
||||
.should('have.text', 'Crime');
|
||||
|
||||
cy.get('#movies_info')
|
||||
.should('have.text', 'Showing 1 to 1 of 1 entries');
|
||||
});
|
||||
@@ -58,6 +64,12 @@ describe('Find owned movies', () => {
|
||||
.clear()
|
||||
.type('Saw');
|
||||
|
||||
cy.get('[data-cy=Horror]')
|
||||
.should('have.text', 'Horror');
|
||||
|
||||
cy.get('[data-cy=Crime]')
|
||||
.should('have.text', 'Crime');
|
||||
|
||||
cy.get('#movies_info')
|
||||
.should('have.text', 'Showing 1 to 1 of 1 entries');
|
||||
|
||||
@@ -82,6 +94,12 @@ describe('Find owned movies', () => {
|
||||
.clear()
|
||||
.type('Saw');
|
||||
|
||||
cy.get('[data-cy=Horror]')
|
||||
.should('have.text', 'Horror');
|
||||
|
||||
cy.get('[data-cy=Crime]')
|
||||
.should('have.text', 'Crime');
|
||||
|
||||
cy.get('#movies_info')
|
||||
.should('have.text', 'Showing 1 to 1 of 1 entries');
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* global cy, describe, it, beforeEach */
|
||||
/* global cy, describe, expect, it, beforeEach */
|
||||
/* eslint no-undef: "error" */
|
||||
|
||||
import {
|
||||
@@ -31,6 +31,12 @@ function searchSawLibrary(cy) {
|
||||
.clear()
|
||||
.type('Saw');
|
||||
|
||||
cy.get('[data-cy=Horror]')
|
||||
.should('have.text', 'Horror');
|
||||
|
||||
cy.get('[data-cy=Crime]')
|
||||
.should('have.text', 'Crime');
|
||||
|
||||
cy.get('#movies_info')
|
||||
.should('have.text', 'Showing 1 to 1 of 1 entries');
|
||||
|
||||
@@ -71,6 +77,20 @@ describe('Search for Recommended', () => {
|
||||
cy.get('[data-cy=searchForMovies]')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="backdropPath-tt0432348"]')
|
||||
.should('be.visible')
|
||||
.and(($img) => {
|
||||
// "naturalWidth" and "naturalHeight" are set when the image loads
|
||||
expect($img[0].naturalWidth).to.be.greaterThan(0);
|
||||
});
|
||||
|
||||
cy.get('[data-cy=posterUrl-tt0432348]')
|
||||
.should('be.visible')
|
||||
.and(($img) => {
|
||||
// "naturalWidth" and "naturalHeight" are set when the image loads
|
||||
expect($img[0].naturalWidth).to.be.greaterThan(0);
|
||||
});
|
||||
|
||||
cy.scrollTo(0, 1000);
|
||||
|
||||
cy.get('#movies_info', { timeout: 5000 })
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gaps",
|
||||
"version": "0.9.3",
|
||||
"version": "0.9.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gaps",
|
||||
"version": "0.9.3",
|
||||
"version": "0.9.4",
|
||||
"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": {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</parent>
|
||||
<groupId>com.jasonhhouse</groupId>
|
||||
<artifactId>Gaps</artifactId>
|
||||
<version>0.9.3</version>
|
||||
<version>0.9.4</version>
|
||||
<name>Gaps</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<apache.commons.lang3>3.9</apache.commons.lang3>
|
||||
<apache.commons.text>1.9</apache.commons.text>
|
||||
<commons.io>2.8.0</commons.io>
|
||||
<gaps.version>0.9.3</gaps.version>
|
||||
<gaps.version>0.9.4</gaps.version>
|
||||
<google.findbugs>3.0.0</google.findbugs>
|
||||
<guava>30.1-jre</guava>
|
||||
<hibernate.core>5.2.12.Final</hibernate.core>
|
||||
|
||||
Reference in New Issue
Block a user