Permalink
Browse files

HUGE BUG FIX

  • Loading branch information...
1 parent 77c24cf commit 7f37ccd94a06efda0e46fba4482b6089aaac1b9e Gaya Kessler committed Apr 20, 2012
Showing with 121 additions and 19 deletions.
  1. BIN RealLastFmRadio/assets/css/.sass-cache/18891a242d9b3d851ffe8ee09c41a548c739a4cf/style.scssc
  2. BIN RealLastFmRadio/assets/css/.sass-cache/20b50208fe7a58921f315f66b1968bd900468b05/_utilities.scssc
  3. BIN RealLastFmRadio/assets/css/.sass-cache/280e0cddf4c1171e850e5a5ac7ad098ff1575982/_hacks.scssc
  4. BIN RealLastFmRadio/assets/css/.sass-cache/2821214267fc100ff765afbfcc23d5798e2a0835/_css3.scssc
  5. BIN RealLastFmRadio/assets/css/.sass-cache/2821214267fc100ff765afbfcc23d5798e2a0835/_reset.scssc
  6. BIN RealLastFmRadio/assets/css/.sass-cache/2821214267fc100ff765afbfcc23d5798e2a0835/_support.scssc
  7. BIN RealLastFmRadio/assets/css/.sass-cache/2b9db0fac5dfaa5ec9680045a5856556f391ce7f/style.scssc
  8. BIN RealLastFmRadio/assets/css/.sass-cache/7e104defb09df0d8fd146e0fb91d6f58310a468b/_hacks.scssc
  9. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_appearance.scssc
  10. BIN ...astFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_background-clip.scssc
  11. BIN ...tFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_background-origin.scssc
  12. BIN ...astFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_background-size.scssc
  13. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_border-radius.scssc
  14. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_box-shadow.scssc
  15. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_box-sizing.scssc
  16. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_box.scssc
  17. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_columns.scssc
  18. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_font-face.scssc
  19. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_images.scssc
  20. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_inline-block.scssc
  21. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_opacity.scssc
  22. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_shared.scssc
  23. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_text-shadow.scssc
  24. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_transform.scssc
  25. BIN RealLastFmRadio/assets/css/.sass-cache/ae3327be722402e4fef0b2777b0b26529a0b914a/_transition.scssc
  26. BIN RealLastFmRadio/assets/css/.sass-cache/e44350da23597168d1373cb9529634e69dae5856/_utilities.scssc
  27. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_appearance.scssc
  28. BIN ...astFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_background-clip.scssc
  29. BIN ...tFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_background-origin.scssc
  30. BIN ...astFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_background-size.scssc
  31. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_border-radius.scssc
  32. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_box-shadow.scssc
  33. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_box-sizing.scssc
  34. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_box.scssc
  35. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_columns.scssc
  36. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_font-face.scssc
  37. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_gradient.scssc
  38. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_images.scssc
  39. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_inline-block.scssc
  40. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_opacity.scssc
  41. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_shared.scssc
  42. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_text-shadow.scssc
  43. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_transform.scssc
  44. BIN RealLastFmRadio/assets/css/.sass-cache/e7b8a4700c8ec84e3e9b25e721f34b99ccab5f95/_transition.scssc
  45. BIN RealLastFmRadio/assets/css/.sass-cache/f8e264ff809f93edeb7897ef1532ae1c60427c41/_css3.scssc
  46. BIN RealLastFmRadio/assets/css/.sass-cache/f8e264ff809f93edeb7897ef1532ae1c60427c41/_reset.scssc
  47. BIN RealLastFmRadio/assets/css/.sass-cache/f8e264ff809f93edeb7897ef1532ae1c60427c41/_support.scssc
  48. +27 −0 RealLastFmRadio/assets/css/compass_app_log.txt
  49. +28 −4 RealLastFmRadio/assets/css/sass/style.scss
  50. +7 −4 RealLastFmRadio/assets/css/style.css
  51. +49 −11 RealLastFmRadio/assets/js/rlfmr.js
  52. +10 −0 RealLastFmRadio/index.html
