]> kaliko git repositories - mpd-goodies.git/blobdiff - src/mfade
* reorganized source folders
[mpd-goodies.git] / src / mfade
diff --git a/mfade b/src/mfade
similarity index 92%
rename from mfade
rename to src/mfade
index de84f141dfc21be9cfc252af9bd885b179a2a0e8..0ffd9dfd452184331e720c0ef8aaefc4a943b8ef 100755 (executable)
--- a/mfade
+++ b/src/mfade
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-# Copyright (c) 2009, 2010 Efrim <efrim@azylum.org> {{{
+# Copyright (c) 2009, 2010 Efrim <efrim@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
@@ -16,7 +16,6 @@
 #   You should have received a copy of the GNU General Public License
 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-#  }}}
 
 """
 DOC:
@@ -49,16 +48,16 @@ class Sleep(StartOpt, MPDClass):
         'usage': USAGE,
         })
 
-    def __init__(self):#{{{
+    def __init__(self):
         """"""
         StartOpt.__init__(self, self.__class__.script_info, [])
         MPDClass.__init__(self)
         self.tempo = int(10)
         self.volum = None
         self._consume_args()
-        self._run()#}}}
+        self._run()
 
-    def _consume_args(self):#{{{
+    def _consume_args(self):
         """"""
         if (len(self.cli_args) < 1 or
                 len(self.cli_args) > 2):
@@ -69,9 +68,9 @@ class Sleep(StartOpt, MPDClass):
         except IndexError:
             pass
         except ValueError, err:
-            self.parser.error('wrong option passed (%s)' % err)#}}}
+            self.parser.error('wrong option passed (%s)' % err)
 
-    def _run(self):#{{{
+    def _run(self):
         """"""
         self.mpdConnect()
         self.mpd_state = str(self.client.status().get('state'))
@@ -92,9 +91,9 @@ class Sleep(StartOpt, MPDClass):
             self.mpd_vol = 0
             self.client.play()
             self.fade()
-        sleep(1)#}}}
+        sleep(1)
 
-    def fade(self):#{{{
+    def fade(self):
         """"""
         # TODO: handle possible lost connections
         span = float(self.volum - self.mpd_vol)
@@ -109,7 +108,7 @@ class Sleep(StartOpt, MPDClass):
             if abs(vol - self.volum) < 1:
                 self.client.setvol(self.volum)
                 return True
-            sleep(1)#}}}
+            sleep(1)
 
 
 # Script starts here