diff --git a/scripts/overview.php b/scripts/overview.php index f8479da..49c0ccb 100644 --- a/scripts/overview.php +++ b/scripts/overview.php @@ -52,7 +52,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" && isse if($key !== false) { $image = $images[$key]; } else { - $flickrjson = json_decode(file_get_contents("https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=".$config["FLICKR_API_KEY"]."&text=".$comname."&license=2%2C3%2C4%2C5%2C6%2C9&sort=relevance&per_page=5&orientation=square,portrait&format=json&nojsoncallback=1"), true)["photos"]["photo"][0]; + $flickrjson = json_decode(file_get_contents("https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=".$config["FLICKR_API_KEY"]."&text=".str_replace("_", "%20", $comname)."&license=2%2C3%2C4%2C5%2C6%2C9&sort=relevance&per_page=5&orientation=square,portrait&format=json&media=photos&nojsoncallback=1"), true)["photos"]["photo"][0]; $modaltext = "https://flickr.com/photos/".$flickrjson["owner"]."/".$flickrjson["id"]; $authorlink = "https://flickr.com/people/".$flickrjson["owner"]; $imageurl = 'http://farm' .$flickrjson["farm"]. '.static.flickr.com/' .$flickrjson["server"]. '/' .$flickrjson["id"]. '_' .$flickrjson["secret"]. '.jpg'; diff --git a/scripts/play.php b/scripts/play.php index 370f53f..aca9574 100644 --- a/scripts/play.php +++ b/scripts/play.php @@ -260,7 +260,7 @@ if(isset($_GET['species'])){ ?> $sciname = preg_replace('/ /', '_', $results['Sci_Name']); $sci_name = $results['Sci_Name']; $time = $results['Time']; - $confidence = $results['Confidence']; + $confidence = round((float)round($results['Confidence'],2) * 100 ) . '%'; $filename_formatted = $date."/".$comname."/".$results['File_Name']; // file was deleted by disk check, no need to show the detection in recordings @@ -316,7 +316,7 @@ if(isset($_GET['filename'])){ $sciname = preg_replace('/ /', '_', $results['Sci_Name']); $sci_name = $results['Sci_Name']; $time = $results['Time']; - $confidence = $results['Confidence']; + $confidence = round((float)round($results['Confidence'],2) * 100 ) . '%'; $filename_formatted = $date."/".$comname."/".$results['File_Name']; // add disk_check_exclude.txt lines into an array for grepping diff --git a/scripts/stats.php b/scripts/stats.php index 65d532b..cfa2c47 100644 --- a/scripts/stats.php +++ b/scripts/stats.php @@ -150,7 +150,7 @@ function setModalText(iter, title, text, authorlink) { $iter=0; while($results=$result3->fetchArray(SQLITE3_ASSOC)){ $count = $results['COUNT(*)']; - $maxconf = round($results['MAX(Confidence)'],2); + $maxconf = round((float)round($results['MAX(Confidence)'],2) * 100 ) . '%'; $date = $results['Date']; $time = $results['Time']; $name = $results['Com_Name']; @@ -206,7 +206,7 @@ array_push($excludelines, $results['Date']."/".$comname."/".$results['File_Name'
Occurrences:
- Max Confidence:
+ Max Confidence:
Best Recording: