Skip to content
Snippets Groups Projects
Commit a8e184df authored by Phil Höfer's avatar Phil Höfer
Browse files

Radiobrowser und Plugin-Übersetzung wieder eingefügt

parent 7889972d
No related branches found
No related tags found
2 merge requests!457Development,!452Radiobrowser und Plugin-Übersetzung wieder eingefügt
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
class Radiobrowser extends Searchengine
{
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
$result = preg_replace("/\r\n/si", "", $result);
try {
$content = json_decode($result);
} catch (\Exception $e) {
abort(500, "$result is not a valid json string");
}
if (!$content) {
return;
}
foreach ($content as $result) {
$title = $result->name;
$link = $result->homepage;
$anzeigeLink = $link;
$descr = "";
if ($result->tags != "") {
$descr .= "Tags: " . $result->tags;
}
if ($result->tags != "") {
if ($descr != "") {
$descr .= " - ";
}
$descr .= "Country: " . $result->country;
}
if ($result->tags != "") {
if ($descr != "") {
$descr .= " - ";
}
$descr .= "Language: " . $result->language;
}
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter,
false
);
}
}
}
<?php
return [
'description' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen',
];
<?xmlversion = "1.0"encoding = "UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>MetaGer</ShortName>
<Description>MetaGer: Sicher suchen &amp; finden, Privatsphäre schützen</Description>
<Description>{! trans('plugin.description') !}</Description>
<Contact>office@suma-ev.de</Contact>
<Image width="16" height="16" type="image/x-icon">{{ url('/favicon.ico') }}</Image>
<Url type="text/html" template="{{ $link }}&amp;eingabe={searchTerms}" method="{{$request}}"></Url>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment