Browse Source

Fix Headphones calendar - update lang

causefx 8 years ago
parent
commit
8674adc374
9 changed files with 42 additions and 2 deletions
  1. 13 1
      functions.php
  2. 1 1
      homepage.php
  3. 4 0
      lang/de.ini
  4. 4 0
      lang/en.ini
  5. 4 0
      lang/es.ini
  6. 4 0
      lang/fr.ini
  7. 4 0
      lang/it.ini
  8. 4 0
      lang/nl.ini
  9. 4 0
      lang/pl.ini

+ 13 - 1
functions.php

@@ -2905,7 +2905,7 @@ function getHeadphonesCalendar($url, $key, $list){
     $gotCalendar = "";
 	if (is_array($api) || is_object($api)){
 		foreach($api AS $child) {
-			if($child['Status'] == "Wanted"){
+			if($child['Status'] == "Wanted" && $list == "getWanted"){
 				$i++;
 				$albumName = addslashes($child['AlbumTitle']);
 				$albumArtist = htmlentities($child['ArtistName'], ENT_QUOTES);
@@ -2921,6 +2921,18 @@ function getHeadphonesCalendar($url, $key, $list){
 
 				$gotCalendar .= "{ title: \"$albumArtist - $albumName\", start: \"$albumDate\", className: \"$albumStatusColor\", imagetype: \"music\", url: \"https://musicbrainz.org/release-group/$albumID\" }, \n";
 			}
+			if($child['Status'] == "Processed" && $list == "getHistory"){
+				$i++;
+				$albumName = addslashes($child['Title']);
+				$albumDate = $child['DateAdded'];
+				$albumID = $child['AlbumID'];
+				$albumDate = strtotime($albumDate);
+				$albumDate = date("Y-m-d", $albumDate);
+				$albumStatusColor = "green-bg";
+				if (new DateTime() < new DateTime($albumDate)) {  $notReleased = "true"; }else{ $notReleased = "false"; }
+
+				$gotCalendar .= "{ title: \"$albumName\", start: \"$albumDate\", className: \"$albumStatusColor\", imagetype: \"music\", url: \"https://musicbrainz.org/release-group/$albumID\" }, \n";
+			}
 		}
     	if ($i != 0){ return $gotCalendar; }
 	}else{

+ 1 - 1
homepage.php

@@ -961,7 +961,7 @@ if (HEADPHONESURL != "" && qualifyUser(HEADPHONESHOMEAUTH)){
                     deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
                         refreshPreloader.remove();
                     });
-                },200);
+                },300);
                 var check = $(this).attr("class");
                 var ID = check.split("--")[1];
                 if (~check.indexOf("tvID")){

+ 4 - 0
lang/de.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/en.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/es.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/fr.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/it.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/nl.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/pl.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"