| 1 |
Tidal Plugin |
| 2 |
============ |
| 3 |
|
| 4 |
The ``tidal`` plugin provides metadata matches for the autotagger using the |
| 5 |
Tidal_ Web APIs. |
| 6 |
|
| 7 |
.. _tidal: https://tidal.com |
| 8 |
|
| 9 |
Why Use the Tidal Plugin? |
| 10 |
------------------------- |
| 11 |
|
| 12 |
The Tidal plugin allows you to: |
| 13 |
|
| 14 |
- Fetch metadata for albums and tracks from Tidal's catalog |
| 15 |
- Look up tracks by ISRC code (useful if your music files already contain ISRC |
| 16 |
tags) |
| 17 |
- Look up albums by barcode ID (useful if your CDs have UPC barcodes) |
| 18 |
- Get matches during import without needing to manually search |
| 19 |
|
| 20 |
This is especially useful if your music already has ISRC or barcode metadata |
| 21 |
embedded, as it allows for quick and accurate matching to Tidal's catalog. |
| 22 |
|
| 23 |
Requirements |
| 24 |
------------ |
| 25 |
|
| 26 |
- A Tidal account (free or premium) |
| 27 |
- Python environment with network access to Tidal's API |
| 28 |
|
| 29 |
Before using the plugin, you need to authorize your beets installation to access |
| 30 |
your Tidal account. |
| 31 |
|
| 32 |
Installation |
| 33 |
------------ |
| 34 |
|
| 35 |
To use the ``tidal`` plugin, first enable it in your configuration (see |
| 36 |
:ref:`using-plugins`). Then, install ``beets`` with ``tidal`` extra |
| 37 |
|
| 38 |
.. code-block:: bash |
| 39 |
|
| 40 |
pip install "beets[tidal]" |
| 41 |
|
| 42 |
Authentication |
| 43 |
-------------- |
| 44 |
|
| 45 |
To authenticate with Tidal, run: |
| 46 |
|
| 47 |
.. code-block:: bash |
| 48 |
|
| 49 |
beet tidal --auth |
| 50 |
|
| 51 |
This will open a browser window where you can log in to your Tidal account. |
| 52 |
After successful authentication, your token will be saved to the configured |
| 53 |
token file and you won't need to re-authenticate on subsequent runs. |
| 54 |
|
| 55 |
Basic Usage |
| 56 |
----------- |
| 57 |
|
| 58 |
Enable the ``tidal`` plugin (see :ref:`using-plugins`). Once enabled, you will |
| 59 |
receive Tidal matches when importing new items. |
| 60 |
|
| 61 |
During import, you can also manually enter a Tidal URL at the ``enter Id`` |
| 62 |
prompt: |
| 63 |
|
| 64 |
.. code-block:: bash |
| 65 |
|
| 66 |
Enter search, enter Id, aBort, eDit, edit Candidates, plaY? i |
| 67 |
Enter release ID: https://tidal.com/album/226495055 |
| 68 |
|
| 69 |
You can enter both album and track URLs. For example: |
| 70 |
|
| 71 |
.. code-block:: bash |
| 72 |
|
| 73 |
https://tidal.com/track/490839595 |
| 74 |
https://tidal.com/album/234493117 |
| 75 |
|
| 76 |
Configuration |
| 77 |
------------- |
| 78 |
|
| 79 |
This plugin can be configured like other metadata source plugins as described in |
| 80 |
:ref:`metadata-source-plugin-configuration`. |
| 81 |
|
| 82 |
Default |
| 83 |
~~~~~~~ |
| 84 |
|
| 85 |
.. code-block:: yaml |
| 86 |
|
| 87 |
tidal: |
| 88 |
client_id: mcjmpl1bPATJXcBT |
| 89 |
tokenfile: tidal_token.json |
| 90 |
data_source_mismatch_penalty: 0.5 |
| 91 |
search_limit: 5 |
| 92 |
|
| 93 |
.. conf:: client_id |
| 94 |
:default: mcjmpl1bPATJXcBT |
| 95 |
|
| 96 |
The Tidal API client ID. The default value is the public demo client ID. |
| 97 |
You can register your own application at Tidal's developer portal for |
| 98 |
production use. |
| 99 |
|
| 100 |
.. conf:: tokenfile |
| 101 |
:default: tidal_token.json |
| 102 |
|
| 103 |
The path to the file where the Tidal authentication token is stored. |
| 104 |
|
| 105 |
Cover Art |
| 106 |
--------- |
| 107 |
|
| 108 |
When the :doc:`fetchart` plugin is enabled, beets can retrieve album cover art |
| 109 |
from Tidal. The Tidal plugin automatically includes the cover art URL when |
| 110 |
looking up albums. No additional configuration is needed to enable this feature. |
| 111 |
|
| 112 |
.. include:: ./shared_metadata_source_config.rst |
| 113 |
|
| 114 |
Flexible Attributes |
| 115 |
------------------- |
| 116 |
|
| 117 |
The plugin stores the following flexible attributes on your items during import. |
| 118 |
You can use them in queries and path formats. |
| 119 |
|
| 120 |
.. list-table:: |
| 121 |
:header-rows: 1 |
| 122 |
|
| 123 |
- - Attribute |
| 124 |
- Type |
| 125 |
- Description |
| 126 |
- - ``tidal_track_id`` |
| 127 |
- STRING |
| 128 |
- Tidal track ID |
| 129 |
- - ``tidal_album_id`` |
| 130 |
- STRING |
| 131 |
- Tidal album ID |
| 132 |
- - ``tidal_artist_id`` |
| 133 |
- STRING |
| 134 |
- Tidal artist ID |
| 135 |
- - ``tidal_track_popularity`` |
| 136 |
- INTEGER |
| 137 |
- Track popularity score (0-100) |
| 138 |
- - ``tidal_album_popularity`` |
| 139 |
- INTEGER |
| 140 |
- Album popularity score (0-100) |
| 141 |
- - ``tidal_updated`` |
| 142 |
- DATE |
| 143 |
- Unix timestamp of last popularity sync |
| 144 |
|
| 145 |
For example, to list your most popular tracks: |
| 146 |
|
| 147 |
:: |
| 148 |
|
| 149 |
beet ls tidal_track_popularity:80.. |
| 150 |
|
| 151 |
To find tracks that have not been synced yet: |
| 152 |
|
| 153 |
:: |
| 154 |
|
| 155 |
beet ls tidal_track_popularity:0 |
| 156 |
|
| 157 |
Synchronise popularity |
| 158 |
---------------------- |
| 159 |
|
| 160 |
Use ``beet tidalsync`` to refresh popularity data for your imported items and |
| 161 |
albums from Tidal. By default it skips items that already have popularity data. |
| 162 |
|
| 163 |
Options: |
| 164 |
|
| 165 |
- ``-f``, ``--force`` -- re-fetch all items, even those already synced. |
| 166 |
- ``-a``, ``--album`` -- sync albums instead of individual tracks. |
| 167 |
- ``-w``, ``--write`` -- write updated metadata to media files. |
| 168 |
|
| 169 |
You can also pass a query to narrow the scope: |
| 170 |
|
| 171 |
:: |
| 172 |
|
| 173 |
beet tidalsync -fw artist:"My Artist" |