A web-based application for browsing and listening to music from Nintendo's game catalog. This project interfaces with Nintendo's public APIs to fetch data on games, news, playlists, and tracks, presenting it in a clean, user-friendly interface. https://nintendo-music-app-viewer.vercel.app
  • Python 74.8%
  • HTML 22.6%
  • CSS 2.6%
Find a file
2026-03-12 19:01:00 -04:00
nintendo_music_app_viewer fix stream order 2026-03-12 19:01:00 -04:00
.gitignore feat: bulk download to server 2026-03-02 09:12:21 -05:00
pyproject.toml refactor: modularize/templatize (#2) 2026-02-27 02:34:54 +00:00
README.md docs: update README 2026-03-02 09:56:41 -05:00
uv.lock feat!: migrate to Python/Quart, decrypt widevine for playback and download (#1) 2026-02-27 01:58:33 +00:00

Nintendo Music App Viewer

A web-based application for browsing, listening to, and downloading music from the Nintendo Music catalog. This project interfaces with Nintendo's public APIs to fetch data on games, news, playlists, and tracks, presenting it in a clean, user-friendly interface.

Originally a PHP project, the codebase has since been rewritten in Python using Quart with httpx for nonblocking I/O.

Features

  • Browse Recent Games: The homepage displays a list of the latest games from Nintendo's catalog.
  • View News & Notices: Stay updated with the latest news and service notices directly from Nintendo.
  • Explore Playlists: Discover music playlists associated with specific games.
  • Listen to Tracks: An integrated audio player allows for in-browser playback of game music.
  • Bulk Download: Grab all tracks from a playlist at once. They will be stored in the downloaded_playlists directory inside the app directory. The download routine also saves the game's cover art as folder.jpg/folder.png and the playlist's thumbnail as <playlistName>.jpg/.png so that browsers and media players can show artwork. Progress is shown via serversent events; a background mode with polling is also available for very large playlists.
  • Responsive Design: The interface is designed to be usable on both desktop and mobile devices.

How It Works

  • Quart Backend: A Python/Quart (async Flask dropin) backend acts as a proxy between the client and Nintendo's APIs. Using Quart enables nonblocking HTTP requests with httpx, which helps when fetching media and API data concurrently. It also:
    1. securely handles API requests without exposing endpoints to the client.
    2. injects the required User-Agent header to mimic an official Nintendo application, which is necessary to access the API.
  • Vanilla JS Frontend: The frontend is built with plain JavaScript, using the Fetch API to dynamically load content without page reloads. This keeps the application lightweight and fast.
  • Quart Router: Quart's decoratorbased routing system handles all URL routing, parsing requests to determine what content to serve, from game lists to the audio player itself.

Setup

Tokens & Proxy

Some Nintendo endpoints (listening and downloading) require a shortlived edge token and a bearer token. These can be captured automatically by running the builtin mitmproxy instance and pointing the official Nintendo Music app running on your mobile device at http://<yourmachineip>:8080. The token page (/token) shows status and lets you paste values manually as a fallback.

To start the proxy, simply run the development server with debug enabled (the proxy is started automatically on port 8080).

To run this project locally, you'll need Python 3.12+ and uv for dependency management. The runtime dependencies include Quart, httpx, mitmproxy (for token capture), pywidevine, and mutagen.

  1. Install shaka-packager

    1. Download the latest release from https://github.com/shaka-project/shaka-packager/releases
    2. Make executable and remove quarantine if applicable
    mv packager-osx-arm64 ~/bin/shaka-packager
    chmod +x ~/bin/shaka-packager
    xattr -c ~/bin/shaka-packager
    
  2. Install dependencies

    uv sync
    

Running the Server

uv run nmav

This will start a server on http://127.0.0.1:8000/. Access the application by navigating to that URL in your web browser.

File Structure

  • app.py: The main Quart application. Contains all routes, templates, and logic for handling requests.
  • pyproject.toml: Project metadata and dependency configuration for uv.

Known Challenges

DRM-Protected Content

Audio tracks are protected with Widevine and/or Fairplay DRM. This project uses pywidevine in combination with shaka-packager and official tokens from the app to decrypt the DRM. If you are unable to provide the necessary tokens, then playback and downloading will not work.

Extended Playback

Extended playback downloads/streams currently just download/stream the normal version of the track

TODO

  • automate the creation of an android virtual device that can be used with mitmproxy
  • automate installing, logging in, and playing a track on the Nintendo Music app in the android virtual device

Disclaimer

This is an unofficial, third-party application and is not affiliated with, authorized, endorsed by, or in any way officially connected with Nintendo. All product and company names are property of their respective holders.