summaryrefslogtreecommitdiff
path: root/scraper/sc.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2023-09-13 09:01:23 -0400
committerlolcat <will@lolcat.ca>2023-09-13 09:01:23 -0400
commitedc42ea35d05b536c2bebfcb78d1bf6007445e85 (patch)
tree425bef04d71fb8b6585906355a866d1f2f5c321b /scraper/sc.php
parent71a61304b0072694174af559368a10b69d1e21e4 (diff)
added autocomplete
Diffstat (limited to 'scraper/sc.php')
-rw-r--r--scraper/sc.php9
1 files changed, 5 insertions, 4 deletions
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];
}
}