Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jaedb committed Jan 2, 2024
2 parents 050e232 + 4dffccf commit 62c4e06
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion IRIS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.69.2
3.69.3
2 changes: 1 addition & 1 deletion mopidy_iris/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from mopidy import config, ext

__version__ = "3.69.2"
__version__ = "3.69.3"

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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>",
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/js/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 />} />
Expand Down
8 changes: 5 additions & 3 deletions src/js/components/SearchResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ const SearchResults = ({
results = results.slice(0, 6);
}

if (all && !results.length) return null;

return (
<div>
<h4>
Expand All @@ -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} />}
Expand All @@ -84,6 +82,10 @@ const SearchResults = ({
</Button>
)}
</section>
) : (
<span style={{ opacity: 0.5 }}>
<I18n key="search.no_results" />
</span>
)}
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/js/locale/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ search:
sort: Sort
source: Sources
placeholder: Search
no_results: No results
all:
title: All
artists:
Expand Down
18 changes: 10 additions & 8 deletions src/js/views/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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>
);
}
Expand Down

0 comments on commit 62c4e06

Please sign in to comment.