@@ -289,3 +289,30 @@
2012-04-19 13:55:34 overwrite style.css
2012-04-19 14:38:12 overwrite style.css
2012-04-19 14:39:39 overwrite style.css
+2012-04-19 16:48:28 overwrite style.css
+2012-04-19 16:49:36 overwrite style.css
+2012-04-19 16:50:39 overwrite style.css
+2012-04-19 16:50:44 overwrite style.css
+2012-04-19 16:51:15 overwrite style.css
+2012-04-19 16:51:55 overwrite style.css
+2012-04-19 16:54:31 overwrite style.css
+2012-04-19 16:56:52 overwrite style.css
+2012-04-19 16:59:14 overwrite style.css
+2012-04-19 17:00:41 overwrite style.css
+2012-04-19 17:03:20 overwrite style.css
+2012-04-19 17:05:09 overwrite style.css
+2012-04-19 17:05:30 overwrite style.css
+2012-04-19 17:05:50 overwrite style.css
+2012-04-19 17:06:18 overwrite style.css
+2012-04-19 17:08:35 overwrite style.css
+2012-04-19 17:08:45 overwrite style.css
+2012-04-19 17:10:24 overwrite style.css
+2012-04-19 17:11:08 overwrite style.css
+2012-04-19 17:16:17 overwrite style.css
+2012-04-19 17:16:32 overwrite style.css
+2012-04-20 09:16:47 overwrite style.css
+2012-04-20 09:17:12 overwrite style.css
+2012-04-20 09:17:32 overwrite style.css
+2012-04-20 09:18:05 overwrite style.css
+2012-04-20 09:18:21 overwrite style.css
+2012-04-20 09:18:43 overwrite style.css
@@ -182,9 +182,10 @@ a[href^="http:"]::after {
height: 365px;
min-width: 700px;
width: 100%;
- background-repeat: no-repeat;
+ overflow: hidden;
background-size: cover;
background-position: center center;
+ background-repeat: no-repeat;
.player {
display: none;
@@ -195,7 +196,7 @@ a[href^="http:"]::after {
.info {
position: relative;
- margin-top: 55px;
+ margin-top: 50px;
color: #fbfbfb;
width: 100%;
@@ -211,7 +212,7 @@ a[href^="http:"]::after {
#track {
font-size: 24px;
line-height: 32px;
- background: image-url("background-play.png") 10px 8px no-repeat;
+ background: image-url("background-play.png") 10px 12px no-repeat;
padding-right: 100px;
}
@@ -258,7 +259,7 @@ a[href^="http:"]::after {
.gradientUp, .gradientDown {
position: absolute;
- z-index: 1;
+ z-index: 2;
top: 0px;
left: 0px;
width: 100%;
@@ -272,6 +273,29 @@ a[href^="http:"]::after {
@include background-image(linear-gradient(top, rgba(85,85,85,0.0), rgba(85,85,85,1)));
}
}
+
+ #bg-image {
+ width: 100%;
+ position: absolute;
+ z-index: 1;
+ }
+
+ #tuning {
+ display: block;
+ font-size: 24px;
+ font-style: italic;
+ position: absolute;
+ top: 50%;
+ margin-top: -12px;
+ width: 100%;
+ text-align: center;
+ color: #999;
+ @include text-shadow(rgba(0,0,0,0.25) 0px 1px 1px);
+
+ .tuning {
+ display: none;
+ }
+ }
}
#artist-info {

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -21,12 +21,17 @@ var gettingTracks = false;
var tunedRadio = false;
var addedTracks = new Array;
var radioStarted = false;
+var tuningRadio = false;
function loginUser() {
+ console.log("login in user");
+
//check if user is already logged in
userLoggedIn = localeStorager.get("userloggedin");
if (userLoggedIn != true) {
+ console.log("no access");
+
$("#access_login").css("display", "block");
var token_sig = MD5("api_key" + lastfm_api_key + "methodauth.getToken" + lastfm_api_secret);
@@ -49,6 +54,8 @@ function loginUser() {
}
function accessGranted() {
+ console.log("u have the access got!");
+
var session_sig = MD5("api_key" + lastfm_api_key + "methodauth.getSessiontoken" + access_token + lastfm_api_secret);
var session_url = "http://ws.audioscrobbler.com/2.0/?method=auth.getSession&api_key=" + lastfm_api_key + "&api_sig=" + session_sig + "&token=" + access_token;
@@ -76,6 +83,8 @@ function accessGranted() {
}
function openApp() {
+ console.log("opening app");
+
$("#app_content").css("display", "block");
usernameLfm = localeStorager.get("username");
@@ -128,21 +137,39 @@ function openApp() {
}
function emptyPlaylist() {
+ console.log("DESTROY THE QUEUE!");
+
addedTracks = new Array;
trackListQueue = new Array;
}
function loadPlaylist(station) {
- emptyPlaylist();
- var sig = MD5("api_key" + lastfm_api_key + "methodradio.tunesk" + keyLfm + "station" + station + lastfm_api_secret);
+ console.log("load playlist");
+
+ if (tuningRadio == false) {
+ console.log("start tuning in");
+
+ radioStarted = false;
+ tuningRadio = true;
+
+ player.playing = false;
+
+ $("#tuning .click2tune").css("display", "none");
+ $("#tuning .tuning").css("display", "block");
+ $("#nowplaying .player").css("display", "none");
+ $("#artist-info .content").css("display", "none");
- var url = "http://ws.audioscrobbler.com/2.0/?method=radio.tune&api_key=" + lastfm_api_key + "&api_sig=" + sig +
- "&sk=" + keyLfm + "&station=" + station;
+ emptyPlaylist();
+ var sig = MD5("api_key" + lastfm_api_key + "methodradio.tunesk" + keyLfm + "station" + station + lastfm_api_secret);
- $.post(url, function (data) {
- tunedRadio = true;
- pushNewTracks(true);
- }, "xml");
+ var url = "http://ws.audioscrobbler.com/2.0/?method=radio.tune&api_key=" + lastfm_api_key + "&api_sig=" + sig +
+ "&sk=" + keyLfm + "&station=" + station;
+
+ $.post(url, function (data) {
+ tunedRadio = true;
+ pushNewTracks(true);
+ }, "xml");
+ }
}
function pushNewTracks(forcedPlay) {
@@ -167,6 +194,8 @@ function pushNewTracks(forcedPlay) {
pushTrack["artist"] = artist;
if (inArray(identifier, addedTracks) == false) {
+ console.log("push track: " + title + " - " + artist);
+
var url = "http://ws.spotify.com/search/1/track";
$.get(url, {
@@ -183,8 +212,9 @@ function pushNewTracks(forcedPlay) {
trackListQueue.push(pushTrack);
addedTracks.push(identifier);
- if (radioStarted == false || forcedPlay == true) {
+ if (radioStarted == false && forcedPlay == true) {
radioStarted = true;
+ console.log("calling forced");
playRadio();
}
}
@@ -198,6 +228,11 @@ function pushNewTracks(forcedPlay) {
}
function playRadio() {
+ console.log("play song!");
+
+ tuningRadio = false;
+
+ $("#tuning .tuning").css("display", "none");
$("#nowplaying .player").css("display", "block");
$("#artist-info .content").css("display", "block");
@@ -216,11 +251,10 @@ function playRadio() {
});
$.get("http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=" + trackInfo.artist + "&api_key=" + lastfm_api_key, function (data) {
- console.log(data);
var artist_img = $("lfm > artist > image:last", data).text();
$("#nowplaying").css({
- backgroundImage: "url('" + artist_img + "')"
+ backgroundImage: "url(" + artist_img + ")"
});
$("#artist-image").attr("src", artist_img);
@@ -235,8 +269,11 @@ function playRadio() {
}
function initPlayer() {
+ console.log("init player");
+
player.observe(models.EVENT.CHANGE, function(event) {
if (event.data.curtrack == true && player.position == null) {
+ console.log("to next song");
playRadio();
}
});
@@ -268,6 +305,7 @@ $(document).ready(function () {
initPlayer();
$("#next").click(function () {
+ console.log("next...");
playRadio();
});
View
@@ -70,8 +70,18 @@ <h1>Real Last.fm Radio</h1>
<div id="next"></div>
</div>
+ <div id="tuning">
+ <div class="click2tune">
+ Choose a station to begin listening.
+ </div>
+ <div class="tuning">
+ Tuning radio...
+ </div>
+ </div>
+
<div class="gradientUp"></div>
<div class="gradientDown"></div>
+ <img src="" id="bg-image" />
</div>
<div id="artist-info">

0 comments on commit 7f37ccd

Please sign in to comment.