fix: last version fix

This commit is contained in:
2026-06-30 13:40:40 +03:30
parent 7b5c23c3e1
commit b97ce2dcef
+8 -1
View File
@@ -104,7 +104,14 @@ public function index(Request $request)
$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