Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor improvmenets

  • Loading branch information...
commit 99d8f30dd0205e89c54d5f8bad5cbfbe28ed95a7 1 parent 7b8654c
@ojii ojii authored
View
2  jplayer/__init__.py
@@ -1 +1 @@
-__version__ = '0.1.2'
+__version__ = '0.1.4'
View
8 jplayer/media/jplayer/js/cmsplayer.js
@@ -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
7 jplayer/utils.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.