Global

Methods

(async) loadMedia(folder) → {int}

Load the images and videos for a given album and return the total count of media in that folder.

Once the media is loaded, it is cached within the Album class so it doesn't need to be fetched from the database again. The total count of media also includes subfolder. Gets called recursively.

Parameters:
Name Type Description
folder Folder

The folder to load the media for.

Source:
Returns:

The total count of media in that folder (including subfolders).

Type
int

(async) mkdirIfNotExists(path)

Create a directory if it doesn't exist yet.

Parameters:
Name Type Description
path string

The path to the folder to create.

Source:

(async) processMedia(folder, options)

Process the images and videos for a given album and return the total count of media in that folder.

If specified at launch, this will generate the thumbnails for the images.

Parameters:
Name Type Description
folder Folder

The folder to process the media from.

options Object

Options for processing.

Properties
Name Type Description
thumbnails Bool

Wether to generate thumbnails or not.

albumsDir string

The directory to put the album JSON files into.

thumbnailsDir string

The directory to put the thumbnails into.

Source: