diff --git a/html/album.py b/html/album.py new file mode 100644 index 00000000..81206cd2 --- /dev/null +++ b/html/album.py @@ -0,0 +1,24 @@ +# Bryan Schumaker (11/17/2010) + +from libsaria.sources import library + +def header(wfile): + wfile.write("") + +def footer(wfile): + wfile.write("") + +def body(wfile, args): + wfile.write("") + + artist = library.tag_tree[args["artist"]].value + album = library.tag_tree[args["artist"]][args["album"]].value + wfile.write("
" % artist) + wfile.write("" % album) + wfile.write("
%s
%s
") + + +def to_html(wfile, args): + header(wfile) + body(wfile, args) + footer(wfile) diff --git a/html/library.py b/html/library.py index 4924becc..5810f6d1 100644 --- a/html/library.py +++ b/html/library.py @@ -11,12 +11,14 @@ def footer(wfile): wfile.write("") def body(wfile): + link = "%s
" for artist, ar_key in library.artists(): wfile.write("

%s

" % artist) for album, al_key in library.albums(ar_key): - wfile.write("%s
" % album) + wfile.write(link % (ar_key, al_key, album)) + #wfile.write("%s
" % album) -def to_html(wfile): +def to_html(wfile, args): header(wfile) body(wfile) footer(wfile)