Defauling --actors-update to 1900-01-01

This commit is contained in:
DebaucheryLibrarian 2020-08-12 21:00:50 +02:00
parent 1d3b9a19bc
commit d14034d38b
2 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,7 @@ To generate the thumbnails for logos and tag photos, run:
* `--actors "[name]" "[name]"`: Fetch actor profiles. When no names are specified, actors without existing profiles are scraped
* `--actors-file [filepath]`: Fetch all scenes for the actors specified in a file using a newline delimiter.
* `--actors-sources [slug] [slug]`: Scrapers to use for actor profiles. Defaults to config.
* `--actors-update [time]`: Update actors that don't have any profiles newer than period ("1 month") or date (2020-08-01).
* `--actors-update [time]`: Update actors that don't have any profiles newer than period ("1 month") or date (2020-08-01). Using this argument without a value will default to 1900-01-01, practically updating all actors.
* `--actors-scenes`: Fetch all scenes for scraped actors. Use with caution, as an actor may have many scenes.
* `--scene-actors`: Fetch profiles for actors associated with scraped scenes. Use with caution, as scenes may have many actors, each with many profiles.

View File

@ -5,6 +5,10 @@ const yargs = require('yargs');
const moment = require('moment');
function interpretAfter(after) {
if (!after) {
return new Date(0, 0, 0);
}
if (/\d{2,4}-\d{2}-\d{2,4}/.test(after)) {
// using date
return moment