Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: buchuki/walter
base: ad7cf55584
...
head fork: buchuki/walter
compare: 4df33893a6
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 10, 2012
Dusty Phillips er, that's not a password input. fa2458e
Dusty Phillips refactor mpd connect into client library 4df3389
View
1  .gitignore
@@ -1 +1,2 @@
venv
+*.pyc
View
7 www/.aspen/mpdclient.py
@@ -0,0 +1,7 @@
+import mpd
+def get_client(request):
+ client = mpd.MPDClient()
+ client.connect("localhost", 6600)
+ client.password(request.cookie.get("auth_pwd").value)
+ # FIXME: deal with not authenticated
+ return client
View
2  www/index.html
@@ -20,7 +20,7 @@
<body>
{% if not auth_pwd %}
<form method="post">
- Enter your mpd password: <input type="passwd" name="auth_pwd" />
+ Enter your mpd password: <input type="password" name="auth_pwd" />
<input type="submit" value="Save" />
</form>
{% else %}
View
6 www/play.html
@@ -1,8 +1,6 @@
-import mpd
+import mpdclient
^L
-client = mpd.MPDClient()
-client.connect("localhost", 6600)
-client.password(request.cookie.get("auth_pwd").value)
+client = mpdclient.get_client(request)
client.pause()
^L
Played!

No commit comments for this range

Something went wrong with that request. Please try again.