### Source Code Installation and Run for Hifi Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Guide to installing Hifi from source. It includes cloning the repository, setting up the .env file, installing Python dependencies using pip, and running the FastAPI application with Uvicorn. ```shell git clone https://github.com/sachinsenal0x64/hifi # Rename .env-example cd hifi cp .env.example .env pip install "fastapi[all]" pip install -r requirements.txt python3 -m uvicorn main:app --host 0.0.0.0 --port 8000 ``` -------------------------------- ### Source Installation and Development Server (Python/Uvicorn) Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Steps to install HiFi from source and run the development server using Uvicorn. This involves cloning the repository, setting up the environment, installing Python dependencies, and starting the server. It also mentions accessing API documentation. ```bash # Clone and setup git clone https://github.com/sachinsenal0x64/hifi cd hifi cp .env.example .env # Install Python dependencies pip install "fastapi[all]" pip install -r requirements.txt # Run development server python3 -m uvicorn main:app --host 0.0.0.0 --port 8000 # Run with hypercorn for HTTP/3 support hypercorn main:app --bind 0.0.0.0:8000 # Access API documentation # Open browser to http://localhost:8000/docs ``` -------------------------------- ### Hifi API GET Request for Home Content Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Illustrates how to fetch home content from the Hifi API using a GET request. The example shows the endpoint and an optional country parameter. ```http GET "https://tidal.401658.xyz/home/?country=AU" ``` -------------------------------- ### Hifi API GET Request for Track Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Demonstrates how to make a GET request to the Hifi API to retrieve track information. It shows the endpoint, required parameters like track ID and quality, and an example URL. ```http GET "https://tidal.401658.xyz/track/?id=286266926&quality=LOSSLESS" ``` -------------------------------- ### Hifi API Search Endpoint Request Example Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This example demonstrates how to make a GET request to the Hifi API's search endpoint. It shows the base URL and various query parameters that can be used to filter search results by song, artist, album, video, playlist, limit, and offset. ```http GET "https://tidal.401658.xyz/search/?s=Consequence" ``` -------------------------------- ### Retrieve Audio Stream with GET /dash/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This code snippet demonstrates how to request an audio stream using the GET /dash/ endpoint. It requires a track ID and desired quality, returning the audio stream in the specified format. ```bash https GET "https://tidal.401658.xyz/dash/?id=286266926&quality=HI_RES_LOSSLESS" ``` -------------------------------- ### GET /song/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves song information based on a query and desired audio quality. ```APIDOC ## GET /song/ ### Description Retrieves song information including streaming URLs and detailed metadata. You can specify the song by its name and select the desired audio quality. ### Method GET ### Endpoint /song/ ### Parameters #### Query Parameters - **q** (string) - Required - The name or query for the song. - **quality** (string) - Optional - Desired audio quality. Options: `HI_RES_LOSSLESS`, `HI_RES`, `LOSSLESS`, `HIGH`, `LOW`. ### Request Example ```bash https GET "https://tidal.401658.xyz/song/?q=Mine&quality=HI_RES" ``` ### Response #### Success Response (200) - **OriginalTrackUrl** (string) - The URL to the original track. - **Song Info** (object) - Contains detailed information about the song, including album, artist, duration, and audio quality. - **Track Info** (object) - Contains track-specific metadata like album peak amplitude, audio quality, and manifest details. #### Response Example ```json { "OriginalTrackUrl": "track url", "Song Info": { "adSupportedStreamReady": true, "album": { "cover": "22b8ce2a-1912-4fc6-956f-3be5eb4a7f4c", "id": 79712262, "title": "Mine", "vibrantColor": "#a7d9fc", "videoCover": null }, "allowStreaming": true, "artist": { "id": 7384212, "name": "Bazzi", "picture": "2726f1e5-0435-4c49-a6f7-c2192544638f", "type": "MAIN" }, "artists": [ { "id": 7384212, "name": "Bazzi", "picture": "2726f1e5-0435-4c49-a6f7-c2192544638f", "type": "MAIN" } ], "audioModes": [ "STEREO" ], "audioQuality": "HI_RES", "copyright": "2017", "djReady": true, "duration": 134, "editable": false, "explicit": true, "id": 79712263, "isrc": "USAT21704227", "mediaMetadata": { "tags": [ "LOSSLESS", "MQA" ] }, "mixes": { "TRACK_MIX": "0014833cd62b1eecd3b24115e5f8d4" }, "peak": 0.997437, "popularity": 64, "premiumStreamingOnly": false, "replayGain": -10.39, "stemReady": false, "streamReady": true, "streamStartDate": "2017-10-12T00:00:00.000+0000", "title": "Mine", "trackNumber": 1, "url": "http://www.tidal.com/track/79712263", "version": null, "volumeNumber": 1 }, "Track Info": { "albumPeakAmplitude": 0.997437, "albumReplayGain": -10.39, "assetPresentation": "FULL", "audioMode": "STEREO", "audioQuality": "HI_RES", "manifest": "base64 manifest", "manifestMimeType": "application/vnd.tidal.bts", "trackId": 79712263, "trackPeakAmplitude": 0.997437, "trackReplayGain": -10.39 } } ``` ``` -------------------------------- ### GET /artist/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves information about an artist. ```APIDOC ## GET /artist/ ### Description Retrieves information about an artist. ### Method GET ### Endpoint /artist/ ### Parameters #### Query Parameters - **id** (integer) - Required - The ID of the artist. ### Request Example ``` GET /artist/?id=12345 ``` ### Response #### Success Response (200) - **artist** (object) - An object containing artist details. - **id** (integer) - The artist's ID. - **name** (string) - The artist's name. - **picture** (string) - The artist's picture URL. - **type** (string) - The artist's type (e.g., MAIN, FEATURED). #### Response Example ```json { "artist": { "id": 5034071, "name": "VIC MENSA", "picture": "cdd212a2-dadc-466d-9703-7216a9f66da1", "type": "MAIN" } } ``` #### Error Response (404) - **message** (string) - Error message indicating artist not found. #### Error Response Example ```json { "message": "Artist not found." } ``` ``` -------------------------------- ### Docker Installation for Hifi Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Instructions to clone the Hifi repository, set up the environment variables, and run the application using Docker Compose. This is a straightforward method for deploying Hifi. ```shell # Clone the Repo git clone https://github.com/sachinsenal0x64/hifi # Rename .env-example cd hifi cp .env.example .env # Just run docker compose up ``` -------------------------------- ### GET /home/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves home feed content, potentially personalized by country. Authentication is not required. ```APIDOC ## GET /home/ ### Description Retrieves home feed content, potentially personalized by country. Authentication is not required. ### Method GET ### Endpoint /home/ ### Parameters #### Query Parameters - **country** (string) - Optional - Country code (e.g., `AU`) ### Request Example ```sh GET "https://tidal.401658.xyz/home/?country=AU" ``` ### Response #### Success Response (200) (Response structure for this endpoint is not detailed in the provided text) ### Status Codes (Status codes for this endpoint are not detailed in the provided text) ``` -------------------------------- ### Get HiRes DASH Stream (Bash & JavaScript) Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Accesses Hi-Res lossless streams (up to 24-bit/192kHz FLAC) and spatial audio formats (Dolby Atmos, Sony 360RA) via MPEG-DASH manifests. Requires a DASH player like Shaka Player. The JavaScript example demonstrates converting HEAD requests to GET for compatibility. ```bash curl -X GET "https://tidal.401658.xyz/dash/?id=286266926&quality=HI_RES_LOSSLESS" ``` ```javascript const player = new shaka.Player(videoElement); player.getNetworkingEngine().registerRequestFilter(function(type, request) { if (request.method === 'HEAD') { request.method = 'GET'; } }); player.load('https://tidal.401658.xyz/dash/?id=286266926&quality=HI_RES_LOSSLESS') .then(() => console.log('Stream loaded')) .catch(error => console.error('Error loading:', error)); ``` -------------------------------- ### Get Artist Information via HTTPS GET Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves artist details using the artist ID. Supports fetching all albums and tracks associated with the artist. ```Shell https GET "https://tidal.401658.xyz/artist/?id=5034071" ``` -------------------------------- ### GET /dash/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves audio stream information for a given track ID and quality. ```APIDOC ## GET /dash/ ### Description Retrieves audio stream information for a given track ID and quality. This endpoint is useful for fetching different quality versions of a song. ### Method GET ### Endpoint /dash/ ### Parameters #### Query Parameters - **id** (integer) - Required - Track Id (e.g., 286266926) - **quality** (string) - Required - Song Quality (e.g., HI_RES_LOSSLESS, HI_RES, LOSSLESS, HIGH, LOW) ### Request Example ```http GET https://tidal.401658.xyz/dash/?id=286266926&quality=HI_RES_LOSSLESS ``` ### Response #### Success Response (200) (Response structure not detailed in the provided text, but typically includes stream URLs and format information.) #### Response Example (Response example not provided in the input text.) ``` -------------------------------- ### GET /track/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves information about a specific track, including its audio quality and metadata. Authentication is not required. ```APIDOC ## GET /track/ ### Description Retrieves information about a specific track, including its audio quality and metadata. ### Method GET ### Endpoint /track/ ### Parameters #### Query Parameters - **id** (integer) - Required - Track Id (e.g., `286266926`) - **quality** (string) - Optional - Song Quality (`HI_RES_LOSSLESS`, `HI_RES`, `LOSSLESS`, `HIGH`, `LOW`) ### Request Example ```sh GET "https://tidal.401658.xyz/track/?id=286266926&quality=LOSSLESS" ``` ### Response #### Success Response (200) - **albumPeakAmplitude** (number) - The peak amplitude of the album. - **albumReplayGain** (number) - The replay gain value for the album. - **assetPresentation** (string) - The presentation type of the asset. - **audioMode** (string) - The audio mode (e.g., STEREO). - **audioQuality** (string) - The audio quality of the track. - **bitDepth** (integer) - The bit depth of the audio. - **manifest** (string) - The base64 encoded manifest for the track. - **manifestMimeType** (string) - The MIME type of the manifest. - **sampleRate** (integer) - The sample rate of the audio. - **trackId** (integer) - The unique identifier for the track. - **trackPeakAmplitude** (number) - The peak amplitude of the track. - **trackReplayGain** (number) - The replay gain value for the track. #### Response Example ```json { "albumPeakAmplitude": 1.0, "albumReplayGain": -9.18, "assetPresentation": "FULL", "audioMode": "STEREO", "audioQuality": "LOSSLESS", "bitDepth": 16, "manifest": "base64 manifest", "manifestMimeType": "application/vnd.tidal.bts", "sampleRate": 44100, "trackId": 286266926, "trackPeakAmplitude": 0.988482, "trackReplayGain": -7.89 } ``` ### Status Codes - **200** - `OK` - **422** - `UNPROCESSABLE CONTENT` - **404** - `NOT FOUND` - **500** - `INTERNAL SERVER ERROR` ``` -------------------------------- ### GET /album/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves album details using the album ID. ```APIDOC ## GET /album/ ### Description Retrieves detailed information about an album using its unique identifier. ### Method GET ### Endpoint /album/ ### Parameters #### Query Parameters - **id** (integer) - Required - The unique identifier for the album. ### Request Example ```bash https GET "https://tidal.401658.xyz/album/?id=286266925" ``` ### Response *Note: The full response structure for the /album/ endpoint was not provided in the input text. The following is a placeholder.* #### Success Response (200) - **[fields]** - Description of album details. #### Response Example ```json { "message": "Album details would be returned here." } ``` ``` -------------------------------- ### Fergie Track Metadata Example (JSON) Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This JSON object details a track by Fergie, including its duration, copyright, and associated album information. It demonstrates the consistent structure used for various artists within the dataset. ```json { "item": { "id": 35736704, "title": "Clumsy", "duration": 240, "replayGain": -9.82, "peak": 0.988556, "allowStreaming": true, "streamReady": true, "payToStream": false, "adSupportedStreamReady": true, "djReady": true, "stemReady": false, "streamStartDate": "2006-09-19T00:00:00.000+0000", "premiumStreamingOnly": false, "trackNumber": 2, "volumeNumber": 1, "version": null, "popularity": 76, "copyright": "℗ 2006 UMG Recordings, Inc.", "bpm": 92, "url": "http://www.tidal.com/track/35736704", "isrc": "USUM70609116", "editable": false, "explicit": false, "audioQuality": "LOSSLESS", "audioModes": [ "STEREO" ], "mediaMetadata": { "tags": [ "LOSSLESS" ] }, "upload": false, "accessType": "PUBLIC", "spotlighted": false, "artist": { "id": 10664, "name": "Fergie", "handle": null, "type": "MAIN", "picture": "09a83abe-3916-4940-807b-d6389d931358" }, "artists": [ { ``` -------------------------------- ### GET /artist/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves artist information, including their albums and tracks, based on the provided artist ID. ```APIDOC ## GET /artist/ ### Description Retrieves artist information, including their albums and tracks, based on the provided artist ID. ### Method GET ### Endpoint /artist/ ### Parameters #### Query Parameters - **id** (integer) - Required - Artist ID. Example: `5034071` - **f** (integer) - Optional - Artist ID. If provided, this will retrieve all albums and tracks for the artist. Example: `5034071` ### Request Example ```bash https GET "https://tidal.401658.xyz/artist/?id=5034071" ``` ### Response #### Success Response (200) - **artistRoles** (array) - An array of objects, where each object describes a role the artist has (e.g., Artist, Songwriter). - **artistTypes** (array) - An array of strings indicating the types of artist (e.g., "ARTIST", "CONTRIBUTOR"). - **id** (integer) - The unique identifier for the artist. - **mixes** (object) - An object containing different mixes associated with the artist. - **name** (string) - The name of the artist. - **picture** (string) - A URL or identifier for the artist's picture. - **popularity** (integer) - A measure of the artist's popularity. - **url** (string) - The URL to the artist's page on the Tidal platform. #### Response Example ```json [ { "artistRoles": [ { "category": "Artist", "categoryId": -1 }, { "category": "Songwriter", "categoryId": 2 }, { "category": "Production team", "categoryId": 10 }, { "category": "Producer", "categoryId": 1 }, { "category": "Engineer", "categoryId": 3 }, { "category": "Performer", "categoryId": 11 } ], "artistTypes": [ "ARTIST", "CONTRIBUTOR" ], "id": 5034071, "mixes": { "ARTIST_MIX": "000720bd7d7867c71a4c63b1fe61cf" }, "name": "VIC MENSA", "picture": "cdd212a2-dadc-466d-9703-7216a9f66da1", "popularity": 66, "url": "http://www.tidal.com/artist/5034071" }, [ { "750": "https://resources.tidal.com/images/cdd212a2/dadc/466d/9703/7216a9f66da1/750x750.jpg", "id": 5034071, "name": "VIC MENSA" } ] ] ``` ### Status Codes - **200** - OK - **422** - UNPROCESSABLE CONTENT - **404** - NOT FOUND - **500** - INTERNAL SERVER ERROR ``` -------------------------------- ### Docker Update for Hifi Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Steps to update an existing Hifi Docker installation. This involves pulling the latest code, updating Docker images, and restarting the services. An alternative shell script is also provided. ```shell # Clone the Repo git clone https://github.com/sachinsenal0x64/hifi cd hifi git pull # Just run docker compose pull docker compose down docker compose up -d --build docker image prune -f # or cd hifi chmod +x update.sh ./update.sh ``` -------------------------------- ### Get Album Information (Bash) Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Retrieves complete album metadata, including all associated tracks. The response contains detailed album information and a paginated list of tracks, each with full metadata. ```bash curl -X GET "https://tidal.401658.xyz/album/?id=251380836" ``` -------------------------------- ### GET /home/ Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Retrieves Tidal's personalized home feed, including editorial playlists, new releases, and recommendations. Supports country-specific content filtering. ```APIDOC ## GET /home/ ### Description Access Tidal's personalized home feed with editorial playlists, new releases, and recommendations. Supports country-specific content. ### Method GET ### Endpoint /home/ #### Query Parameters - **country** (string) - Optional - Two-letter country code to filter content. ### Response #### Success Response (200) - **id** (string) - Unique identifier for the home feed page. - **title** (string) - Title of the home feed page. - **rows** (array) - An array of content rows, each containing modules. - **modules** (array) - An array of content modules within a row. - **type** (string) - The type of module (e.g., PLAYLIST_LIST). - **title** (string) - The title of the module. - **scroll** (string) - The scroll direction (e.g., HORIZONTAL). - **pagedList** (object) - Object containing paged list data. - **limit** (integer) - The number of items per page. - **offset** (integer) - The offset for pagination. - **totalNumberOfItems** (integer) - The total number of items available. - **items** (array) - An array of items within the paged list. - **uuid** (string) - Unique identifier for the item. - **title** (string) - Title of the item. - **type** (string) - Type of the item (e.g., EDITORIAL). - **image** (string) - Identifier for the item's image. - **numberOfTracks** (integer) - Number of tracks in the item. - **promotedArtists** (array) - Array of promoted artists associated with the item. - **id** (integer) - Artist ID. - **name** (string) - Artist name. ### Request Example ```bash curl -X GET "https://tidal.401658.xyz/home/" ``` ### Response Example ```json { "id": "page-id", "title": "Home", "rows": [ { "modules": [ { "type": "PLAYLIST_LIST", "title": "From our editors", "scroll": "HORIZONTAL", "pagedList": { "limit": 15, "offset": 0, "totalNumberOfItems": 40, "items": [ { "uuid": "playlist-uuid", "title": "New Arrivals", "type": "EDITORIAL", "image": "uuid", "numberOfTracks": 52, "promotedArtists": [ { "id": 4916222, "name": "Khalid" } ] } ] } } ] } ] } ``` ``` -------------------------------- ### Building and Running TUI Client (Go) Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Instructions for building and running the Go-based Terminal UI client for HiFi. This includes downloading dependencies, compiling the application, and running it. Keybindings for navigation and quitting are also provided. ```bash # Install Go dependencies go mod download # Build TUI go build -o hifi-tui ./tui/main.go # Run TUI ./hifi-tui # Vim-like keybindings: # h/j/k/l - navigation (left/down/up/right) # wq - quit application # ESC - return to root container ``` -------------------------------- ### Environment Variables Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Configuration instructions for HiFi using environment variables, including setting up a .env file. ```APIDOC ## Deployment and Configuration ### Environment Variables Configure HiFi using environment variables. Copy `.env.example` to `.env` and populate with your Tidal credentials. ```bash # Example command to copy .env.example to .env (Linux/macOS) cp .env.example .env # Then, edit the .env file to add your credentials. ``` ``` -------------------------------- ### Docker Deployment for HiFi Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Instructions for deploying the HiFi project using Docker Compose, suitable for production environments. This includes cloning the repository, configuring the environment, starting services, checking logs, and updating the application. ```bash # Clone repository git clone https://github.com/sachinsenal0x64/hifi cd hifi # Configure environment cp .env.example .env # Edit .env with your credentials # Start services docker compose pull docker compose up -d --build docker image prune -f # Check logs docker compose logs -f # Update to latest version chmod +x update.sh ./update.sh ``` -------------------------------- ### Get Track Lyrics (API and Python) Source: https://context7.com/sachinsenal0x64/hifi/llms.txt Fetches synchronized or static lyrics for a given track ID. The lyrics can include timestamps for karaoke-style display. A Python example demonstrates how to fetch and print lyrics. ```bash # Get track lyrics curl -X GET "https://tidal.401658.xyz/lyrics/?id=286266926" ``` ```python import httpx import asyncio async def get_lyrics(track_id: int): async with httpx.AsyncClient() as client: response = await client.get( f"https://tidal.401658.xyz/lyrics/?id={track_id}" ) if response.status_code == 200: lyrics_data = response.json()[0] return lyrics_data['lyrics'] return None # Usage lyrics = asyncio.run(get_lyrics(286266926)) print(lyrics) ``` -------------------------------- ### Get Lyrics via HTTPS GET Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Fetches lyrics for a specific track using its ID. This endpoint requires a track ID as a parameter. ```Shell https GET "https://tidal.401658.xyz/lyrics/?id=286266926" ``` -------------------------------- ### Hifi API Playlist Response Example (JSON) Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This JSON object represents a playlist returned by the Hifi API. It includes metadata such as creation date, creator information, title, duration, and a list of promoted artists. It also contains a URL to the playlist on the Tidal platform. ```json { "created": "2015-04-14T16:32:14.636+0000", "creator": { "id": 5034071, "name": "VIC MENSA", "picture": "cdd212a2-dadc-466d-9703-7216a9f66da1", "type": null }, "description": "", "duration": 2696, "image": "c41cfe9b-cda1-4364-b517-f6a706741d24", "lastItemAddedAt": null, "lastUpdated": "2020-03-24T12:27:23.941+0000", "numberOfTracks": 11, "numberOfVideos": 0, "popularity": 0, "promotedArtists": [ { "id": 5034071, "name": "VIC MENSA", "picture": null, "type": "MAIN" }, { "id": 25022, "name": "Kanye West", "picture": null, "type": "MAIN" }, { "id": 3899583, "name": "Theophilus London", "picture": null, "type": "MAIN" }, { "id": 5637986, "name": "Allan Kingdom", "picture": null, "type": "MAIN" } ], "publicPlaylist": false, "squareImage": "03750282-401b-481c-bf60-55d6ee9fcc27", "title": "My Playlist", "type": "ARTIST", "url": "http://www.tidal.com/playlist/910c525f-be8a-41a1-b557-2682af2bcef3", "uuid": "910c525f-be8a-41a1-b557-2682af2bcef3" } ``` -------------------------------- ### Fetch Playlist Data via HTTPS GET Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This snippet illustrates how to retrieve playlist details from the Hifi API using an HTTPS GET request. It requires a playlist UUID as a query parameter. The API will return information specific to the requested playlist, enabling clients to display its contents or metadata. ```Shell https GET "https://tidal.401658.xyz/playlist/?id=910c525f-be8a-41a1-b557-2682af2bcef3" ``` -------------------------------- ### Fetch Album Data via HTTPS GET Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This snippet demonstrates how to retrieve album information from the Hifi API using an HTTPS GET request. It requires a valid album ID as a query parameter. The response is a JSON object containing details about the album, such as artist, title, release date, and audio quality. ```Shell https GET "https://tidal.401658.xyz/album/?id=286266925" ``` -------------------------------- ### Environment Configuration (.env) Source: https://context7.com/sachinsenal0x64/hifi/llms.txt This snippet shows the structure of the .env file used for configuring Tidal API credentials and other settings. ```env CLIENT_ID=your_tidal_client_id CLIENT_SECRET=your_tidal_client_secret CLIENT_ID_HIRES=hires_client_id CLIENT_SECRET_HIRES=hires_client_secret USER_ID=your_tidal_user_id TIDAL_REFRESH=refresh_token TIDAL_REFRESH_HIRES=hires_refresh_token TIDAL_TOKEN=access_token REDIS_URL=redis.host.com REDIS_PORT=6379 REDIS_PASSWORD=redis_password ``` -------------------------------- ### GET /lyrics/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves the lyrics for a specific track using its track ID. ```APIDOC ## GET /lyrics/ ### Description Retrieves the lyrics for a specific track using its track ID. ### Method GET ### Endpoint /lyrics/ ### Parameters #### Query Parameters - **id** (integer) - Required - Track ID. Example: `286266926` ### Request Example ```bash https GET "https://tidal.401658.xyz/lyrics/?id=286266926" ``` ### Response (Response details for lyrics endpoint are not provided in the input.) ### Status Codes - **200** - OK - **422** - UNPROCESSABLE CONTENT - **404** - NOT FOUND - **500** - INTERNAL SERVER ERROR ``` -------------------------------- ### MPV Player Command for Hi-Res Streaming Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This command instructs the MPV player to stream content from a provided URL with high-resolution, lossless quality. It directly uses the DASH stream URL for playback. ```sh mpv https://tidal.401658.xyz/dash/?id=286266926&quality=HI_RES_LOSSLESS ``` -------------------------------- ### MPEG-DASH Manifest Retrieval Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This section describes how to retrieve the MPEG-DASH manifest for audio playback, compatible with players like VLC, FFMpeg, and Google Shaka Player. ```APIDOC ## MPEG-DASH Manifest Retrieval ### Description Provides an XML-encoded MPEG-DASH manifest for streaming audio content. This manifest is compatible with various players including VLC, FFMpeg, and Google Shaka Player. ### Method GET ### Endpoint `/dash/` ### Parameters #### Query Parameters - **id** (string) - Required - The unique identifier for the media track. - **quality** (string) - Optional - The desired audio quality (e.g., `HI_RES_LOSSLESS`). ### Request Example ```sh mpv https://tidal.401658.xyz/dash/?id=286266926&quality=HI_RES_LOSSLESS ``` ### Response #### Success Response (200) - **MPD** (XML) - The MPEG-DASH manifest content. #### Response Example ```xml ``` ### Notes for Google Shaka Player To prevent issues with HEAD requests, use the following JavaScript code to disable them: ```js player.getNetworkingEngine().registerRequestFilter(function(type, request) { // Convert any HEAD requests to GET if (request.method === 'HEAD') { request.method = 'GET'; } }); ``` ``` -------------------------------- ### GET /cover/ Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md Retrieves cover art for a given track. You can specify the track by its ID or by its name. ```APIDOC ## GET /cover/ ### Description Retrieves cover art for a given track. You can specify the track by its ID or by its name. Available sizes include 1280px, 640px, and 80px. ### Method GET ### Endpoint /cover/ ### Parameters #### Query Parameters - **id** (integer) - Optional - Track ID. - **q** (string) - Optional - Song Name. ### Request Example ```bash https GET "https://tidal.401658.xyz/cover/?q=Maestro" https GET "https://tidal.401658.xyz/cover/?id=328060990" ``` ### Response #### Success Response (200) - **1280** (string) - URL for the 1280px cover image. - **640** (string) - URL for the 640px cover image. - **80** (string) - URL for the 80px cover image. - **id** (integer) - The ID of the track. - **name** (string) - The name of the track. #### Response Example ```json [ { "1280": "https://resources.tidal.com/images/6f5c52be/c21c/4fb7/9ce6/0c270f6f1a5a/1280x1280.jpg", "640": "https://resources.tidal.com/images/6f5c52be/c21c/4fb7/9ce6/0c270f6f1a5a/640x640.jpg", "80": "https://resources.tidal.com/images/6f5c52be/c21c/4fb7/9ce6/0c270f6f1a5a/80x80.jpg", "id": 328060988, "name": "Maestro: Music by Leonard Bernstein (Original Soundtrack / Dolby Atmos)" } ] ``` ``` -------------------------------- ### DASH Manifest XML for Audio Playback Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This XML document is an MPEG-DASH manifest used for streaming audio content. It specifies adaptation sets for audio, codecs, bandwidth, and segment templates for playback. It is compatible with players like VLC, FFMpeg, and Google Shaka Player. ```xml ``` -------------------------------- ### Hifi API Track Response Example (JSON) Source: https://github.com/sachinsenal0x64/hifi/blob/main/README.md This JSON object represents a track returned by the Hifi API. It includes detailed information about the track, such as its album, artists, audio quality, copyright, duration, and popularity. It also contains a URL to the track on the Tidal platform. ```json { "items": [ { "cut": null, "item": { "adSupportedStreamReady": true, "album": { "cover": "43929b37-df27-4e1a-81b2-70692c058674", "id": 44590541, "releaseDate": "2015-04-16", "title": "U Mad", "vibrantColor": "#FFFFFF", "videoCover": null }, "allowStreaming": true, "artist": { "id": 5034071, "name": "VIC MENSA", "picture": "cdd212a2-dadc-466d-9703-7216a9f66da1", "type": "MAIN" }, "artists": [ { "id": 5034071, "name": "VIC MENSA", "picture": "cdd212a2-dadc-466d-9703-7216a9f66da1", "type": "MAIN" }, { "id": 25022, "name": "Kanye West", "picture": "26076dbd-7361-40d3-9335-f944d2c49ea6", "type": "FEATURED" } ], "audioModes": [ "STEREO" ], "audioQuality": "LOSSLESS", "copyright": "(C) 2015 Roc Nation Records, LLC", "dateAdded": "2015-04-15T15:03:19.696+0000", "description": null, "djReady": true, "duration": 300, "editable": false, "explicit": true, "id": 44590542, "index": 0, "isrc": "QMJMT1500671", "itemUuid": "90545040-acc7-44c1-9481-7e48f36cefe8", "mediaMetadata": { "tags": [ "LOSSLESS" ] }, "mixes": { "TRACK_MIX": "00169d5b613bbc32050146c8be21df" }, "peak": 0.999359, "popularity": 47, "premiumStreamingOnly": false, "replayGain": -9.38, "stemReady": false, "streamReady": true, "streamStartDate": "2015-04-10T00:00:00.000+0000", "title": "U Mad", "trackNumber": 1, "url": "http://www.tidal.com/track/44590542", "version": null, "volumeNumber": 1 }, "type": "track" } ] } ```