Merge branch 'Nachtzuster:main' into patch-5
This commit is contained in:
@@ -72,7 +72,7 @@ Currently listening in these countries . . . that I know of . . .
|
|||||||
- Colombia
|
- Colombia
|
||||||
- Estonia
|
- Estonia
|
||||||
- Tasmania
|
- Tasmania
|
||||||
- Luxembourgh
|
- Luxembourg
|
||||||
- Crete
|
- Crete
|
||||||
- Rwanda
|
- Rwanda
|
||||||
- Oman
|
- Oman
|
||||||
|
|||||||
@@ -103,6 +103,20 @@ function get_com_en_name($sci_name) {
|
|||||||
return $engname;
|
return $engname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_sci_name($com_name) {
|
||||||
|
if (!isset($_labels)) {
|
||||||
|
$_labels = file(get_home() . "/BirdNET-Pi/model/labels.txt");
|
||||||
|
}
|
||||||
|
$sciname = null;
|
||||||
|
foreach ($_labels as $label) {
|
||||||
|
if (strpos($label, $com_name) !== false) {
|
||||||
|
$sciname = trim(explode("_", $label)[0]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $sciname;
|
||||||
|
}
|
||||||
|
|
||||||
define('DB', './scripts/flickr.db');
|
define('DB', './scripts/flickr.db');
|
||||||
|
|
||||||
class Flickr {
|
class Flickr {
|
||||||
|
|||||||
+9
-2
@@ -558,9 +558,12 @@ while ($result2->fetchArray(SQLITE3_ASSOC)) {
|
|||||||
$num_rows++;
|
$num_rows++;
|
||||||
}
|
}
|
||||||
$result2->reset(); // reset the pointer to the beginning of the result set
|
$result2->reset(); // reset the pointer to the beginning of the result set
|
||||||
|
$sciname = get_sci_name($name);
|
||||||
|
$info_url = get_info_url($sciname);
|
||||||
|
$url = $info_url['URL'];
|
||||||
echo "<table>
|
echo "<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>$name</th>
|
<th><a href=\"$url\" target=\"top\">$name</a></th>
|
||||||
</tr>";
|
</tr>";
|
||||||
$iter=0;
|
$iter=0;
|
||||||
while($results=$result2->fetchArray(SQLITE3_ASSOC))
|
while($results=$result2->fetchArray(SQLITE3_ASSOC))
|
||||||
@@ -641,9 +644,13 @@ echo "<table>
|
|||||||
$statement2 = $db->prepare("SELECT * FROM detections where File_name == \"$name\" ORDER BY Date DESC, Time DESC");
|
$statement2 = $db->prepare("SELECT * FROM detections where File_name == \"$name\" ORDER BY Date DESC, Time DESC");
|
||||||
ensure_db_ok($statement2);
|
ensure_db_ok($statement2);
|
||||||
$result2 = $statement2->execute();
|
$result2 = $statement2->execute();
|
||||||
|
$comname = str_replace("_", " ", strtok($name, '-'));
|
||||||
|
$sciname = get_sci_name($comname);
|
||||||
|
$info_url = get_info_url($sciname);
|
||||||
|
$url = $info_url['URL'];
|
||||||
echo "<table>
|
echo "<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>$name</th>
|
<th><a href=\"$url\" target=\"top\">$name</a></th>
|
||||||
</tr>";
|
</tr>";
|
||||||
while($results=$result2->fetchArray(SQLITE3_ASSOC))
|
while($results=$result2->fetchArray(SQLITE3_ASSOC))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ window.onload = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
// if user agent includes iPhone or Mac use legacy mode
|
// if user agent includes iPhone or Mac use legacy mode
|
||||||
if(((window.navigator.userAgent.includes("iPhone") || window.navigator.userAgent.includes("Mac")) && !window.navigator.userAgent.includes("Chrome")) || legacy == true) {
|
if(window.navigator.userAgent.includes("iPhone") || legacy == true) {
|
||||||
document.getElementById("spectrogramimage").style.display="";
|
document.getElementById("spectrogramimage").style.display="";
|
||||||
document.body.querySelector('canvas').remove();
|
document.body.querySelector('canvas').remove();
|
||||||
document.getElementById('player').remove();
|
document.getElementById('player').remove();
|
||||||
|
|||||||
Reference in New Issue
Block a user