Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding xspf player and crossdomain.xml

  • Loading branch information...
commit dd4f7926f1cb9eda5fd4a41998c9b2acb87e69f0 1 parent 50cda84
Gabriel Handford authored
5 app.yaml
View
@@ -7,6 +7,7 @@ api_version: 1
# All non-S3 routes should fall under that to avoid conflicts with S3 buckets.
# Other reserved buckets include, /shrub-env and /test (for debugging and testing).
handlers:
+
- url: /test.*
script: test.py
@@ -16,6 +17,10 @@ handlers:
- url: /favicon.ico
static_files: public/favicon.ico
upload: public/favicon.ico
+
+- url: /crossdomain.xml
+ static_files: public/crossdomain.xml
+ upload: public/crossdomain.xml
- url: /.*
script: main.py
4 app/controllers/tape.py
View
@@ -44,9 +44,7 @@ def handle(self, s3response):
for file in files:
tracks.append(file.xspf_track)
- title = u'%s (XSPF)' % path
-
- values = dict(title=title, creator='Shrub', info='http://shrub.appspot.com', location=url, tracks=tracks)
+ values = dict(title=path, creator='Shrub', info='http://shrub.appspot.com', location=url, tracks=tracks)
self.render("xspf.mako", values, 'text/xml; charset=utf-8')
2  app/helpers/base.py
View
@@ -7,3 +7,5 @@ def current_version(context):
def to_json(context, value):
return simplejson.dumps(value)
+def shrub_version(context):
+ return "1.2.8"
2  app/views/footer.mako
View
@@ -2,4 +2,4 @@
<%namespace name="base" module="app.helpers.base"/>
<hr/>
-<p><a href="http://shrub.appspot.com/">Shrub</a>/1.2.5 &copy; 2008 &mdash; <a href="http://rel.me">rel.me</a> (Gabriel Handford) &mdash; Shrub is <a href="http://github.com/gabriel/shrub">open source</a></p>
+<p><a href="http://shrub.appspot.com/">Shrub</a>/${base.shrub_version()} &copy; 2008 &mdash; <a href="http://rel.me">rel.me</a> (Gabriel Handford) &mdash; Shrub is <a href="http://github.com/gabriel/shrub">open source</a></p>
1  app/views/list.mako
View
@@ -86,6 +86,7 @@
Formats:
<a href="/${path}/?format=rss">RSS</a> /
<a href="/${path}/?format=json">JSON</a> /
+ <a href="/${path}/?format=xspf">XSPF</a> /
<a href="/${path}/?format=tape">*Tape</a>
</p>
<%include file="footer.mako"/>
5 app/views/muxtape.mako
View
@@ -58,13 +58,12 @@
function playerReady(obj) {
shrubPlayer.setPlayer(obj);
}
-
</script>
<script type="text/javascript">
var loadID3 = function() {
- var flashvars = { type: "xml", shuffle: "false", repeat: "list", file: "${xspf_url}" }
- var params = { allowscriptaccess: "always" };
+ var flashvars = { type: "xml", shuffle: "false", repeat: "list", file: "${xspf_url}"};
+ var params = { allowscriptaccess: "always" };
var attributes = { id: "shrub-player", name: "shrub-player", styleclass: "flash-player" };
swfobject.embedSWF('/shrub/swf/player.swf', "shrub-player", "0", "0", "8.0.0", false, flashvars, params, attributes);
3  public/crossdomain.xml
View
@@ -0,0 +1,3 @@
+<cross-domain-policy>
+ <allow-access-from domain="*"/>
+</cross-domain-policy>
13 public/css/screen.css
View
@@ -8,13 +8,24 @@ h2 {
}
h3 {
- font-size: 1.2em;
+ font-size: 1.4em;
+}
+
+h4 {
+ font-size: 1.2em;
+ padding-bottom: 6px;
}
h1 span {
font-size: 0.6em;
}
+pre {
+ background: #000;
+ color: #DEDEDE;
+ padding: 8px 8px;
+}
+
a {
text-decoration: none;
border-bottom:1px solid #AACCFF;
BIN  public/swf/xspf_player.swf
View
Binary file not shown
BIN  public/swf/xspf_player_slim.swf
View
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.