Browse Source

my fault - had a typo

causefx 8 years ago
parent
commit
9a7dca9fb1
2 changed files with 6 additions and 5 deletions
  1. 6 1
      api/functions/homepage-connect-functions.php
  2. 0 4
      js/functions.js

+ 6 - 1
api/functions/homepage-connect-functions.php

@@ -1111,7 +1111,7 @@ function ombiAction($id, $action, $type) {
     		case 'tv':
     			$type = 'tv';
                 $add = array(
-                    'tvdDbId' => $id,
+                    'tvDbId' => $id,
                     'requestAll' => true,
                     'latestSeason' => true,
                     'firstSeason' => true
@@ -1256,6 +1256,11 @@ function getOmbiRequests($type = "both"){
             			}
             		}
             	}
+                //sort here
+                usort($requests, function ($item1, $item2) {
+        			if ($item1['request_date'] == $item2['request_date']) return 0;
+        			return $item1['request_date'] > $item2['request_date'] ? -1 : 1;
+        		});
             }
         }catch( Requests_Exception $e ) {
             writeLog('error', 'OMBI Connect Function - Error: '.$e->getMessage(), 'SYSTEM');

+ 0 - 4
js/functions.js

@@ -2409,11 +2409,9 @@ function processRequest(id,type){
 		requestNewID(id).success(function(data) {
 			var newID = data.tvdb_id;
 			ombiActions(newID,'add',type);
-			console.log(id,data.tvdb_id,type);
 		}).fail(function(xhr) {
 			console.error("Organizr Function: TMDB Connection Failed");
 		});
-		console.log('tv')
 	}else{
 		ombiActions(id,'add',type);
 	}
@@ -2422,8 +2420,6 @@ function processRequest(id,type){
 function doneTyping () {
 	var title = $('#request-input').val();
 	requestSearch(title).success(function(data) {
-		//var json = JSON.parse(data);
-		console.log(data.results);
 		$('#request-results').html(buildRequestResult(data.results));
 	}).fail(function(xhr) {
 		console.error("Organizr Function: TMDB Connection Failed");