Merge branch 'maxerenberg-master' into develop
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
92
mopidy_iris/static/app.min.js
vendored
92
mopidy_iris/static/app.min.js
vendored
File diff suppressed because one or more lines are too long
148814
mopidy_iris/static/app_BACKUP_19589.js
Normal file
148814
mopidy_iris/static/app_BACKUP_19589.js
Normal file
File diff suppressed because one or more lines are too long
129015
mopidy_iris/static/app_BASE_19589.js
Normal file
129015
mopidy_iris/static/app_BASE_19589.js
Normal file
File diff suppressed because one or more lines are too long
148206
mopidy_iris/static/app_LOCAL_19589.js
Normal file
148206
mopidy_iris/static/app_LOCAL_19589.js
Normal file
File diff suppressed because one or more lines are too long
129024
mopidy_iris/static/app_REMOTE_19589.js
Normal file
129024
mopidy_iris/static/app_REMOTE_19589.js
Normal file
File diff suppressed because one or more lines are too long
@ -106,8 +106,13 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
<<<<<<< HEAD
|
||||
var build = "1605340269";
|
||||
var version = "3.54.1";
|
||||
=======
|
||||
var build = "1598940390";
|
||||
var version = "3.52.4";
|
||||
>>>>>>> c7462e44a9fa9a2d85a1e529f43f43d7edd97d83
|
||||
|
||||
// Construct the script tag
|
||||
var js = document.createElement("script");
|
||||
|
||||
@ -25,15 +25,17 @@ class PlaybackControls extends React.Component {
|
||||
this.state = {
|
||||
expanded: false,
|
||||
current_track: null,
|
||||
stream_title: null,
|
||||
transition_track: null,
|
||||
transition_direction: null,
|
||||
};
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps({ current_track }, state) {
|
||||
static getDerivedStateFromProps({ current_track, stream_title }, state) {
|
||||
return {
|
||||
...state,
|
||||
current_track,
|
||||
stream_title,
|
||||
};
|
||||
}
|
||||
|
||||
@ -211,6 +213,7 @@ class PlaybackControls extends React.Component {
|
||||
const {
|
||||
current_track,
|
||||
expanded,
|
||||
stream_title,
|
||||
transition_track,
|
||||
transition_direction,
|
||||
} = this.state;
|
||||
@ -257,7 +260,12 @@ class PlaybackControls extends React.Component {
|
||||
{current_track ? current_track.name : <span>-</span>}
|
||||
</div>
|
||||
<div className="artist">
|
||||
{current_track ? <LinksSentence items={current_track.artists} /> : <LinksSentence />}
|
||||
{
|
||||
(current_track && current_track.artists
|
||||
&& <LinksSentence items={current_track.artists} />)
|
||||
|| (stream_title && <span className="links-sentence">{stream_title}</span>)
|
||||
|| <LinksSentence />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -338,11 +346,13 @@ const mapStateToProps = (state) => {
|
||||
items,
|
||||
next_track_uri,
|
||||
current_track,
|
||||
stream_title,
|
||||
} = state.core;
|
||||
|
||||
return {
|
||||
snapcast_enabled: state.pusher.config.snapcast_enabled,
|
||||
current_track: current_track ? items[current_track.uri] || current_track : null,
|
||||
stream_title,
|
||||
next_track: items[next_track_uri],
|
||||
radio_enabled: (!!(state.ui.radio && state.ui.radio.enabled)),
|
||||
play_state: state.mopidy.play_state,
|
||||
|
||||
@ -293,6 +293,7 @@ export default class Track extends React.Component {
|
||||
const {
|
||||
track,
|
||||
track_context,
|
||||
stream_title,
|
||||
play_state,
|
||||
selected,
|
||||
can_sort,
|
||||
@ -314,6 +315,12 @@ export default class Track extends React.Component {
|
||||
{track.artists ? <LinksSentence items={track.artists} /> : '-'}
|
||||
</li>,
|
||||
);
|
||||
} else if (track.playing && stream_title) {
|
||||
track_details.push(
|
||||
<li className="details__item details__item--artists" key="stream_title">
|
||||
<span className="links-sentence">{stream_title}</span>
|
||||
</li>,
|
||||
);
|
||||
}
|
||||
|
||||
if (track.album) {
|
||||
|
||||
@ -452,6 +452,7 @@ const mapStateToProps = (state) => ({
|
||||
dragger: state.ui.dragger,
|
||||
current_track: state.core.current_track,
|
||||
context_menu: state.ui.context_menu,
|
||||
stream_title: state.core.stream_title,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
@ -300,6 +300,20 @@ export function removeItem(key, new_key = null) {
|
||||
};
|
||||
}
|
||||
|
||||
export function streamTitleLoaded(stream_title) {
|
||||
return {
|
||||
type: 'STREAM_TITLE_LOADED',
|
||||
stream_title,
|
||||
};
|
||||
}
|
||||
|
||||
export function streamTitleChanged(stream_title) {
|
||||
return {
|
||||
type: 'STREAM_TITLE_CHANGED',
|
||||
stream_title,
|
||||
};
|
||||
}
|
||||
|
||||
export function viewDataLoaded(data) {
|
||||
return {
|
||||
type: 'VIEW_DATA_LOADED',
|
||||
@ -307,7 +321,6 @@ export function viewDataLoaded(data) {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Playlist manipulation
|
||||
* */
|
||||
|
||||
@ -25,6 +25,7 @@ export default function reducer(core = {}, action) {
|
||||
...core,
|
||||
current_track: null,
|
||||
current_track_uri: null,
|
||||
stream_title: null,
|
||||
};
|
||||
|
||||
case 'NEXT_TRACK_LOADED':
|
||||
@ -48,6 +49,10 @@ export default function reducer(core = {}, action) {
|
||||
}
|
||||
return { ...core, current_tracklist: tracklist, queue_metadata: action.queue_metadata };
|
||||
|
||||
case 'STREAM_TITLE_CHANGED':
|
||||
case 'STREAM_TITLE_LOADED':
|
||||
return { ...core, stream_title: action.stream_title };
|
||||
|
||||
case 'PUSHER_RADIO_LOADED':
|
||||
case 'PUSHER_RADIO_STARTED':
|
||||
case 'PUSHER_RADIO_CHANGED':
|
||||
|
||||
@ -270,6 +270,12 @@ export function getCurrentTrack() {
|
||||
};
|
||||
}
|
||||
|
||||
export function getStreamTitle() {
|
||||
return {
|
||||
type: 'MOPIDY_GET_STREAM_TITLE',
|
||||
};
|
||||
}
|
||||
|
||||
export function currentTrackLoaded(tl_track) {
|
||||
return {
|
||||
type: 'MOPIDY_CURRENT_TRACK_LOADED',
|
||||
|
||||
@ -71,6 +71,7 @@ const MopidyMiddleware = (function () {
|
||||
store.dispatch(mopidyActions.getQueue());
|
||||
store.dispatch(mopidyActions.getTimePosition());
|
||||
store.dispatch(mopidyActions.getUriSchemes());
|
||||
store.dispatch(mopidyActions.getStreamTitle());
|
||||
|
||||
// Every 1s update our play position (when playing)
|
||||
progress_interval = setInterval(() => {
|
||||
@ -162,6 +163,10 @@ const MopidyMiddleware = (function () {
|
||||
store.dispatch(mopidyActions.getRepeat());
|
||||
break;
|
||||
|
||||
case 'event:streamTitleChanged':
|
||||
store.dispatch(coreActions.streamTitleChanged(data.title));
|
||||
break;
|
||||
|
||||
default:
|
||||
// console.log('MopidyService: Unhandled message', type, message );
|
||||
}
|
||||
@ -470,6 +475,7 @@ const MopidyMiddleware = (function () {
|
||||
// Focus has just been regained
|
||||
if (action.window_focus === true) {
|
||||
store.dispatch(mopidyActions.getCurrentTrack());
|
||||
store.dispatch(mopidyActions.getStreamTitle());
|
||||
store.dispatch(mopidyActions.getPlayState());
|
||||
store.dispatch(mopidyActions.getVolume());
|
||||
store.dispatch(mopidyActions.getMute());
|
||||
@ -1536,6 +1542,17 @@ const MopidyMiddleware = (function () {
|
||||
break;
|
||||
}
|
||||
|
||||
case 'MOPIDY_GET_STREAM_TITLE':
|
||||
request(socket, store, 'playback.getStreamTitle')
|
||||
.then(
|
||||
(stream_title) => {
|
||||
if (stream_title) {
|
||||
store.dispatch(coreActions.streamTitleLoaded(stream_title));
|
||||
}
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
case 'VIEW__GET_RANDOM_TRACKS':
|
||||
request(store, 'library.browse', { uri: 'local:directory?type=track' })
|
||||
.then(
|
||||
@ -1569,28 +1586,28 @@ const MopidyMiddleware = (function () {
|
||||
|
||||
case 'MOPIDY_GET_IMAGES': {
|
||||
const { uris } = action;
|
||||
if (action.uris) {
|
||||
request(store, 'library.getImages', { uris })
|
||||
.then((response) => {
|
||||
const itemsWithImages = [];
|
||||
Object.keys(response).forEach((uri) => {
|
||||
const images = response[uri];
|
||||
if (!uris) break;
|
||||
|
||||
if (images) {
|
||||
itemsWithImages.push({
|
||||
uri,
|
||||
images: formatImages(digestMopidyImages(store.getState().mopidy, images)),
|
||||
});
|
||||
} else {
|
||||
store.dispatch(lastfmActions.getImages(uri));
|
||||
};
|
||||
});
|
||||
request(store, 'library.getImages', { uris })
|
||||
.then((response) => {
|
||||
const itemsWithImages = [];
|
||||
Object.keys(response).forEach((uri) => {
|
||||
const images = response[uri];
|
||||
|
||||
if (itemsWithImages.length) {
|
||||
store.dispatch(coreActions.itemsLoaded(itemsWithImages));
|
||||
}
|
||||
if (images) {
|
||||
itemsWithImages.push({
|
||||
uri,
|
||||
images: formatImages(digestMopidyImages(store.getState().mopidy, images)),
|
||||
});
|
||||
} else {
|
||||
store.dispatch(lastfmActions.getImages(uri));
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
if (itemsWithImages.length) {
|
||||
store.dispatch(coreActions.itemsLoaded(itemsWithImages));
|
||||
}
|
||||
});
|
||||
|
||||
next(action);
|
||||
break;
|
||||
|
||||
@ -203,6 +203,7 @@ class Queue extends React.Component {
|
||||
const {
|
||||
current_track,
|
||||
queue_tracks,
|
||||
stream_title,
|
||||
theme,
|
||||
current_track_uri,
|
||||
spotify_enabled,
|
||||
@ -267,14 +268,18 @@ class Queue extends React.Component {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{current_track ? (
|
||||
<LinksSentence
|
||||
className="current-track__artists"
|
||||
items={current_track.artists}
|
||||
/>
|
||||
) : (
|
||||
<LinksSentence className="current-track__artists" />
|
||||
)}
|
||||
{
|
||||
(current_track && current_track.artists && (
|
||||
<LinksSentence
|
||||
className="current-track__artists"
|
||||
items={current_track.artists}
|
||||
/>
|
||||
))
|
||||
|| (stream_title && (
|
||||
<span className="current-track__artists links-sentence">{stream_title}</span>
|
||||
))
|
||||
|| <LinksSentence className="current-track__artists" />
|
||||
}
|
||||
|
||||
{this.renderAddedFrom()}
|
||||
|
||||
@ -335,6 +340,7 @@ class Queue extends React.Component {
|
||||
const mapStateToProps = (state) => {
|
||||
const {
|
||||
current_track: core_current_track,
|
||||
stream_title,
|
||||
items,
|
||||
queue,
|
||||
queue_metadata,
|
||||
@ -390,6 +396,7 @@ const mapStateToProps = (state) => {
|
||||
current_track && current_track.added_from
|
||||
? current_track.added_from
|
||||
: null,
|
||||
stream_title,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user