Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bugfix on url passing - now can provide url as variable, string or ar…

…ray playlist
  • Loading branch information...
commit a17efad0c0f6d46eecd83f8329187891467ebd8d 1 parent 08c4e13
@mfitzp authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 flowplayer/templatetags/flowplayer_tags.py
View
12 flowplayer/templatetags/flowplayer_tags.py
@@ -48,13 +48,17 @@ def render(self, context):
# Try resolve this variable in the template context
self.media = self.media.resolve(context)
except VariableDoesNotExist:
- # Cannot resolve, therefore it's an url
- self.media_url = self.media
- self.media_playlist = False
- else:
+ # Cannot resolve, therefore treat as url string
+ pass
+
+ # Have we got an array or a string?
+ if isinstance(self.media, list):
# Can resolve, push first url into the url variable
self.media_url = self.media[0]
self.media_playlist = self.media
+ else:
+ self.media_url = self.media
+ self.media_playlist = False
t = loader.get_template('flowplayer/flowplayer.html')
code_context = Context(
Please sign in to comment.
Something went wrong with that request. Please try again.