Merge branch 'develop'

This commit is contained in:
James Barnsley
2024-01-03 10:55:35 +13:00
8 changed files with 21 additions and 15 deletions

View File

@ -1 +1 @@
3.69.2
3.69.3

View File

@ -3,7 +3,7 @@ import pathlib
from mopidy import config, ext
__version__ = "3.69.2"
__version__ = "3.69.3"
logger = logging.getLogger(__name__)

View File

@ -1,6 +1,6 @@
{
"name": "mopidy-iris",
"version": "3.69.2",
"version": "3.69.3",
"description": "Mopidy HTTP interface",
"repository": "https://github.com/jaedb/iris",
"author": "James Barnsley <james@barnsley.nz>",

View File

@ -1,6 +1,6 @@
[metadata]
name = Mopidy-Iris
version = 3.69.2
version = 3.69.3
url = https://github.com/jaedb/iris
author = James Barnsley
author_email = james@barnsley.nz

View File

@ -55,6 +55,7 @@ const Content = () => (
<Route path="settings/*" element={<Settings />} />
<Route path="search" element={<Search />} />
<Route path="search/:type/:providers/:term" element={<Search />} />
<Route path="search/:type/:providers" element={<Search />} />
<Route path="artist/:uri/*" element={<Artist />} />
<Route path="album/:uri/" element={<Album />} />
<Route path="album/:uri/:name" element={<Album />} />

View File

@ -38,8 +38,6 @@ const SearchResults = ({
results = results.slice(0, 6);
}
if (all && !results.length) return null;
return (
<div>
<h4>
@ -60,7 +58,7 @@ const SearchResults = ({
</URILink>
)}
</h4>
{results.length > 0 && (
{results.length > 0 ? (
<section className="grid-wrapper">
{type === 'artists' && <Grid items={results} show_source_icon mini={all} />}
{type === 'albums' && <Grid items={results} show_source_icon mini={all} />}
@ -84,6 +82,10 @@ const SearchResults = ({
</Button>
)}
</section>
) : (
<span style={{ opacity: 0.5 }}>
<I18n key="search.no_results" />
</span>
)}
</div>
);

View File

@ -339,6 +339,7 @@ search:
sort: Sort
source: Sources
placeholder: Search
no_results: No results
all:
title: All
artists:

View File

@ -50,7 +50,7 @@ const Search = () => {
const updateSearchQuery = (term, providers) => {
const encodedTerm = encodeURIComponent(term);
navigate(`/search/${type}/${providers.join(',')}/${encodedTerm || ''}`);
navigate(`/search/${type}/${providers.join(',') || 'none'}/${encodedTerm || ''}`);
}
const onReset = () => navigate('/search');
@ -113,13 +113,15 @@ const Search = () => {
onReset={onReset}
/>
<div className="content-wrapper">
{type != 'all' ? (
<SearchResults type={type} />
) : (
<AllSearchResults />
)}
</div>
{term && (
<div className="content-wrapper">
{type != 'all' ? (
<SearchResults type={type} />
) : (
<AllSearchResults />
)}
</div>
)}
</div>
);
}