mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 10:42:12 +00:00
meta item hrefs added to Search
This commit is contained in:
parent
df8e186448
commit
0f5474acc9
1 changed files with 7 additions and 0 deletions
|
|
@ -14,6 +14,13 @@ const mapSearchState = (search) => {
|
|||
const selected = search.selected;
|
||||
const catalog_resources = search.catalog_resources.map((catalog_resource) => {
|
||||
catalog_resource.href = `#/discover/${encodeURIComponent(catalog_resource.request.base)}/${encodeURIComponent(catalog_resource.request.path.type_name)}/${encodeURIComponent(catalog_resource.request.path.id)}?${queryString}`;
|
||||
if (catalog_resource.content.type === 'Ready') {
|
||||
catalog_resource.content.content.map((metaItem) => {
|
||||
metaItem.href = `#/metadetails/${encodeURIComponent(metaItem.type)}/${encodeURIComponent(metaItem.id)}`;
|
||||
return metaItem;
|
||||
});
|
||||
}
|
||||
|
||||
return catalog_resource;
|
||||
});
|
||||
return { selected, catalog_resources };
|
||||
|
|
|
|||
Loading…
Reference in a new issue