mirror of
https://github.com/JasonHHouse/gaps.git
synced 2026-02-11 21:28:37 -06:00
Adding to the thymeleaf support
This commit is contained in:
50
Core/src/main/java/com/jasonhhouse/gaps/PlexSearch.java
Normal file
50
Core/src/main/java/com/jasonhhouse/gaps/PlexSearch.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.jasonhhouse.gaps;
|
||||
|
||||
public class PlexSearch {
|
||||
private String movieDbApiKey;
|
||||
private String plexToken;
|
||||
private String address;
|
||||
private String port;
|
||||
|
||||
public String getMovieDbApiKey() {
|
||||
return movieDbApiKey;
|
||||
}
|
||||
|
||||
public void setMovieDbApiKey(String movieDbApiKey) {
|
||||
this.movieDbApiKey = movieDbApiKey;
|
||||
}
|
||||
|
||||
public String getPlexToken() {
|
||||
return plexToken;
|
||||
}
|
||||
|
||||
public void setPlexToken(String plexToken) {
|
||||
this.plexToken = plexToken;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(String port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PlexSearch{" +
|
||||
"movieDbApiKey='" + movieDbApiKey + '\'' +
|
||||
", plexToken='" + plexToken + '\'' +
|
||||
", address='" + address + '\'' +
|
||||
", port='" + port + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jasonhhouse.gaps.controller;
|
||||
|
||||
import com.jasonhhouse.gaps.PlexSearch;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.MediaType;
|
||||
@@ -17,9 +18,14 @@ public class PlexConfigurationController {
|
||||
@RequestMapping(method = RequestMethod.POST,
|
||||
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
|
||||
produces = MediaType.TEXT_HTML_VALUE)
|
||||
public ModelAndView postPlexConfiguration(String movie_db_api_key) {
|
||||
logger.info("postPlexConfiguration( " + movie_db_api_key + " )");
|
||||
return new ModelAndView("plexConfiguration");
|
||||
public ModelAndView postPlexConfiguration(String movieDbApiKey) {
|
||||
logger.info("postPlexConfiguration( " + movieDbApiKey + " )");
|
||||
|
||||
PlexSearch plexSearch = new PlexSearch();
|
||||
plexSearch.setMovieDbApiKey(movieDbApiKey);
|
||||
ModelAndView modelAndView = new ModelAndView("plexConfiguration");
|
||||
modelAndView.addObject("plexSearch", plexSearch);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET,
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
|
||||
<form class="needs-validation" action="/plexConfiguration" novalidate>
|
||||
<div class="form-group">
|
||||
<label for="movie_db_api_key">Movie Database Api Key</label>
|
||||
<input type="text" class="form-control" id="movie_db_api_key" required>
|
||||
<label for="movieDbApiKey">Movie Database Api Key</label>
|
||||
<input type="text" class="form-control" id="movieDbApiKey" required>
|
||||
</div>
|
||||
|
||||
<button id="folder" class="btn btn-secondary" disabled>Folder</button>
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="plex_token">Plex Token</label>
|
||||
<input type="text" class="form-control" id="plex_token" required aria-describedby="tokenHelp">
|
||||
<label for="plexToken">Plex Token</label>
|
||||
<input type="text" class="form-control" id="plexToken" required aria-describedby="tokenHelp">
|
||||
<small id="tokenHelp" class="form-text text-muted">If you do not know already it's easy to find. Plex has
|
||||
a great write up
|
||||
<a href="https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/">here</a>
|
||||
|
||||
Reference in New Issue
Block a user