Browse Source

more Ombi work...

causefx 8 years ago
parent
commit
bac1a11095
5 changed files with 387 additions and 20 deletions
  1. 140 0
      api/functions/homepage-connect-functions.php
  2. 23 2
      api/functions/homepage-functions.php
  3. 6 0
      css/organizr.css
  4. 34 4
      js/custom.js
  5. 184 14
      js/functions.js

+ 140 - 0
api/functions/homepage-connect-functions.php

@@ -41,6 +41,9 @@ function homepageConnect($array){
         case 'getCalendar':
             return getCalendar();
             break;
+        case 'getRequests':
+            return getOmbiRequests();
+            break;
         default:
             # code...
             break;
@@ -1089,3 +1092,140 @@ function getSickrageCalendarHistory($array,$number){
     }
     if ($i != 0){ return $gotCalendar; }
 }
+function ombiAction($id, $action, $type) {
+    if($GLOBALS['homepageOmbiEnabled'] && !empty($GLOBALS['ombiURL']) && !empty($GLOBALS['ombiToken']) && qualifyRequest($GLOBALS['homepageOmbiAuth'])){
+        $url = qualifyURL($GLOBALS['ombiURL']);
+        $headers = array(
+    		"Accept" => "application/json",
+    		"Content-Type" => "application/json",
+    		"Apikey" => $GLOBALS['ombiToken']
+    	);
+    	$data = array(
+    		'id' => $id,
+    	);
+    	switch ($type) {
+    		case 'season':
+    		case 'tv':
+    			$type = 'tv';
+    			break;
+    		default:
+    			$type = 'movie';
+    			break;
+    	}
+        try{
+            $options = (localURL($url)) ? array('verify' => false ) : array();
+            switch ($action) {
+        		case 'approve':
+        			$response = Requests::post($url."/api/v1/Request/".$type."/approve", $headers, $data, $options);
+        			break;
+        		case 'available':
+    				$response = Requests::post($url."/api/v1/Request/".$type."/available", $headers, $data, $options);
+    				break;
+        		case 'unavailable':
+        			$url = Requests::post($url."/api/v1/Request/".$type."/unavailable", $headers, $data, $options);
+        			break;
+        		case 'deny':
+        			$response = Requests::post($url."/api/v1/Request/".$type."/deny", $headers, $data, $options);
+        			break;
+        		case 'delete':
+        			$response = Requests::delete($url."/api/v1/Request/".$type."/".$id, $headers, $options);
+        			break;
+        		default:
+        			# code...
+        			break;
+        	}
+            if($response->success){
+                $api['content'] = true;
+                return true;
+            }else{
+                $api['content'] = false;
+            }
+        }catch( Requests_Exception $e ) {
+            writeLog('error', 'OMBI Connect Function - Error: '.$e->getMessage(), 'SYSTEM');
+        };
+    }
+    return false;
+}
+function getOmbiRequests($type = "both"){
+    if($GLOBALS['homepageOmbiEnabled'] && !empty($GLOBALS['ombiURL']) && !empty($GLOBALS['ombiToken']) && qualifyRequest($GLOBALS['homepageOmbiAuth'])){
+        $url = qualifyURL($GLOBALS['ombiURL']);
+    	$headers = array(
+    		"Accept" => "application/json",
+    		"Apikey" => $GLOBALS['ombiToken'],
+    	);
+    	$requests = array();
+        try{
+            $options = (localURL($url)) ? array('verify' => false ) : array();
+            switch ($type) {
+        		case 'movie':
+        			$movie = Requests::get($url."/api/v1/Request/movie", $headers, $options);
+        			break;
+        		case 'tv':
+        			$tv = Requests::get($url."/api/v1/Request/tv", $headers, $options);
+        			break;
+
+        		default:
+        			$movie = Requests::get($url."/api/v1/Request/movie", $headers, $options);
+        			$tv = Requests::get($url."/api/v1/Request/tv", $headers, $options);
+        			break;
+        	}
+            if($movie->success || $tv->success){
+                if(isset($movie)){
+                    $movie = json_decode($movie->body, true);
+            		//$movie = array_reverse($movie);
+            		foreach ($movie as $key => $value) {
+            			$requests[] = array(
+                            'test' => $value,
+            				'id' => $value['theMovieDbId'],
+            				'title' => $value['title'],
+                            'overview' => $value['overview'],
+                            'poster' => (isset($value['posterPath']) && $value['posterPath'] !== '') ? 'https://image.tmdb.org/t/p/w300/'.$value['posterPath'] : '',
+            				'background' => (isset($value['background']) && $value['background'] !== '') ? 'https://image.tmdb.org/t/p/w1280/'.$value['background'] : '',
+            				'approved' => $value['approved'],
+            				'available' => $value['available'],
+            				'denied' => $value['denied'],
+            				'deniedReason' => $value['deniedReason'],
+            				'user' => $value['requestedUser']['userName'],
+            				'request_id' => $value['id'],
+            				'request_date' => $value['requestedDate'],
+            				'release_date' => $value['releaseDate'],
+            				'type' => 'movie',
+            				'icon' => 'mdi mdi-filmstrip',
+            				'color' => 'palette-Deep-Purple-900 bg white',
+            			);
+            		}
+            	}
+            	if(isset($tv) && (is_array($tv) || is_object($tv))){
+                    $tv = json_decode($tv->body, true);
+            		foreach ($tv as $key => $value) {
+            			if(is_array($value['childRequests'][0])){
+            				$requests[] = array(
+                                'test' => $value,
+            					'id' => $value['tvDbId'],
+                                'title' => $value['title'],
+            					'overview' => $value['overview'],
+                                'poster' => $value['posterPath'],
+            					'background' => (isset($value['background']) && $value['background'] !== '') ? 'https://image.tmdb.org/t/p/w1280/'.$value['background'] : '',
+            					'approved' => $value['childRequests'][0]['approved'],
+            					'available' => $value['childRequests'][0]['available'],
+            					'denied' => $value['childRequests'][0]['denied'],
+            					'deniedReason' => $value['childRequests'][0]['deniedReason'],
+            					'user' => $value['childRequests'][0]['requestedUser']['userName'],
+            					'request_id' => $value['id'],
+            					'request_date' => $value['childRequests'][0]['requestedDate'],
+            					'release_date' => $value['releaseDate'],
+            					'type' => 'tv',
+            					'icon' => 'mdi mdi-television',
+            					'color' => 'grayish-blue-bg',
+            				);
+            			}
+            		}
+            	}
+            }
+        }catch( Requests_Exception $e ) {
+            writeLog('error', 'OMBI Connect Function - Error: '.$e->getMessage(), 'SYSTEM');
+        };
+    }
+    $api['content'] = isset($requests) ? $requests : false;
+    return $api;
+}

