Loads and parses film and series data from external sources or local files.
Provides functions to fetch, validate, and structure media datasets.
- Source:
Methods
(async, inner) loadData() → {Promise.<void>}
Asynchronously loads film and series data from external JSON files.
Fetches `films_data.json` and `series_data.json` from the `data` directory,
parses their contents, and assigns them to the global variables `filmsData`
and `seriesData`. Logs a success message upon completion. If an error occurs
during fetching or parsing, logs the error and displays a user-friendly
message using `showNoResults`.
- Source:
Returns:
Resolves when data is loaded or an error is handled.
- Type
- Promise.<void>