Giter VIP home page Giter VIP logo

summertunes's Introduction

Summertunes

Summertunes is a web-based music player that can control mpv on a server, or play back audio in your browser.

Requirements

Python 3.5; beets >=1.4.4; mpv

Screenshot

Installation

# Install mpv on your platform
brew install mpv
# Install summertunes from PyPI
pip install summertunes

Add this to your beets config (on OS X, at ~/.config/beets/config.yaml):

plugins: web summertunes
web:
    include_paths: true  # without this, summertunes can't control mpv

If you haven't used beets before, import your files into beets without rewriting tags or copying:

beet import -A -C /folder/of/files

Running

In terminal A, run beet web:

beet web

In terminal B, use summertunes to run mpv:

summertunes mpv

In your web browser, visit http://localhost:8337/summertunes/.

The normal ``beet web`` interface is still at ``http://localhost:8337/``. Summertunes is served at ``/summertunes/``.

Configuration

Summertunes is configured using your beets config file. Here are its defaults:

summertunes:
    # port to serve mpv websocket from
    mpv_websocket_port: 3001
    # path to use for socket; should be no files with this path
    mpv_socket_path: /tmp/mpv_socket
    # show mpv in web interface? otherwise just allow web playback
    mpv_enabled: yes
    # last.fm API key, used to fetch album art
    last_fm_api_key: ''
    # if using 'summertunes serve' development server, use this port
    dev_server_port: 3000

Developing

Client

You'll need npm installed to develop the client. To get the auto-reloading dev server running, install some stuff:

cd client
npm install
pip install -r requirements.txt
pip install --editable .

Update your beets config to allow CORS headers in beet web:

web:
    cors: '*'
    host: 0.0.0.0
    include_paths: true

Now you can run this in one terminal to serve the JS (but not the API):

summertunes serve --dev  # serves JS

And keep beet web running in another terminal, with the config changes above, so the JS has something to talk to.

Server

pip install --editable .
beet web --debug # auto-reloads when you change files

Both

Run summertunes serve --dev in one terminal and beet web --debug in another.

summertunes's People

Contributors

irskep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

summertunes's Issues

ExtDeprecationWarning for flask.ext.cors

ExtDeprecationWarning: Importing flask.ext.cors is deprecated, use flask_cors instead. .format(x=modname), ExtDeprecationWarning

I'm running Python 3.6 on MacOS 10.12.2

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.