Coder Social home page Coder Social logo

moestreamer's Introduction

MoeStreamer

A tiny macOS app that sits in the menubar, to stream music from LISTEN.moe. It also lets you play local playlists from iTunes (or Music.app โ€” same thing).

Features

  1. Streaming from LISTEN.moe, including (un)favouriting when logged in
  2. Playback from local iTunes (Music.app) library
  3. Search for local music
  4. ALWAYS overrides media keys (F7-F9, or touchbar buttons) when the app is open.
  5. Discord presence, including cover art

When logging in to LISTEN.moe, the account password is stored in the macOS Keychain.

Screenshots

Here's how it looks like in the menubar:

Search view:

Settings view:

Keyboard Shortcuts

At the moment, these shortcuts cannot be customised.

function key
play / pause K, space
next song L
(un)mute M
search /
(un)favourite F

Building

$ carthage update --platform macos
$ xcodebuild

Alternatively, open the Xcode project and build it there (you still need to run carthage).

Discord Presence

This app includes support for updating your discord presence, looking something like this:

If you only need the song information (title, artist) to appear, then you don't need to do anything other than check the tickbox. If you want album art to appear however, read further.

As a small easter egg, if you are listening to any albums that I (the app developer) have images for, then you'll get free cover art without needing to do any work! The authorisation stuff below (tokens etc.) is only needed to upload new art.

obtaining your token

In order to use this feature, create an application on the Discord Developer Portal, and note down your Application ID (this is not a secret).

Next, open up your browser web inspector, and fish out the Authorization header from any of the request headers. It should start with mfa.. Probably. This is your token, and it is a secret. I am well aware that this is an account token and not an application token, but I'm too lazy to implement a proper OAuth flow.

Alternatively, you can select "automatically extract token" in the settings, and the app will attempt to find your token from a local running instance of Discord. This doesn't always work, though. Regardless of which method you choose, the token seems to expire after a while, so if you notice that your album arts are not updating, repeat the steps above to get a new token.

managing album art

Discord applications can have at most 150 assets, which means you can only have 150 album art images "available" at a time. If the current song's art does not exist on the server, then it is uploaded (and other victim images are purged to keep below the 150 limit).

If you are reading this far, then you have already created a discord app; upload an image and name it default-cover to serve as the default in case anything goes wrong (note: this is not necessary if you are not using your own application).

License

Contributions from my_cat_is_ugly on Twitch.

Code is licensed under the Apache License Version 2. Icons are from Google's material.io, which are similarly licensed.

App icon is gotten from here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.