Permalink
Browse files

minor improvmenets

  • Loading branch information...
1 parent 7b8654c commit 99d8f30dd0205e89c54d5f8bad5cbfbe28ed95a7 ojii committed Jun 4, 2010
Showing with 11 additions and 6 deletions.
  1. +1 −1 jplayer/__init__.py
  2. +4 −4 jplayer/media/jplayer/js/cmsplayer.js
  3. +6 −1 jplayer/utils.py
View
@@ -1 +1 @@
-__version__ = '0.1.2'
+__version__ = '0.1.4'
@@ -39,14 +39,14 @@ function cmsplayer_ready (element, playlist, autoplay, playerid)
function displayPlayList() {
for (i=0; i < playlist.length; i++) {
song = playlist[i];
- display = "<li class='song' id='playlist_item_"+playerid+"_"+i+"'><span class='songname' id='cmsplay_song_"+i+"'>"+song.title+'</span> - ';
+ display = "<li class='song' id='playlist_item_"+playerid+"_"+i+"'><span class='songname' id='cmsplay_song_"+i+"'>"+song.title+'</span>';
if (song.artist_url)
{
- display+=" <a class='artist' href='"+song.artist_url+"'>"+song.artist_name+"</a>";
+ display+=" - <a class='artist' href='"+song.artist_url+"'>"+song.artist_name+"</a>";
}
- else
+ else if (song.artist_name)
{
- display+=" <span class='artist'>"+song.artist_name+"</span>";
+ display+=" - <span class='artist'>"+song.artist_name+"</span>";
}
if (song.credits_name)
{
View
@@ -34,7 +34,12 @@ def build_player(playerid, playlist, autoplay=True, base_path=settings.JPLAYER_B
}
]
"""
- oggsupport = _safe_json(all([song.get('ogg', False) for song in playlist]))
+ def _get_ogg(songobj):
+ try:
+ return bool(songobj['ogg'])
+ except (KeyError, TypeError):
+ return hasattr(songobj, 'ogg') and bool(getattr(songobj, 'ogg', False))
+ oggsupport = _safe_json(all([_get_ogg(song) for song in playlist]))
playlist = _safe_json(playlist)
autoplay = _safe_json(autoplay)
base_path = _safe_json(base_path)

0 comments on commit 99d8f30

Please sign in to comment.