]> kaliko git repositories - mpd-goodies.git/blobdiff - lib/mpdutils.py
* start working on MPDClass and new crop command.
[mpd-goodies.git] / lib / mpdutils.py
index ea58b89c6b8f66a687f0d6f56b27e70ccbeb9a37..ce1b38dc06deaee1f575519808658ae239dd2638 100644 (file)
@@ -73,10 +73,14 @@ def mpdAuth(client, secret):#{{{
     return True#}}}
 
 
-def mconnect():#{{{
+def mconnect(host=None, port=None):#{{{
     """"""
-    ## get connection id
+    ## get connection id from ENV VAR
     con_id, passwd = get_mpd_environ()
+    if host:
+        con_id.update({'host': host})
+    if port:
+        con_id.update({'port': port})
     ## MPD object instance
     client = MPDClient()
     if mpdConnect(client, con_id):