Changeset c283cb9


Ignore:
Timestamp:
Feb 26, 2009, 1:40:49 AM (16 years ago)
Author:
Edward Z. Yang <edwardzyang@…>
Branches:
master, debian, mac, no-cups, web
Children:
e0a78b1
Parents:
bed8e5d
git-author:
Edward Z. Yang <edwardzyang@…> (02/26/09 01:40:49)
git-committer:
Edward Z. Yang <edwardzyang@…> (02/26/09 01:40:49)
Message:

Add quick-and-dirty now playing information.
Signed-off-by: Edward Z. Yang <edwardzyang@…>

Location:
gutenbach-web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gutenbach-web/index.html

    r0b8c868 rc283cb9  
    1414<body>
    1515    <div id="status">
     16        <p>Currently playing:</p>
     17        <pre>$playing</pre>
    1618        <p>The volume is <span id="volume">$volume</span></p>
    1719        <div py:replace="volume_form(volume_data)"></div>
  • gutenbach-web/root.py

    r0b8c868 rc283cb9  
    2828        out = dict(page="index")
    2929        volume = int(remctl(server, command=["volume", "get"]).stdout.rstrip())
     30        playing = remctl(server, command=["status", "get"]).stdout
     31        # Todo: add better parsing
     32        if not playing: playing = "Nothing playing"
    3033        if not "volume" in kw: kw["volume"] = volume
    3134        return dict(
    3235                    page="index",
     36                    playing=playing,
    3337                    volume=volume,
    3438                    volume_form=volume_form,
Note: See TracChangeset for help on using the changeset viewer.