From edc42ea35d05b536c2bebfcb78d1bf6007445e85 Mon Sep 17 00:00:00 2001 From: lolcat Date: Wed, 13 Sep 2023 09:01:23 -0400 Subject: added autocomplete --- scraper/sc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'scraper/sc.php') diff --git a/scraper/sc.php b/scraper/sc.php index f297723..1774c20 100644 --- a/scraper/sc.php +++ b/scraper/sc.php @@ -288,7 +288,7 @@ class sc{ if(count($description) != 0){ - $description = $count . " songs. " . implode(", ", $description); + $description = trim($count . " songs. " . implode(", ", $description)); } if( @@ -320,7 +320,7 @@ class sc{ $out["playlist"][] = [ "title" => $item["title"], - "description" => $description, + "description" => $this->limitstrlen($description), "author" => [ "name" => $item["user"]["username"], "url" => $item["user"]["permalink_url"], @@ -385,13 +385,14 @@ class sc{ "\n", wordwrap( str_replace( - "\n", + ["\n\r", "\r\n", "\n", "\r"], " ", $text ), 300, "\n" - ) + ), + 2 )[0]; } } -- cgit v1.2.3