Skip to content

androidWG/Discord.fm

Repository files navigation


Windows Platform Badge macOS Platform Badge Linux Platform Badge

GitHub release (latest by date) GitHub Workflow Status License: MIT Using pypresence package

Multi-platform background service that shows what you're scrobbling on Last.fm to on Discord, with automatic updates, cover art image, support for Discord Canary and a UI for changing settings.

Based on Last.fm-Discord-Rich-Presence by Gust4Oliveira

Install

Platform support overview

Windows macOS Linux (generic) Linux (Flatpak)
Basic Function 🟥 🟥
Building/Packaging 🟧
Start with System 🟧 🟧 🟥
Updates 🟥 🟧

Fully working | 🟧 Needs testing/WIP | 🟥 Not working | ➖ Not applicable

Instructions

  • Download the latest release
  • Run the installer
    • *setup.exe on Windows, install.sh on Linux (generic)
  • Wait a bit and the app's settings will open. Type in your Last.fm username and close the window.
  • Done!

Setting up dev environment or running as a Python script

Discord.fm provides a setup script with some useful functions for devs. A full list of parameters can be viewed by running the command python setup.py -h or simply running the script with no flags or commands.

The app can also be run unfrozen by running python setup.py run. Check requirements and full instructions below:

Requirements

  • Python 3.12 or above
  • uv
  • tkinter
  • packaging Python package

Build requirements

  • C compiler (GCC, MSVC, etc.)
    • PyInstaller is used to freeze the app for distribution. However, using pip to install it will trigger false positives in many antiviruses. This is why we will need to build it ourselves, and thus the need for a C compiler. More info here.
  • psutil Python package
  • appdmg Node package (macOS only)
  • Inno Setup (Windows only for installer building)

[!WARNING] > On Linux PyGObject dependencies are required by pystray for running or building - follow instructions for "Installing from PyPI with pip" for your distro on this link: https://pygobject.gnome.org/getting_started.html

Platform notes

Windows
  • Visual Studio with the C++ development option includes MSVC, if you don't have VS I recommend MSYS2 - includes GCC
Linux
macOS
  • appdmg is needed to create a distribution-ready file (.dmg) on macOS. You'll need node to run it, once you have it it can be installed with npm install -g appdmg

After all requirements are met, clone the repo:

git clone https://github.com/androidWG/Discord.fm
cd Discord.fm

The setup script will set everything up when you before running any of its commands. You can set it up yourself manually too - the script checks for dependencies and other things, but ultimately setup is a single call for uv sync with arguments. Copy the command under the sync method in the setup.py file and run to install dependencies.

Running

python setup.py run

Building

python setup.py build

The script will set up anything if needed, then build the app and subsequently the installer (only on Windows) - both only for the current platform. You can pass the flag --installer-only or --build-only to skip the other step.