Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,21 +258,23 @@ If there are no errors, the database has been repaired successfully. And you can

# Which Providers id `GUIDs` supported by for PlexClient?

* tvdb://(id) `New plex agent`
* imdb://(id) `New plex agent`
* tmdb://(id) `New plex agent`
* com.plexapp.agents.imdb://(id)?lang=en `(Legacy plex agent)`
* com.plexapp.agents.tmdb://(id)?lang=en `(Legacy plex agent)`
* com.plexapp.agents.themoviedb://(id)?lang=en `(Legacy plex agent)`
* com.plexapp.agents.thetvdb://(seriesId)?lang=en `(Legacy plex agent)`
* com.plexapp.agents.xbmcnfo://(id)?lang=en `(XBMC NFO Movies agent)`
* com.plexapp.agents.xbmcnfotv://(id)?lang=en `(XBMC NFO TV agent)`
* tvdb://(id)
* imdb://(id)
* tmdb://(id)
* tv.plex.agents.nfo.movie://movie/(provider)_(id) `Where the provider one of supported providers`
* tv.plex.agents.nfo.series://(show|episode)/(provider)_(id) `Where the provider one of supported providers`

## Legacy Plex Agents

* com.plexapp.agents.imdb://(id)?lang=en
* com.plexapp.agents.tmdb://(id)?lang=en
* com.plexapp.agents.themoviedb://(id)?lang=en
* com.plexapp.agents.thetvdb://(seriesId)?lang=en
* com.plexapp.agents.xbmcnfo://(id)?lang=en `(XBMC NFO Movies agent) -> imdb|tmdb://(movieId)?lang=en`
* com.plexapp.agents.xbmcnfotv://(id)?lang=en `(XBMC NFO TV agent) -> tvdb://(serisId)?lang=en`
* com.plexapp.agents.hama://(db)\d?-(id)?lang=en `(HAMA multi source db agent mainly for anime)`
* com.plexapp.agents.ytinforeader://(id)
?lang=en [ytinforeader.bundle](https://github.com/arabcoders/plex-ytdlp-info-reader-agent)
With [jp_scanner.py](https://github.com/arabcoders/plex-daily-scanner) as scanner.
* com.plexapp.agents.cmdb://(id)
?lang=en [cmdb.bundle](https://github.com/arabcoders/cmdb.bundle) `(User custom metadata database)`.
* com.plexapp.agents.ytinforeader://(id)?lang=en [ytinforeader.bundle](https://github.com/arabcoders/plex-ytdlp-info-reader-agent) With [jp_scanner.py](https://github.com/arabcoders/plex-daily-scanner) as scanner.
* com.plexapp.agents.cmdb://(id)?lang=en [cmdb.bundle](https://github.com/arabcoders/cmdb.bundle) `(User custom metadata database)`.

---

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
],
"lint": "vendor/bin/mago lint",
"frontend:update": "bun --cwd=./frontend/ update --latest",
"frontend:format": "bun --cwd=./frontend/ format",
"frontend:gen": "bun --cwd=./frontend/ generate",
"frontend:dev": "bun --cwd=./frontend/ dev",
"frontend:tc": "bun --cwd=./frontend/ typecheck",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 46 additions & 10 deletions frontend/app/components/EventView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,37 @@
<div v-if="toggleLogs" class="relative">
<code
class="ws-terminal ws-terminal-panel ws-terminal-panel-lg"
:class="wrapLines ? 'whitespace-pre-wrap' : 'whitespace-pre'"
:class="wrapLines ? 'ws-wrap-anywhere whitespace-pre-wrap' : 'whitespace-pre'"
>
<span
v-for="(logLine, index) in filteredRows"
:key="`log_line-${index}`"
class="block pt-1"
v-text="logLine"
/>
:key="`${logLine.id}-${index}`"
class="block"
><span
v-if="logLine?.date || logLine?.item_id"
class="mr-[1ch] inline-flex items-baseline whitespace-normal"
>
<template v-if="logLine?.date"
>[<UTooltip :text="`${moment(logLine.date).format(TOOLTIP_DATE_FORMAT)}`">
<span class="cursor-help">{{
moment(logLine.date).format('HH:mm:ss')
}}</span> </UTooltip
>]</template
>
<button
v-if="logLine?.item_id"
type="button"
:class="[
'cursor-pointer font-[inherit] leading-[inherit] text-primary underline-offset-2 hover:underline',
logLine?.date ? 'ml-[1ch]' : '',
]"
@click="goto_history_item(logLine)"
>
View
</button>
</span>
<span>{{ String(logLine.text).trim() }}</span>
</span>
</code>
<UTooltip text="Copy logs">
<UButton
Expand All @@ -226,7 +249,9 @@
size="sm"
icon="i-lucide-copy"
class="absolute right-3 top-3"
@click="() => copyText(filteredRows.join('\n'))"
@click="
() => copyText(filteredRows.map((logLine) => formatLogLine(logLine)).join('\n'))
"
/>
</UTooltip>
</div>
Expand Down Expand Up @@ -280,10 +305,11 @@ import { createError, useHead } from '#app';
import moment from 'moment';
import { useStorage } from '@vueuse/core';
import { useDialog } from '~/composables/useDialog';
import type { EventsItem, GenericError } from '~/types';
import type { EventsItem, GenericError, LogEntry } from '~/types';
import {
copyText,
getEventStatusClass,
goto_history_item,
makeEventName,
notification,
parse_api_response,
Expand Down Expand Up @@ -320,14 +346,24 @@ watch(toggleFilter, () => {
}
});

const filteredRows = computed<Array<string>>(() => {
const filteredRows = computed<Array<LogEntry>>(() => {
const rows = item.value.logs ?? [];

if (!query.value) {
return item.value.logs ?? [];
return rows;
}

return item.value.logs?.filter((m) => m.toLowerCase().includes(query.value.toLowerCase())) ?? [];
const queryValue = query.value.toLowerCase();

return rows.filter((logLine) => logLine.text.toLowerCase().includes(queryValue));
});

const formatLogLine = (logLine: LogEntry): string => {
const prefix = logLine.date ? `[${logLine.date}] ` : '';

return `${prefix}${String(logLine.text).trim()}`;
};

const getEventStatusColor = (status: number) => {
const value = getEventStatusClass(status);

Expand Down
27 changes: 25 additions & 2 deletions frontend/app/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ type NavEntry = {
label: string;
icon: string;
matchPath?: string;
exactMatch?: boolean;
excludeMatchPaths?: Array<string>;
to?: string;
href?: string;
target?: string;
Expand Down Expand Up @@ -531,6 +533,25 @@ const isPathActive = (matchPath?: string) => {
return current === target || current.startsWith(`${target}/`);
};

const isNavigationEntryActive = (entry: NavEntry) => {
if (!entry.matchPath) {
return false;
}

const current = normalizePath(route.path);
const target = normalizePath(entry.matchPath);

if (entry.excludeMatchPaths?.some((path) => isPathActive(path))) {
return false;
}

if (true === entry.exactMatch) {
return current === target;
}

return isPathActive(entry.matchPath);
};

const topLevelNavigationEntries = computed(() =>
getTopLevelNavigationEntries({
apiUser: apiUser.value,
Expand All @@ -547,6 +568,8 @@ const topLevelNavEntries = computed<Array<NavEntry>>(() =>
href: entry.href,
target: entry.target,
matchPath: entry.matchPath,
exactMatch: entry.exactMatch,
excludeMatchPaths: entry.excludeMatchPaths,
onSelect:
'history' === entry.id
? () => dEvent('history_main_link_clicked', { clear: true })
Expand Down Expand Up @@ -579,7 +602,7 @@ const makeNavigationItem = (entry: NavEntry) => ({
to: entry.to,
href: entry.href,
target: entry.target,
active: isPathActive(entry.matchPath),
active: isNavigationEntryActive(entry),
onSelect: entry.onSelect,
});

Expand Down Expand Up @@ -693,7 +716,7 @@ const routeSearchGroups = computed<Array<SearchGroup>>(() => {

const pageTitle = computed(() => {
const match = allNavEntries.value
.filter((entry) => isPathActive(entry.matchPath))
.filter((entry) => isNavigationEntryActive(entry))
.sort(
(left, right) => normalizePath(right.matchPath).length - normalizePath(left.matchPath).length,
)[0];
Expand Down
21 changes: 19 additions & 2 deletions frontend/app/pages/backend/[backend]/libraries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,28 @@ const forwardCommand = async (library: LibraryItem): Promise<void> => {
await navigateTo(makeConsoleCommand(r(command.command, util as unknown as JsonObject)));
};

const getIgnoreIds = (targetLibrary: LibraryItem, nextIgnoredState: boolean): Array<string> => {
const targetId = String(targetLibrary.id);
const ignoreIds = items.value
.filter((item) => (String(item.id) === targetId ? nextIgnoredState : item.ignored))
.map((item) => String(item.id));

return Array.from(new Set(ignoreIds));
};

const toggleIgnore = async (library: LibraryItem): Promise<void> => {
try {
const newState = !library.ignored;
const response = await request(`/backend/${backend}/library/${library.id}`, {
method: newState ? 'POST' : 'DELETE',
const ignoreIds = getIgnoreIds(library, newState);

const response = await request(`/backend/${backend}`, {
method: 'PATCH',
body: JSON.stringify([
{
key: 'options.ignore',
value: ignoreIds.join(','),
},
]),
});
const data = await parse_api_response<any>(response);

Expand Down
6 changes: 6 additions & 0 deletions frontend/app/pages/help/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,11 @@ const choices: Array<{ number: number; title: string; text: string; url: string
text: 'API documentation current version.',
url: '/help/api',
},
{
number: 9,
title: 'Backend OpenAPI',
text: 'Browse the bundled Plex, Jellyfin, and Emby upstream routes.',
url: '/help/openapi',
},
];
</script>
Loading
Loading