Skip to content

Commit e152f2a

Browse files
committed
Merge branch 'develop'
2 parents 4cb578b + 3293fe8 commit e152f2a

27 files changed

+176
-186
lines changed

IRIS_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.68.0
1+
3.69.0

mopidy_iris/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from mopidy import config, ext
55

6-
__version__ = "3.68.0"
6+
__version__ = "3.69.0"
77

88
logger = logging.getLogger(__name__)
99

mopidy_iris/system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, path):
2525

2626

2727
class IrisSystemThread(Thread):
28-
_USE_SUDO = True
28+
_USE_SUDO = os.environ.get("IRIS_USE_SUDO", True)
2929

3030
def __init__(self, action, ioloop, callback):
3131
Thread.__init__(self)

mopidy_iris/system.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ elif [[ $1 = "restart" ]]; then
2828
elif [[ $1 = "local_scan" ]]; then
2929
START=$(date +%s)
3030
if $IS_CONTAINER; then
31-
SCAN=$(mopidy --config /config/mopidy.conf local scan)
31+
if [ -n "$IRIS_CONFIG_LOCATION" ]; then
32+
SCAN=$(mopidy --config $IRIS_CONFIG_LOCATION local scan)
33+
else
34+
SCAN=$(mopidy --config /config/mopidy.conf local scan)
3235
else
3336
SCAN=$(sudo mopidyctl local scan)
3437
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mopidy-iris",
3-
"version": "3.68.0",
3+
"version": "3.69.0",
44
"description": "Mopidy HTTP interface",
55
"repository": "https://github.com/jaedb/iris",
66
"author": "James Barnsley <[email protected]>",

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = Mopidy-Iris
3-
version = 3.68.0
3+
version = 3.69.0
44
url = https://github.com/jaedb/iris
55
author = James Barnsley
66
author_email = [email protected]

src/js/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Content = () => (
5454
<Route path="settings/debug" element={<Debug />} />
5555
<Route path="settings/*" element={<Settings />} />
5656
<Route path="search" element={<Search />} />
57-
<Route path="search/:type/:term" element={<Search />} />
57+
<Route path="search/:type/:providers/:term" element={<Search />} />
5858
<Route path="artist/:uri/*" element={<Artist />} />
5959
<Route path="album/:uri/" element={<Album />} />
6060
<Route path="album/:uri/:name" element={<Album />} />

src/js/components/SearchResults.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,20 @@ import { Grid } from './Grid';
99
import { I18n } from '../locale';
1010
import Button from './Button';
1111
import { makeSearchResultsSelector, getSortSelector } from '../util/selectors';
12+
import useSearchQuery from '../util/useSearchQuery';
1213

1314
const SORT_KEY = 'search_results';
1415

1516
const SearchResults = ({
1617
type,
1718
all,
1819
}) => {
19-
const { term } = useParams();
20+
const { term, providers } = useSearchQuery();
21+
const encodedProviders = providers.join(',').replace(/:/g,'');
2022
const [sortField, sortReverse] = useSelector(
2123
(state) => getSortSelector(state, SORT_KEY, 'name'),
2224
);
23-
const searchResultsSelector = makeSearchResultsSelector(term, type);
25+
const searchResultsSelector = makeSearchResultsSelector(providers, term, type);
2426
const rawResults = useSelector(searchResultsSelector);
2527
const encodedTerm = encodeURIComponent(term);
2628
let results = [...rawResults];
@@ -43,17 +45,17 @@ const SearchResults = ({
4345
<h4>
4446
{!all && (
4547
<span>
46-
<URILink uri={`iris:search:all:${encodedTerm}`} uriType="search" unencoded>
48+
<URILink uri={`iris:search:all:${encodedProviders}:${encodedTerm}`} uriType="search" unencoded>
4749
<I18n path="search.title" />
4850
</URILink>
49-
{' '}
51+
<span style={{ display: 'inline-block', width: 10 }} />
5052
<Icon type="fontawesome" name="angle-right" />
51-
{' '}
53+
<span style={{ display: 'inline-block', width: 10 }} />
5254
<I18n path={`search.${type}.title`} />
5355
</span>
5456
)}
5557
{all && (
56-
<URILink uri={`iris:search:${type}:${encodedTerm}`} uriType="search" unencoded>
58+
<URILink uri={`iris:search:${type}:${encodedProviders}:${encodedTerm}`} uriType="search" unencoded>
5759
<I18n path={`search.${type}.title`} />
5860
</URILink>
5961
)}
@@ -66,7 +68,7 @@ const SearchResults = ({
6668
{type === 'tracks' && (
6769
<TrackList
6870
source={{
69-
uri: `iris:search:${type}:${encodedTerm}`,
71+
uri: `iris:search:${type}:${encodedProviders}:${encodedTerm}`,
7072
name: 'Search results',
7173
type: 'search',
7274
}}
@@ -77,7 +79,7 @@ const SearchResults = ({
7779
{/* <LazyLoadListener enabled={this.props.artists_more && spotify_search_enabled} loadMore={loadMore} /> */}
7880

7981
{resultsCount > results.length && (
80-
<Button uri={`iris:search:${type}:${encodedTerm}`} uriType="search" unencoded>
82+
<Button uri={`iris:search:${type}:${encodedProviders}:${encodedTerm}`} uriType="search" unencoded>
8183
<I18n path={`search.${type}.more`} count={resultsCount} />
8284
</Button>
8385
)}

src/js/components/URILink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default memo(({
4747

4848
case 'search':
4949
var exploded = uri.split(':');
50-
to = `/search/${exploded[2]}/${exploded[3]}`;
50+
to = `/search/${exploded[2]}/${exploded[3]}/${exploded[4]}`;
5151
break;
5252

5353
default:

src/js/locale/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ search:
337337
title_window: 'Search: %{term}'
338338
context_actions:
339339
sort: Sort
340-
source: 'Sources (%{count})'
340+
source: Sources
341341
placeholder: Search
342342
all:
343343
title: All

0 commit comments

Comments
 (0)