]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix bug in saving currently played song
authorRobin Appelman <icewind1991@gmail.com>
Sun, 31 Jul 2011 23:17:54 +0000 (01:17 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Sun, 31 Jul 2011 23:17:54 +0000 (01:17 +0200)
apps/media/js/player.js

index d79d6135df2e20a7ac76b05a7ee043855f290671..5f48878563f22b2ab5e08a62d74dfdfe21d09326 100644 (file)
@@ -33,13 +33,13 @@ var PlayList={
                                        PlayList.player.jPlayer("setMedia", PlayList.items[PlayList.current]);
                                        PlayList.items[index].playcount++;
                                        PlayList.player.jPlayer("play");
+                                       localStorage.setItem('oc_playlist_current',index);
+                                       localStorage.setItem('oc_playlist_playing','true');
                                        if (typeof Collection !== 'undefined') {
                                                Collection.registerPlay();
                                        }
                                }
                        }else{
-                               localStorage.setItem('oc_playlist_current',PlayList.current);
-                               localStorage.setItem('oc_playlist_playing','true');
                                PlayList.init(PlayList.items[index].type,PlayList.play);
                        }
                }