Skip to content

A live bird collage card for your Home Assistant dashboard.

only show purge excluded recordings

ehpersonal3813e79f31e833
diff --git a/scripts/play.php b/scripts/play.php
index 9d7f923c..8f4a3a6a 100644
--- a/scripts/play.php
+++ b/scripts/play.php
@@ -282,12 +282,15 @@ if(isset($_GET['species'])){ ?>
<form action="" method="GET">
<input type="hidden" name="view" value="Recordings">
<input type="hidden" name="species" value="<?php echo $_GET['species']; ?>">
- <button <?php if(!isset($_GET['sort']) || $_GET['sort'] == "date"){ echo "style='background:#9fe29b !important;'"; }?> class="sortbutton" type="submit" name="sort" value="date">
+ <input type="hidden" name="sort" value="<?php echo $_GET['sort']; ?>">
+ <button <?php if(!isset($_GET['sort']) || $_GET['sort'] == "" || $_GET['sort'] == "date"){ echo "style='background:#9fe29b !important;'"; }?> class="sortbutton" type="submit" name="sort" value="date">
<img width=35px src="images/sort_date.svg" title="Sort by date" alt="Sort by date">
</button>
<button <?php if(isset($_GET['sort']) && $_GET['sort'] == "confidence"){ echo "style='background:#9fe29b !important;'"; }?> class="sortbutton" type="submit" name="sort" value="confidence">
<img src="images/sort_occ.svg" title="Sort by confidence" alt="Sort by confidence">
- </button>
+ </button><br>
+ <input style="margin-top:10px" <?php if(isset($_GET['only_excluded'])){ echo "checked"; }?> type="checkbox" name="only_excluded" onChange="submit()">
+ <label for="onlyverified">Only Show Purge Excluded</label>
</form>
</div>
<?php
@@ -338,6 +341,9 @@ echo "<table>
if(!file_exists($home."/BirdSongs/Extracted/".$filename)) {
continue;
}
+ if(!in_array($filename_formatted, $disk_check_exclude_arr) && isset($_GET['only_excluded'])) {
+ continue;
+ }
$iter++;
if($config["FULL_DISK"] == "purge") {