Giter Site home page Giter Site logo

iposonic's Introduction

iposonic

A tiny subsonic server api implementation with python + flask. Supports:

  • coverArt search on the web
  • playlist add / delete, 4 default dynamic meta - playlist(included starred and random)
  • simple and customizable authentication
  • mp3 down - sampling for streaming from GPRS / UMTS connections
  • rating and starring
  • full - text search songs and albums
  • optional database backends

It works nicely for listing and playing your files with a subsonic client.

  • Android client
  • MiniSub and Perisonic

quickstart

To run, just

  • install flask and the other dependencies with # pip install flask
  • configure your mp3 directory in webapp.py
  • run with # python main.py -c /music/folder
  • help yourself # python main.py --help

You can test methods adding some audio files in test / data / and messing with nose

prerequisites

Required

  • pip install flask
  • pip install mutagen
  • pip install simplejson
  • pip install argparse

Optional

  • pip install sqlalchemy # [optional if you want a permanent store]
  • pip install MySQL - python # [optional if you want MySQL support]
  • pip install pylast # [optional if you want to scrobble to last.fm]
  • pip install nose # [to test and develop]
  • [apt - get | yum] install lame # [optional if you want transcoding and down-sampling]

big collections

If you have big music collections, Iposonic supports local data indexing with

  • MySQL Embedded(library provided in this source, with full text search)
  • MySQL Server(configure it in MySQLIposonicDB class)
  • Sqlite(thru sqlalchemy, but does not support full text search)

scrobbling

Scrobbling is enabled on development branches: lastfm and fs_thread

iposonic's People

Contributors

ioggstream avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar

iposonic's Issues

manage collection via FTP or webdav

1- manage collection via ftp or webdav
2- autenticate ftp/webdav using subsonic credentials/profiles
3- support sharing files and folders with others thru subsonic api

1- is achievable with pyftpdlib or another webdav library
2,3- authenticating and sharing requires an sql+multiuser backend

Manage deleted songs

Remove deleted songs without re-scanning the tree.

Include it in a background thread with inotify?

Implement "Most Played"

Iposonic doesn't track played songs. Implementing Most Played requires:
1- creating a play counter in db
2- increase the counter at every play
3- select most played

The select stuff can simply be done reusing the "Newest Song" function in
view_list.py

Per-user metadata

Iposonic metadata like starred and userRating are not per-user.

To support that we should move metadata to UserMedia table.

This requires a join to retrieve some playlist.

User and UserMedia skeleton are defined in iposonic.py. The sqlalchemy implementation is in iposonicdb.py

User management via database

Authentication is done via the .iposonic_auth file.

To change/add users you need to restart iposonic.

1- implement a file-reloader
2- implement DB authentication
3- implement the following calls for the admin user

createUser
deleteUser
changePassword

Iposonic on windows - feedback

@tsquillario you can provide feedback here. Just install:
1- python
2- setuptools

Then to add the iposonic dependencies you should just issue

pip install

Let me know + Peace, R.

A simple AttributeError

INFO:werkzeug:127.0.0.1 - - [11/Oct/2012 10:35:57] "GET /rest/getCoverArt.view?v=9.0.0&c=MiniSub&f=jsonp&size=50&id=-1341576754 HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1701, in call
return self.wsgi_app(environ, start_response)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/goofy/Projects/iposonic/view_media.py", line 302, in get_cover_art_view
cover_art_path = get_cover_art_file(eid)
File "/home/goofy/Projects/iposonic/view_media.py", line 191, in tmp
cache2[eid] = (f(eid, nocache=nocache), time.time())
File "/home/goofy/Projects/iposonic/view_media.py", line 238, in get_cover_art_file
"/", app.iposonic.cache_dir, MediaManager.cover_art_uuid(info))
File "/usr/lib64/python2.7/posixpath.py", line 66, in join
if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

Music indexing in a separate thread

Music indexing is actually done synchronously.

It could be done in a separate thread/process.

We could even use two separate processes:

  • one for indexing and cover_art downloading;
  • one for webapp.

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.