Browse Source

Add some more info to calendar page

causefx 7 years ago
parent
commit
ea3ed475e2

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

@@ -1156,6 +1156,7 @@ function getCalendar()
 						$icalEvents[] = array(
 						$icalEvents[] = array(
 							'title' => $eventName,
 							'title' => $eventName,
 							'imagetype' => 'calendar-o text-warning text-custom-calendar ' . $extraClass,
 							'imagetype' => 'calendar-o text-warning text-custom-calendar ' . $extraClass,
+							'imagetypeFilter' => 'ical',
 							'className' => 'bg-calendar calendar-item bg-custom-calendar',
 							'className' => 'bg-calendar calendar-item bg-custom-calendar',
 							'start' => $startDate,
 							'start' => $startDate,
 							'end' => $endDate
 							'end' => $endDate
@@ -1401,6 +1402,8 @@ function getRadarrCalendar($array, $number, $url)
 				"videoCodec" => $child["hasFile"] ? @$child['movieFile']['mediaInfo']['videoCodec'] : "unknown",
 				"videoCodec" => $child["hasFile"] ? @$child['movieFile']['mediaInfo']['videoCodec'] : "unknown",
 				"size" => $child["hasFile"] ? @$child['movieFile']['size'] : "unknown",
 				"size" => $child["hasFile"] ? @$child['movieFile']['size'] : "unknown",
 				"genres" => $child['genres'],
 				"genres" => $child['genres'],
+				"year" => isset($child['year']) ? $child['year'] : '',
+				"studio" => isset($child['studio']) ? $child['studio'] : '',
 			);
 			);
 			array_push($gotCalendar, array(
 			array_push($gotCalendar, array(
 				"id" => "Radarr-" . $number . "-" . $i,
 				"id" => "Radarr-" . $number . "-" . $i,
@@ -1484,6 +1487,8 @@ function getCouchCalendar($array, $number)
 				"audioCodec" => "",
 				"audioCodec" => "",
 				"videoCodec" => "",
 				"videoCodec" => "",
 				"genres" => $child['info']['genres'],
 				"genres" => $child['info']['genres'],
+				"year" => isset($child['info']['year']) ? $child['info']['year'] : '',
+				"studio" => isset($child['info']['year']) ? $child['info']['year'] : '',
 			);
 			);
 			array_push($gotCalendar, array(
 			array_push($gotCalendar, array(
 				"id" => "CouchPotato-" . $number . "-" . $i,
 				"id" => "CouchPotato-" . $number . "-" . $i,

+ 21 - 0
plugins/bower_components/calendar/dist/fullcalendar.js

@@ -6670,6 +6670,27 @@ DayGrid.mixin({
 			'<span class="fc-title">' +
 			'<span class="fc-title">' +
 				(htmlEscape(event.title || '') || '&nbsp;') + // we always want one line of height
 				(htmlEscape(event.title || '') || '&nbsp;') + // we always want one line of height
 			'</span>';
 			'</span>';
+		switch(event.imagetypeFilter){
+            case 'tv':
+                titleHtml = titleHtml + '<br/><small class="fc-title m-l-5 hidden-xs">' +
+                    (htmlEscape(event.details.bottomTitle || '') || '&nbsp;') + // we always want one line of height
+                    '</small>';
+                break;
+            case 'music':
+                titleHtml = titleHtml + '<br/><small class="fc-title m-l-5 hidden-xs">' +
+                    (htmlEscape(event.details.topTitle || '') || '&nbsp;') + // we always want one line of height
+                    '</small>';
+                break;
+            case 'film':
+                titleHtml = titleHtml + '<br/><small class="fc-title m-l-5 hidden-xs">' +
+                    (htmlEscape(event.details.studio || '') || '&nbsp;') + // we always want one line of height
+                    '</small>';
+                break;
+            default:
+                titleHtml = titleHtml + '<br/><small class="fc-title m-l-5 hidden-xs">' +
+                    (htmlEscape('' || '') || '&nbsp;') + // we always want one line of height
+                    '</small>';
+        }
         imageHtml =
         imageHtml =
 			'<span class="fc-status '+ event.bgColor +'"></span><span class="fc-image"><i class="fa fa-' +
 			'<span class="fc-status '+ event.bgColor +'"></span><span class="fc-image"><i class="fa fa-' +
 				(htmlEscape(event.imagetype || '') || '&nbsp;') + // we always want one line of height
 				(htmlEscape(event.imagetype || '') || '&nbsp;') + // we always want one line of height