en | fr

The Tagging class


Wrapper around our tagging library.


define

Defines the tag of a given media or file location.

If an instance of Media is given, its id is taken to update the audio tags on the file system and its properties are properly update.

If a file location is given, the tags are properly updated on the file system.

Parameters

Returns null


extract

Extracts the audio tags of all files contained inside a given folder location and cache them on the file system to make reading a folder faster it has already been processed once.

Parameters

Returns Promise


loadLibrary

Loads the library files (i.e. the hash and the files array). It relies on the file_names and library_file getters to determine which files should be read.

Returns Promise


hash

Returns a SHA-1 version of the user’s music folder path.

This is handy as it always generate the same output with the same string and we don’t have to handle OS specific disparities (like slash on *nix and and back-slash on Windows).

Returns String


library_file

Returns the absolute path to the JSON file containing the already-computed music library.

Returns String


file_names

Returns the absolute path to the JSON file containing the already-computed music files.

Returns String