Feat : Add site_info to the title of the species accessed through Recordings or Unique species (#113)
* Add description to title * Update play.php * Add get_sci_name function * Implement get_sci_name * Removed as less relevant * Add info_site also when opening from filenames * Correct * Restore initial name * Need to use labels.txt for right language * Use $_labels in get_sci_name
This commit is contained in:
@@ -103,6 +103,20 @@ function get_com_en_name($sci_name) {
|
||||
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');
|
||||
|
||||
class Flickr {
|
||||
|
||||
Reference in New Issue
Block a user