fix: last version fix
This commit is contained in:
@@ -104,7 +104,14 @@ public function index(Request $request)
|
|||||||
$query->limit(max(1, (int) $request->input('count')));
|
$query->limit(max(1, (int) $request->input('count')));
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json($query->get());
|
$media = $query->get();
|
||||||
|
|
||||||
|
// Old app expects a non-null external_url; fall back to the playable url.
|
||||||
|
$media->each(function ($m) {
|
||||||
|
$m->external_url = $m->external_url ?: ($m->url ?? '');
|
||||||
|
});
|
||||||
|
|
||||||
|
return response()->json($media);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply the category / subcategory / duration / tag / search filters shared by
|
// Apply the category / subcategory / duration / tag / search filters shared by
|
||||||
|
|||||||
Reference in New Issue
Block a user