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

On this page you can find all versions of the php package detain/phlix-plugin-lastfm. 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-lastfm

phlix-plugin-lastfm

tests

Last.fm scrobbler plugin for Phlix — scrobbles your music playback to Last.fm.

Overview

Connects a Phlix server to your Last.fm account:

It subscribes to phlix.playback.started and phlix.playback.stopped.

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 Default Description
enabled bool no false Master on/off for Last.fm scrobbling. Parsed strictly: a real bool, or a canonical boolean string ('true', '1', 'on', 'yes' — case-insensitive) enables it; anything else, including junk strings like 'false' and non-scalars, stays disabled.
api_key string yes — Your Last.fm API key. Create a free API account at last.fm/api/account/create.
shared_secret string (secret) yes — The "Shared secret" shown next to your API key on your Last.fm API accounts page. Used to sign authenticated requests.

The OAuth "Connect Last.fm" handshake (authorize + callback) is served by the host at GET /api/v1/oauth/lastfm and GET /api/v1/oauth/lastfm/callback; the callback URL is derived from the request host, so no callback_url setting is needed. Per-user session keys are stored in lastfm_sessions and consumed by the scrobbler.

Where to get your credentials

  1. Sign in to Last.fm and open Create an API account.
  2. Fill in the application name/description. For the Callback URL, register the exact path the host derives at auth time — https://<your-phlix-host>/api/v1/oauth/lastfm/callback (the host sends that URL as cb= on every auth request, and Last.fm validates the request against this registered URL, so a different or query-strewn value fails the handshake).
  3. Copy the API key into api_key and the Shared secret into shared_secret.
  4. Enable the plugin and toggle enabled on.

api_key is deliberately not marked secret while shared_secret is: a Last.fm API key is a public client identifier — the web-auth flow embeds it in the browser-facing authorization URL by design — whereas the shared secret is signing material that never leaves the server and is masked in the admin UI.

Development

Static analysis is configured in phpstan.neon (level 9 over src).

scripts/security-audit-check.php audits the whole of composer.lock — runtime and require-dev dependencies — via composer audit --locked, and runs in CI as the blocking composer-audit job in .github/workflows/test.yml.

The entry class is Phlix\Plugins\Scrobbler\Lastfm\LastfmPlugin (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. onEnable() is boot-safe — it only wires collaborators and subscribes events — so the lastfm_sessions schema is ensured lazily on the first playback event, when LastfmScrobbler invokes the deferred LastfmMigrationRunner closure.

License

MIT — see LICENSE.


All versions of phlix-plugin-lastfm with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
detain/phlix-shared Version ^0.21.0
psr/container Version ^1.1 || ^2.0
psr/log Version ^1.0 || ^2.0 || ^3.0
workerman/mysql Version ^1.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-lastfm contains the following files

Loading the files please wait ...