Download the PHP package detain/phlix-plugin-anilist without Composer

On this page you can find all versions of the php package detain/phlix-plugin-anilist. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phlix-plugin-anilist

phlix-plugin-anilist

tests

AniList metadata provider for Phlix — anime metadata and watchlist sync, over the AniList GraphQL API.

Overview

Connects a Phlix server to AniList to enrich your media library with anime metadata:

It subscribes to phlix.library.item.added (throttled background enrichment) and phlix.playback.stopped (episode progress sync). Every AniList feature — the metadata lookups included — requires both the access token and the AniList username to be configured: with either one missing, nothing runs (see Settings below). The master toggle gates every AniList path on top of that: with it off no periodic sync timer is even armed, and ticks already in flight refuse to run. The refusal is per-checkpoint, not instantaneous: the gate is re-read at every sync tick, at every enrichment drain tick, and at every page boundary of an in-flight watchlist walk — a disable or reconfigure that lands mid-walk stops the walk before its next page fetch and logs the partial abort, and the entries the walk already wrote stay written. The event-driven features (enrichment and progress write-back) and the host-armed list sync behave the same way.

Install

From the Phlix admin Plugins section, paste this repo's URL:

…or from the CLI:

Settings

Configure these in the Phlix admin Plugins → Configure dialog.

Setting Type Required Secret Tier Default Description
enabled boolean No No standard false Master on/off for AniList sync/matching.
access_token string No Yes standard null Personal AniList API access token, pasted in by hand. Create one at anilist.co/settings/developer. Phlix does not run an AniList OAuth flow.
username string No No standard "" Your AniList username. Every AniList feature requires it together with the access token: nothing runs (enrichment included) until both are set. The lists it pulls during sync are addressed by it.
sync_enabled boolean No No advanced true Sync your watched status and episode progress with your AniList list.
sync_interval_minutes integer No No advanced 60 How often to sync with AniList — per worker process. The host runs a pool of resident workers (~14) and each arms its own sync timer; each tick elects a single syncer per host via a non-blocking flock() on a per-username lockfile inside a private, owner-only (0700) phlix-anilist-<uid> directory under the system temp dir (workers that lose the election skip the tick), and the winner paces its watchlist page-walk at 0.7 s per page. If the election path is unusable the tick fails open — every worker syncs and the multiplication is warned once per enable cycle; set PHLIX_ANILIST_ELECTION_FAIL_CLOSED=1 in the server's environment to skip those ticks instead. See Election lock below.
auto_match boolean No No advanced true Auto-match anime to AniList entries using the item's MyAnimeList id (mal_id).

access_token is stored in plaintext at rest. The token you paste above is persisted verbatim, unencrypted, in the host's plugin-settings storage (plugins.settings_json) and therefore in every raw database backup and dump — this plugin does not encrypt it. It is never returned to the admin UI (the SPA projection carries only a has_token boolean) and never appears in logs, but anyone with read access to the database or its backups holds a working bearer credential, so protect those accordingly. Encrypting it at rest — precedent: the sibling trakt plugin's SodiumTokenCipher, keyed by its token_encryption_key setting — is an open owner decision for this plugin.

Election lock

The per-tick single-syncer election (see sync_interval_minutes above) lives at $(temp)/phlix-anilist-<uid>/phlix-anilist-sync-<sha256(username)>.lock (<sha256(salt)>-truncated segment appended to the directory name when PHLIX_ANILIST_LOCK_SALT is set). Rules worth knowing as an operator:

Uninstall & cleanup

Uninstalling from the admin UI (or php bin/phlix plugin:uninstall) removes the plugin's plugins row and its settings_json — which contains the plaintext access_token, so deleting the row deletes the stored credential. Two classes of data deliberately survive an uninstall:

Troubleshooting

A pasted token or username is refused ("dirty paste"). A trailing newline from a normal paste is trimmed and accepted. Anything still dirty after the trim — an interior space, a tab, a control or ANSI escape sequence carried along with the value — is refused at the settings boundary: nothing is stored, the plugin reports has_token: false (or an empty username), and sync stays off until a clean value is saved. Since the admin UI keeps showing what you pasted, the refusal is announced once per save with a warning log line naming the refused field (AniList: stored access_token refused at the settings boundary …); the warning never echoes the value itself. Self-check: re-paste the token from the developer page (not from a terminal or chat app that can inject characters), save, and confirm the warning is gone.

Sync stopped working about a year after setup (expired token). Phlix does not run AniList's OAuth flow and cannot renew anything: the personal access token you pasted is a static credential that AniList expires roughly one year after issue. When it dies, every AniList call starts failing and the plugin logs warnings such as AniList: periodic sync failed or AniList: failed to sync status list each tick, while the settings screen still shows the old (dead) token as configured. Cure: create a fresh token at anilist.co/settings/developer, paste it into access_token, and save — the plugin re-reads settings on the next configure and rebuilds its client immediately.

Rate limits (HTTP 429) and give-up behavior. AniList allows roughly 90 requests per minute per client, and any other service using the same AniList account shares that budget. The plugin paces itself: enrichment requests are throttled to at most one per second, the periodic syncer walks list pages at 0.7 s per page, and only one worker per host is elected (via flock() on the private election lockfile — see Election lock above) to run each sync tick. A 429 response is retried up to three times — honoring AniList's Retry-After (clamped to 1–60 s) when present, otherwise backing off exponentially (2 s, 4 s, 8 s). After the third retry the request gives up loudly: the caller logs a warning for that operation and the next scheduled tick retries normally; no sync is marked successful on a given-up request. If 429s persist, raise sync_interval_minutes and check what else is dialing AniList with the same token.

Development

The entry class is Phlix\Plugins\Metadata\AniList\AniListPlugin (implements Phlix\Shared\Plugin\LifecycleInterface and Phlix\Shared\Plugin\ConfigurableInterface). It runs inside a Phlix server host, which provides the playback/library services at runtime.

License

MIT — see LICENSE.


All versions of phlix-plugin-anilist with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
detain/phlix-shared Version ^0.52.0
ext-mbstring Version *
psr/container Version ^1.1 || ^2.0
psr/log Version ^1.0 || ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package detain/phlix-plugin-anilist contains the following files

Loading the files please wait ...