Parcourir la source

Merge pull request #537 from causefx/cero-dev

Fix headphones no dates
causefx il y a 8 ans
Parent
commit
6a4f9d100d
2 fichiers modifiés avec 2 ajouts et 5 suppressions
  1. 1 2
      functions.php
  2. 1 3
      homepage.php

+ 1 - 2
functions.php

@@ -2906,7 +2906,7 @@ function getHeadphonesCalendar($url, $key, $list){
     $gotCalendar = "";
     $gotCalendar = "";
 	if (is_array($api) || is_object($api)){
 	if (is_array($api) || is_object($api)){
 		foreach($api AS $child) {
 		foreach($api AS $child) {
-			if($child['Status'] == "Wanted" && $list == "getWanted"){
+			if($child['Status'] == "Wanted" && $list == "getWanted" && $child['AlbumTitle']){
 				$i++;
 				$i++;
 				$albumName = addslashes($child['AlbumTitle']);
 				$albumName = addslashes($child['AlbumTitle']);
 				$albumArtist = htmlentities($child['ArtistName'], ENT_QUOTES);
 				$albumArtist = htmlentities($child['ArtistName'], ENT_QUOTES);
@@ -2927,7 +2927,6 @@ function getHeadphonesCalendar($url, $key, $list){
 				$find = array('_','[', ']', '\n');
 				$find = array('_','[', ']', '\n');
 				$replace = array(' ','(', ')', ' ');
 				$replace = array(' ','(', ')', ' ');
 				$albumName = addslashes(str_replace($find,$replace,$child['FolderName']));
 				$albumName = addslashes(str_replace($find,$replace,$child['FolderName']));
-				//$albumName = addslashes($child['Title']);
 				$albumDate = $child['DateAdded'];
 				$albumDate = $child['DateAdded'];
 				$albumID = $child['AlbumID'];
 				$albumID = $child['AlbumID'];
 				$albumDate = strtotime($albumDate);
 				$albumDate = strtotime($albumDate);

+ 1 - 3
homepage.php

@@ -739,8 +739,6 @@ $endDate = date('Y-m-d',strtotime("+".CALENDARENDDAY." days"));
                 mousescrollstep: 60
                 mousescrollstep: 60
             });
             });
 
 
-            // check if browser support HTML5 local storage
-			
             <?php if((NZBGETURL != "" && qualifyUser(NZBGETHOMEAUTH)) || (SABNZBDURL != "" && qualifyUser(SABNZBDHOMEAUTH))){ ?>
             <?php if((NZBGETURL != "" && qualifyUser(NZBGETHOMEAUTH)) || (SABNZBDURL != "" && qualifyUser(SABNZBDHOMEAUTH))){ ?>
             var queueRefresh = <?php echo DOWNLOADREFRESH; ?>;
             var queueRefresh = <?php echo DOWNLOADREFRESH; ?>;
             var historyRefresh = <?php echo HISTORYREFRESH; ?>; // This really doesn't need to happen that often
             var historyRefresh = <?php echo HISTORYREFRESH; ?>; // This really doesn't need to happen that often
@@ -840,7 +838,7 @@ if (HEADPHONESURL != "" && qualifyUser(HEADPHONESHOMEAUTH)){
 
 
                     editable: false,
                     editable: false,
                     droppable: false,
                     droppable: false,
-					               timeFormat: '<?php echo CALTIMEFORMAT; ?>',
+					timeFormat: '<?php echo CALTIMEFORMAT; ?>',
                 });
                 });
             });
             });
             $('#imagetype_selector').on('change',function(){
             $('#imagetype_selector').on('change',function(){