Permalink
Browse files

todo

  • Loading branch information...
2 parents 3a2d369 + 03a6f52 commit 9e8be4636b82faf18a02a665ec12b829fb93675f @noah committed Apr 15, 2012
Showing with 9 additions and 5 deletions.
  1. +2 −1 lib/config.py
  2. +5 −4 lib/playlist.py
  3. +2 −0 riddim.cfg
View
@@ -18,8 +18,9 @@ class Config(object):
runpath = join_path('/tmp')
pidpath = join_path(runpath, config.get('riddim', 'pidfile'))
datapath = join_path(basepath, 'data', config.get('riddim', 'datafile'))
- hostname = "0.0.0.0"
+ hostname = config.get('riddim', 'hostname')
port = config.get('riddim', 'port')
+ manager_port = config.getint('riddim', 'manager_port')
scrobble = config.getboolean('riddim', 'scrobble')
url = config.get('riddim', 'url')
metaint = config.getint('icy', 'metaint')
View
@@ -7,7 +7,6 @@
import cPickle as pickle
from lib.logger import log
-from lib.audio import Audio
from lib.config import Config
from lib.data import DataManager
@@ -54,11 +53,10 @@ class Playlist(object):
def __init__(self):
- self.config = Config()
-
# get data from manager (see lib/server.py)
DataManager.register('get_data')
- manager = DataManager(address=('', 18945), authkey="secret")
+ manager = DataManager(address=(Config.hostname,
+ Config.manager_port), authkey="secret")
manager.connect()
self.data = manager.get_data()
@@ -139,6 +137,7 @@ def enqueue_list(self, path):
def enqueue(self, paths):
tracks = streams = 0
+ from lib.audio import Audio
pl = self.data['playlist']
for path in paths:
log.info("adding %s" % path)
@@ -188,6 +187,8 @@ def remove(self):
self.next()
# TODO clear() should call remove(); cli should call remove to strip
+ # would also be nice to return a list of *artists* whose tracks were
+ # removed
# by int
def clear(self, regex=None):
View
@@ -3,7 +3,9 @@ url = http://0x7be.org
logfile = riddim.log
pidfile = riddim.pid
datafile = data.pickle
+hostname = 7be
port = 18944
+manager_port = 18945
scrobble = True
[icy]

0 comments on commit 9e8be46

Please sign in to comment.