Browse Source

Simulate the old GUI flag

Zachary Kotlarek 12 years ago
parent
commit
aec92c560e
1 changed files with 13 additions and 0 deletions
  1. 13 0
      dmx/state.pl

+ 13 - 0
dmx/state.pl

@@ -47,6 +47,7 @@ if ($HOST =~ /loki/i) {
 
 	# Plex
 	$MON_FILES{'PLEX'}    = 'NONE';
+	$MON_FILES{'GUI'}     = 'NONE';
 	$MON_FILES{'PLAYING'} = 'PLAYING';
 
 	# RiffTrax
@@ -418,6 +419,18 @@ while (1) {
 		}
 	}
 
+	# Simulate the old GUI indicator
+	{
+	my $gui = 0;
+		if (exists($files{'PLAYING_WINDOW'}) && $files{'PLAYING_WINDOW'}->{'value'} ne 'Fullscreen video') {
+			$gui = 1;
+		}
+		if ($files{'GUI'}->{'value'} != $gui) {
+			$files{'GUI'}->{'mtime'} = time();
+		}
+		$files{'GUI'}->{'value'} = $gui;
+	}
+
 	# Ignore the MOTION file if NO_MOTION is set
 	if (exists($files{'NO_MOTION'}) && $files{'NO_MOTION'}->{'value'}) {
 		if (exists($files{'MOTION'})) {