https://github.com/irskep/summertunes
A web-based music player for Beets
https://github.com/irskep/summertunes
amarok beets flask groovebasin itunes kefir mopidy mpv music python3 react
Last synced: 23 days ago
JSON representation
A web-based music player for Beets
- Host: GitHub
- URL: https://github.com/irskep/summertunes
- Owner: irskep
- License: mit
- Created: 2016-12-18T18:49:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T21:11:18.000Z (over 8 years ago)
- Last Synced: 2025-06-29T18:06:11.594Z (4 months ago)
- Topics: amarok, beets, flask, groovebasin, itunes, kefir, mopidy, mpv, music, python3, react
- Language: JavaScript
- Size: 2.21 MB
- Stars: 17
- Watchers: 5
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: Readme.rst
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - irskep/summertunes - A web-based music player for Beets (JavaScript)
README
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
.. figure:: https://www.dropbox.com/s/i1yf42p5vu7eidt/Screenshot%202017-01-17%2012.59.32.png?dl=1
:alt: Screenshot
Installation
------------
.. code:: sh
# 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``):
.. code:: 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:
.. code:: sh
beet import -A -C /folder/of/files
Running
-------
In terminal A, run ``beet web``:
.. code:: sh
beet web
In terminal B, use summertunes to run mpv:
.. code:: sh
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:
.. code:: yaml
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:
.. code:: sh
cd client
npm install
pip install -r requirements.txt
pip install --editable .
Update your beets config to allow CORS headers in ``beet web``:
.. code:: yaml
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):
.. code:: sh
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
~~~~~~
.. code:: sh
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.