Add movies & TV tracker: movies schema, Netflix/Letterboxd/Plex/JSON/recs importers, TMDB matching, stats, owner visibility
This commit is contained in:
1 parent
75571bbfe0
commit
71e015d1d0
28 files changed
+42754
-14
No files matched your search
+17
-3
@@ -351,6 +351,13 @@ const allTrackers: readonly (Tracker & { private: boolean })[] = [
|
||||
external: false,
|
||||
private: false
|
||||
},
|
||||
{
|
||||
name: 'movies',
|
||||
subtitle: 'movies and TV shows we watch: Netflix, Plex and cinema, ratings and stats',
|
||||
href: '/trackers/movies',
|
||||
external: false,
|
||||
private: false
|
||||
},
|
||||
{
|
||||
name: 'pc',
|
||||
subtitle: 'my PC setup: every part, my devices, the next build and mouse sensitivities',
|
||||
@@ -447,12 +454,19 @@ export const privateTrackers: readonly Tracker[] = allTrackers.filter((t) => t.p
|
||||
const ownerTrackers: readonly Tracker[] = allTrackers.map(strip);
|
||||
|
||||
/** Trackers for the header, home, /trackers, /start and error pages; with `inactiveGames` (root
|
||||
* layout data) the games group lists active games first and flags the rest `inactive`. */
|
||||
* layout data) the games group lists active games first and flags the rest `inactive`.
|
||||
* `hidden` (root layout `hiddenTrackers`, e.g. movies when its owner switch is private) drops
|
||||
* those trackers for everyone else and gives them a lock for the owner. */
|
||||
export function visibleTrackers(
|
||||
isOwner: boolean,
|
||||
inactiveGames: readonly string[] = []
|
||||
inactiveGames: readonly string[] = [],
|
||||
hidden: readonly string[] = []
|
||||
): readonly Tracker[] {
|
||||
const list = isOwner ? ownerTrackers : trackers;
|
||||
let list = isOwner ? ownerTrackers : trackers;
|
||||
if (hidden.length)
|
||||
list = isOwner
|
||||
? list.map((t) => (hidden.includes(t.name) ? { ...t, locked: true } : t))
|
||||
: list.filter((t) => !hidden.includes(t.name));
|
||||
if (!inactiveGames.length) return list;
|
||||
const games = sortedGames(inactiveGames);
|
||||
return list.map((t) => (t.children === gameTrackers ? { ...t, children: games } : t));
|
||||
|
||||
Reference in new issue
Block a user