diff --git a/CHANGELOG.md b/CHANGELOG.md index 21567e6..f679e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.8.1 +- `ON_DEMAND` capability flag supplied to bypass hourly scheduling for on-demand runs +This update is not interesting for docker/gui/script users interested in scheduled execution. + ## 1.8.0 - Support for Plex v1.40.0.7775+ key:value format in extra data - Older version of extra data for versions < v1.40.0.7775 is still supported diff --git a/README.md b/README.md index 1a079b4..b8c73e0 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,7 @@ Flag | Description `IGNORE_SCRAPER_NO_RESULT_LOG`|Supresses printing web scraper no-match results that either have no rating on the IMDB website or are not allowed to be rated by anyone on the IMDB website and thus will never have ratings `DISABLE_SCREEN_SCRAPE`|Disables the screen scraping unit (extracts IMDB ratings from the website if not in dataset) in case that there are issues with the IMDB web page such as 503 errors and timeouts that cause unsuccessful results and slow down the metadata lookup process immensely. `PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS`|Prints out the SQLite binary execute statements for diagnostic purposes +`ON_DEMAND`|Quit after running once, ignoring the (n) hour scheduling Multiple flags can be supplied as a semicolon separated string. diff --git a/VERSION b/VERSION index afa2b35..b9268da 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.0 \ No newline at end of file +1.8.1 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 8a4271b..5990690 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'com.github.spotbugs' version '2.0.1' } -version = '1.8.0' +version = '1.8.1' sourceCompatibility = '11' new File(projectDir, "VERSION").text = version; diff --git a/src/main/java/updatetool/common/Capabilities.java b/src/main/java/updatetool/common/Capabilities.java index a6dd626..61ba138 100644 --- a/src/main/java/updatetool/common/Capabilities.java +++ b/src/main/java/updatetool/common/Capabilities.java @@ -13,9 +13,11 @@ public enum Capabilities { IGNORE_SCRAPER_NO_RESULT_LOG, IGNORE_NO_MATCHING_RESOLVER_LOG, DISABLE_SCREEN_SCRAPE, - PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS; + PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS, + ON_DEMAND + ; - private static final List USER_FLAGS = List.of(NO_MOVIE, NO_TV, DONT_THROW_ON_ENCODING_ERROR, IGNORE_NO_MATCHING_RESOLVER_LOG, IGNORE_SCRAPER_NO_RESULT_LOG, DISABLE_SCREEN_SCRAPE, PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS); + private static final List USER_FLAGS = List.of(NO_MOVIE, NO_TV, DONT_THROW_ON_ENCODING_ERROR, IGNORE_NO_MATCHING_RESOLVER_LOG, IGNORE_SCRAPER_NO_RESULT_LOG, DISABLE_SCREEN_SCRAPE, PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS, ON_DEMAND); public static List getUserFlags() { return USER_FLAGS; diff --git a/src/main/java/updatetool/imdb/ImdbDockerImplementation.java b/src/main/java/updatetool/imdb/ImdbDockerImplementation.java index 4e0ecef..8062fd1 100644 --- a/src/main/java/updatetool/imdb/ImdbDockerImplementation.java +++ b/src/main/java/updatetool/imdb/ImdbDockerImplementation.java @@ -320,8 +320,13 @@ public void run() { Logger.error("The application will terminate now."); System.exit(-1); } + + if(checkCapability(Capabilities.ON_DEMAND)) { + Logger.info("ON_DEMAND configured. Exiting after running once now!"); + System.exit(0); + } + } - } @Override diff --git a/src/main/java/updatetool/imdb/ImdbOnDemandImplementation.java b/src/main/java/updatetool/imdb/ImdbOnDemandImplementation.java new file mode 100644 index 0000000..c7d5754 --- /dev/null +++ b/src/main/java/updatetool/imdb/ImdbOnDemandImplementation.java @@ -0,0 +1,9 @@ +package updatetool.imdb; + +public class ImdbOnDemandImplementation extends ImdbDockerImplementation { + + public ImdbOnDemandImplementation(String id, String desc, String usage, String help) { + super(id, desc, usage, help); + } + +} diff --git a/src/main/resources/VERSION b/src/main/resources/VERSION index afa2b35..b9268da 100644 --- a/src/main/resources/VERSION +++ b/src/main/resources/VERSION @@ -1 +1 @@ -1.8.0 \ No newline at end of file +1.8.1 \ No newline at end of file diff --git a/src/main/resources/desc/imdb-docker.ez b/src/main/resources/desc/imdb-docker.ez index 180c016..2665ac9 100644 --- a/src/main/resources/desc/imdb-docker.ez +++ b/src/main/resources/desc/imdb-docker.ez @@ -32,6 +32,7 @@ meta { | (Optional) DISABLE_SCREEN_SCRAPE: Disables the screen scraping unit (extracts IMDB ratings from the website if not in dataset) | in case that there are issues with the IMDB web page such as 503 errors and timeouts that cause unsuccessful results and | slow down the metadata lookup process immensely. + | (Optional) ON_DEMAND: Exit after running one time; ignoring the schedule every n hour(s) behavior. | | Parameters: | - schedule = if present will schedule this task every n hour(s) : must be > 0 : default 12