+ 23 - 2
api/functions/homepage-functions.php

@@ -40,11 +40,13 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrdercustomhtml':
 			if($GLOBALS['homepagCustomHTMLoneEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLoneAuth']) ){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Custom HTML...</h2></div>';
 				$item .= ($GLOBALS['customHTMLone'] !== '') ? $GLOBALS['customHTMLone'] : '';
 			}
 			break;
 		case 'homepageOrdercustomhtmlTwo':
 			if($GLOBALS['homepagCustomHTMLtwoEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLtwoAuth']) ){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Custom HTML...</h2></div>';
 				$item .= ($GLOBALS['customHTMLtwo'] !== '') ? $GLOBALS['customHTMLtwo'] : '';
 			}
 			break;
@@ -59,6 +61,7 @@ function buildHomepageItem($homepageItem){
 			break;
         case 'homepageOrderqBittorrent':
             if($GLOBALS['homepageqBittorrentEnabled']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
                 $item .= '
                 <script>
                 // homepageOrderqBittorrent
@@ -70,6 +73,7 @@ function buildHomepageItem($homepageItem){
             break;
 		case 'homepageOrderdeluge':
 			if($GLOBALS['homepageDelugeEnabled']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
 				$item .= '
 				<script>
 				// Deluge
@@ -81,6 +85,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrdertransmission':
 			if($GLOBALS['homepageTransmissionEnabled']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
 				$item .= '
 				<script>
 				// Transmission
@@ -92,6 +97,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrdernzbget':
 			if($GLOBALS['homepageNzbgetEnabled']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
 				$item .= '
 				<script>
 				// NZBGet
@@ -103,6 +109,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrdersabnzbd':
 			if($GLOBALS['homepageSabnzbdEnabled']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
 				$item .= '
 				<script>
 				// SabNZBd
@@ -114,6 +121,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrderplexnowplaying':
 			if($GLOBALS['homepagePlexStreams']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
 				$item .= '
 				<script>
 				// Plex Stream
@@ -125,6 +133,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrderplexrecent':
 			if($GLOBALS['homepagePlexRecent']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
 				$item .= '
 				<script>
 				// Plex Recent
@@ -136,6 +145,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrderplexplaylist':
 			if($GLOBALS['homepagePlexPlaylist']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Playlists...</h2></div>';
 				$item .= '
 				<script>
 				// Plex Playlist
@@ -147,6 +157,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrderembynowplaying':
 			if($GLOBALS['homepageEmbyStreams']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
 				$item .= '
 				<script>
 				// Emby Stream
@@ -158,6 +169,7 @@ function buildHomepageItem($homepageItem){
 			break;
 		case 'homepageOrderembyrecent':
 			if($GLOBALS['homepageEmbyRecent']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
 				$item .= '
 				<script>
 				// Emby Recent
@@ -168,11 +180,20 @@ function buildHomepageItem($homepageItem){
 			}
 			break;
 		case 'homepageOrderombi':
-
+			if($GLOBALS['homepageOmbiEnabled']){
+				$item .= '<div class="white-box  animated zoomIn"><h2 class="text-center" lang="en">Loading Requests...</h2></div>';
+				$item .= '
+				<script>
+				// Ombi Requests
+				homepageRequests("'.$GLOBALS['ombiRefresh'].'");
+				// End Ombi Requests
+				</script>
+				';
+			}
 			break;
 		case 'homepageOrdercalendar':
 			$item .= '
-			<div id="calendar" class="fc fc-ltr"></div>
+			<div id="calendar" class="fc fc-ltr animated zoomIn"></div>
 			<script>
 			// Calendar
 			homepageCalendar("'.$GLOBALS['calendarRefresh'].'");

+ 6 - 0
css/organizr.css

@@ -262,3 +262,9 @@ background: #2cabe3;
   	display: inline !important;
   }
 }
+.loop-animation {
+	animation-iteration-count: infinite;
+	-webkit-animation-iteration-count: infinite;
+	-moz-animation-iteration-count: infinite;
+  -o-animation-iteration-count: infinite;
+}

+ 34 - 4
js/custom.js

@@ -1451,7 +1451,10 @@ $(document).on("click", ".recent-filter li>a", function () {
         $('.'+type+'-recent').find('.recent-item').parent().removeClass('hidden');
         $('.'+type+'-recent').find('.recent-item:not(.'+ filter + ')').parent().addClass('hidden');
     }
-
+    var owl = $('.'+type+'-recent');
+    owl.owlCarousel();
+    owl.trigger('refresh.owl.carousel');
+    owl.trigger('to.owl.carousel',0);
 });
 //playlist filter
 $(document).on("click", ".playlist-filter li>a", function () {
@@ -1495,6 +1498,11 @@ $(document).on("click", ".openTab", function(e) {
         window.open(source, '_blank');
     }
 });
+//request click
+$(document).on("click", ".request-item", function(e) {
+    var target = $(this).attr('data-target');
+    $('#link-'+target).trigger('click');
+});
 // metadata start
 $(document).on("click", ".metadata-get", function(e) {
     $("#preloader").fadeIn();
@@ -1589,8 +1597,8 @@ $(document).on("click", ".downloader", function(e) {
 });
 // purge log
 $(document).on("click", ".purgeLog", function () {
-var log = $('.swapLog.active').attr('data-name');
-alert('This action is not set yet - but this would have purged the '+log+' log');
+    var log = $('.swapLog.active').attr('data-name');
+    alert('This action is not set yet - but this would have purged the '+log+' log');
 });
 //Show Passowrd
 $(document).on("click", ".showPassword", function () {
@@ -1602,7 +1610,6 @@ $(document).on("click", ".showPassword", function () {
     }
     $(this).find('.passwordToggle').toggleClass('fa-eye').toggleClass('fa-eye-slash');
 });
-
 // calendar popups
 $(document).on('click', "a[class*=ID-]", function(){
     //$("#preloader").fadeIn();
@@ -1613,6 +1620,29 @@ $(document).on('click', "a[class*=ID-]", function(){
     //$("#preloader").fadeOut();
     myLazyLoad.update();
 });
+// request filter
+$(document).on("change", ".filter-request-input", function () {
+    $('.request-item').parent().removeClass('hidden');
+    var badArray = [];
+    $('.filter-request-input').each(function () {
+        var value = $(this).prop('checked');
+        var filter = $(this).attr('data-filter');
+        if(value == false){
+            badArray.push('.'+filter);
+        }
+    });
+    $('.request-item').each(function () {
+        var element = $(this);
+        var string = badArray.join(', ');
+        if(element.is(string)){
+            element.parent().addClass('hidden');
+        }
+    });
+    var owl = $('.request-items');
+    owl.owlCarousel();
+    owl.trigger('refresh.owl.carousel');
+    owl.trigger('to.owl.carousel',0);
+});
 /* ===== Open-Close Right Sidebar ===== */
 
 $(document).on("click", ".right-side-toggle", function () {

+ 184 - 14
js/functions.js

@@ -2085,19 +2085,67 @@ function buildPlaylistItem(array, type, extra=null){
 				`;
 			}
 		}
-
-
-
 	});
 	return items;
 }
+function buildRequestItem(array, extra=null){
+	var items = '';
+	$.each(array, function(i,v) {
+			if(extra == null){
+				var bg = (v.background.includes('.')) ? v.background : 'plugins/images/cache/no-np.png';
+				//Set Status
+				var status = (v.approved) ? '<span class="badge bg-org m-r-10" lang="en">Approved</span>' : '<span class="badge bg-danger m-r-10" lang="en">Unapproved</span>';
+				status += (v.available) ? '<span class="badge bg-org m-r-10" lang="en">Available</span>' : '<span class="badge bg-danger m-r-10" lang="en">Unavailable</span>';
+				//Set Class
+				var className = (v.approved) ? 'request-approved' : 'request-unapproved';
+				className += (v.available) ? ' request-available' : ' request-unavailable';
+				items += `
+				<div class="item lazyload recent-poster request-item request-`+v.type+` `+className+` mouse" data-target="request-`+v.id+`" data-src="`+v.poster+`">
+					<span class="elip recent-title">`+v.title+`</span>
+					<div id="request-`+v.id+`" class="white-popup mfp-with-anim mfp-hide">
+						<div class="col-md-8 col-md-offset-2">
+							<div class="white-box m-b-0">
+								<div class="user-bg lazyload" data-src="`+bg+`">
+									<div class="col-xs-2 p-10"></div>
+									<div class="col-xs-10">
+										<h2 class="m-b-0 font-medium pull-right text-right">
+											`+v.title+`<br>
+										</h2>
+									</div>
+									<div class="genre-list p-10">`+status+`</div>
+								</div>
+							</div>
+							<div class="panel panel-info p-b-0 p-t-0">
+								<div class="panel-body p-b-0 p-t-0 m-b-0">
+									<div class="p-20 text-center">
+										<p class="">`+v.overview+`</p>
+									</div>
+									<div class="row">
+										<div class="col-lg-12">
+											<div class="owl-carousel owl-theme metadata-actors p-b-10">asd</div>
+										</div>
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				`;
+			}else{
+				items += `
+				<a class="inline-popups hidden" id="link-request-`+v.id+`" href="#request-`+v.id+`" data-effect="mfp-zoom-out" ></a>
+				`;
+			}
+	});
+	return ((items !== '') || extra == null) ? items : '<h2 class="text-center">No items</h2>';
+}
 function buildStream(array, type){
 	var streams = (typeof array.content !== 'undefined') ? array.content.length : false;
 	return (streams) ? `
 	<div id="`+type+`Streams">
 		<div class="el-element-overlay">
 		    <div class="col-md-12">
-		        <h4 class="pull-left" lang="en">Active `+toUpper(type)+` Streams: </h4><h4 class="pull-left">&nbsp;<span class="label label-info m-l-5">`+streams+`</span></h4>
+		        <h4 class="pull-left" lang="en">Active `+toUpper(type)+` Streams: </h4><h4 class="pull-left">&nbsp;<span class="label label-info m-l-20">`+streams+`</span></h4>
 		        <hr>
 		    </div>
 			<div class="clearfix"></div>
@@ -2158,9 +2206,6 @@ function buildPlaylist(array, type){
 	var items = '';
 	if(playlist){
 		$.each(array.content, function(i,v) {
-
-
-
 			count ++;
 			first = (count == 1) ? v.title : first;
 			hidden = (count == 1) ? '' : ' hidden';
@@ -2172,21 +2217,16 @@ function buildPlaylist(array, type){
 			</div>
 			`+buildPlaylistItem(v, type, true)+`
 			`;
-
-
-
-
 		});
 		var builtDropdown = `
 		<button aria-expanded="false" data-toggle="dropdown" class="btn btn-info dropdown-toggle waves-effect waves-light" type="button">
-			<i class="fa fa-filter m-r-5"></i><span lang="en">Choose Playlist</span>
+			<i class="fa fa-filter m-r-5"></i><span class="caret"></span>
 		</button>
 		<ul role="menu" class="dropdown-menu playlist-filter">
 			`+dropdown+`
 		</ul>
 		`;
 	}
-
 	return (playlist) ? `
 	<div id="`+type+`Playlist" class="row">
         <div class="col-lg-12">
@@ -2206,6 +2246,69 @@ function buildPlaylist(array, type){
     </div>
 	` : '';
 }
+function buildRequest(array){
+	var requests = (typeof array.content !== 'undefined') ? true : false;
+	var dropdown = '';
+	if(requests){
+		var builtDropdown = `
+		<button aria-expanded="false" data-toggle="dropdown" class="btn btn-info dropdown-toggle waves-effect waves-light" type="button">
+			<i class="fa fa-filter m-r-5"></i><span class="caret"></span>
+		</button>
+		<div role="menu" class="dropdown-menu request-filter">
+			<div class="checkbox checkbox-success m-l-20">
+				<input id="request-filter-available" data-filter="request-available" class="filter-request-input" type="checkbox" checked="">
+				<label for="request-filter-available"> Available </label>
+			</div>
+			<div class="checkbox checkbox-danger m-l-20">
+				<input id="request-filter-unavailable" data-filter="request-unavailable"  class="filter-request-input" type="checkbox" checked="">
+				<label for="request-filter-unavailable"> Unavailable </label>
+			</div>
+			<div class="checkbox checkbox-info m-l-20">
+				<input id="request-filter-approved" data-filter="request-approved" class="filter-request-input" type="checkbox"  checked="">
+				<label for="request-filter-approved"> Approved </label>
+			</div>
+			<div class="checkbox checkbox-warning m-l-20">
+				<input id="request-filter-unapproved" data-filter="request-unapproved" class="filter-request-input" type="checkbox" checked="">
+				<label for="request-filter-unapproved"> Unapproved </label>
+			</div>
+			<div class="checkbox checkbox-purple m-l-20">
+				<input id="request-filter-denied" data-filter="request-denied" class="filter-request-input" type="checkbox" checked="">
+				<label for="request-filter-denied"> Denied </label>
+			</div>
+			<div class="checkbox checkbox-purple m-l-20">
+				<input id="request-filter-movie" data-filter="request-movie" class="filter-request-input" type="checkbox" checked="">
+				<label for="request-filter-movie"> Movie </label>
+			</div>
+			<div class="checkbox checkbox-purple m-l-20">
+				<input id="request-filter-tv" data-filter="request-tv" class="filter-request-input" type="checkbox" checked="">
+				<label for="request-filter-tv"> TV </label>
+			</div>
+		</div>
+
+		`;
+	}
+	return (requests) ? `
+	<div id="ombi-requests" class="row">
+        <div class="col-lg-12">
+            <div class="panel panel-default">
+                <div class="panel-heading bg-info p-t-10 p-b-10">
+					<span class="pull-left m-t-5"><img class="lazyload homepageImageTitle" data-src="plugins/images/tabs/ombi.png"> &nbsp; Requested Content</span>
+					<div class="btn-group pull-right">
+							`+builtDropdown+`
+	                </div>
+					<div class="clearfix"></div>
+				</div>
+                <div class="panel-wrapper p-b-0 collapse in">
+				<div class="owl-carousel owl-theme request-items">
+					`+buildRequestItem(array.content)+`
+				</div>
+				`+buildRequestItem(array.content, true)+`
+                </div>
+            </div>
+        </div>
+    </div>
+	` : '';
+}
 function buildDownloaderItem(array, source, type='none'){
 	var items = '';
 	switch (source) {
@@ -2534,7 +2637,7 @@ function buildDownloader(array, source){
 	            `+menu+`
 				<div class="clearfix"></div>
 	        </div>
-	        <div class="white-box p-0 m-b-0">
+	        <div class="white-box p-0">
 	            <div class="tab-content m-t-0">`+listing+`</div>
 	        </div>
 		</div>
@@ -2845,6 +2948,73 @@ function homepagePlaylist(type, timeout=30000){
 		console.error("Organizr Function: API Connection Failed");
 	});
 }
+function homepageRequests(timeout=30000){
+	ajaxloader(".content-wrap","in");
+	organizrAPI('POST','api/?v1/homepage/connect',{action:'getRequests'}).success(function(data) {
+		var response = JSON.parse(data);
+		document.getElementById('homepageOrderombi').innerHTML = '';
+		$('#homepageOrderombi').html(buildRequest(response.data));
+		$('.request-items').owlCarousel({
+    	    margin:40,
+    	    nav:false,
+    		autoplay:false,
+            dots:false,
+    	    responsive:{
+    	        0:{
+    	            items:2
+    	        },
+    	        500:{
+    	            items:3
+    	        },
+    	        650:{
+    	            items:4
+    	        },
+    	        800:{
+    	            items:5
+    	        },
+    	        950:{
+    	            items:6
+    	        },
+    	        1100:{
+    	            items:7
+    	        },
+    	        1250:{
+    	            items:8
+    	        },
+    	        1400:{
+    	            items:9
+    	        },
+    	        1550:{
+    	            items:10
+    	        },
+    	        1700:{
+    	            items:11
+    	        },
+    	        1850:{
+    	            items:12
+    	        },
+    	        2000:{
+    	            items:13
+    	        },
+    	        2150:{
+    	            items:14
+    	        },
+    	        2300:{
+    	            items:15
+    	        },
+    	        2450:{
+    	            items:16
+    	        }
+    	    }
+    	})
+	}).fail(function(xhr) {
+		console.error("Organizr Function: API Connection Failed");
+	});
+	ajaxloader();
+	setTimeout(function(){
+		homepageRequests(timeout);
+	}, timeout)
+}
 function homepageCalendar(timeout=30000){
 	//if(isHidden()){ return; }
 	ajaxloader(".content-wrap","in");