Skip to content

Commit 6d53a4d

Browse files
committed
1.8.1: added ON_DEMAND capabilities flag for one time execution
1 parent c35504f commit 6d53a4d

9 files changed

Lines changed: 28 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.8.1
2+
- `ON_DEMAND` capability flag supplied to bypass hourly scheduling for on-demand runs
3+
This update is not interesting for docker/gui/script users interested in scheduled execution.
4+
15
## 1.8.0
26
- Support for Plex v1.40.0.7775+ key:value format in extra data
37
- Older version of extra data for versions < v1.40.0.7775 is still supported

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ Flag | Description
220220
`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
221221
`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.
222222
`PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS`|Prints out the SQLite binary execute statements for diagnostic purposes
223+
`ON_DEMAND`|Quit after running once, ignoring the (n) hour scheduling
223224

224225
Multiple flags can be supplied as a semicolon separated string.
225226

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.0
1+
1.8.1

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'com.github.spotbugs' version '2.0.1'
66
}
77

8-
version = '1.8.0'
8+
version = '1.8.1'
99
sourceCompatibility = '11'
1010

1111
new File(projectDir, "VERSION").text = version;

src/main/java/updatetool/common/Capabilities.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ public enum Capabilities {
1313
IGNORE_SCRAPER_NO_RESULT_LOG,
1414
IGNORE_NO_MATCHING_RESOLVER_LOG,
1515
DISABLE_SCREEN_SCRAPE,
16-
PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS;
16+
PRINT_SQLITE_BINARY_EXECUTE_STATEMENTS,
17+
ON_DEMAND
18+
;
1719

18-
private static final List<Capabilities> 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);
20+
private static final List<Capabilities> 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);
1921

2022
public static List<Capabilities> getUserFlags() {
2123
return USER_FLAGS;

src/main/java/updatetool/imdb/ImdbDockerImplementation.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,13 @@ public void run() {
320320
Logger.error("The application will terminate now.");
321321
System.exit(-1);
322322
}
323+
324+
if(checkCapability(Capabilities.ON_DEMAND)) {
325+
Logger.info("ON_DEMAND configured. Exiting after running once now!");
326+
System.exit(0);
327+
}
328+
323329
}
324-
325330
}
326331

327332
@Override
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package updatetool.imdb;
2+
3+
public class ImdbOnDemandImplementation extends ImdbDockerImplementation {
4+
5+
public ImdbOnDemandImplementation(String id, String desc, String usage, String help) {
6+
super(id, desc, usage, help);
7+
}
8+
9+
}

src/main/resources/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.0
1+
1.8.1

src/main/resources/desc/imdb-docker.ez

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ meta {
3232
| (Optional) DISABLE_SCREEN_SCRAPE: Disables the screen scraping unit (extracts IMDB ratings from the website if not in dataset)
3333
| in case that there are issues with the IMDB web page such as 503 errors and timeouts that cause unsuccessful results and
3434
| slow down the metadata lookup process immensely.
35+
| (Optional) ON_DEMAND: Exit after running one time; ignoring the schedule every n hour(s) behavior.
3536
|
3637
| Parameters:
3738
| - schedule = if present will schedule this task every n hour(s) : must be > 0 : default 12

0 commit comments

Comments
 (0)