#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (c) 2009, 2010 Efrim <efrim@azylum.org> {{{
+# Copyright (c) 2009, 2010, 2012 Kaliko Jack <kaliko.jack@azylum.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# }}}
import sys
from time import sleep
-from lib.mpdclass import MPDClass
-from lib.startop import StartOpt
+from lib.goodies import Goodie
+
NAME = 'nalbum'
VERSION = '0.1'
])
-class Nalbum(StartOpt, MPDClass):
+class Nalbum(Goodie):
"""
"""
script_info = dict({
def __init__(self):
""""""
- StartOpt.__init__(self, self.__class__.script_info, NALBUM_OPTS)
- MPDClass.__init__(self)
+ Goodie.__init__(self, self.__class__.script_info,
+ extra_options=NALBUM_OPTS)
self._run()
def _fade(self, io='out'):
""""""
print 'Connecting %s:%i' % (self.cli_options.host, self.cli_options.port)
self.mpdConnect()
+ nalbum = self._get_next()
self.init_vol = int(self.client.status().get('volume'))
if self.cli_options.time:
print 'Cross fading next album'
self._fade()
- self.client.play(self._get_next())
+ self.client.play(nalbum)
if self.cli_options.time:
self._fade(io='in')
self.client.disconnect()