diff --git a/package.json b/package.json
index 05b3d27..fafda2d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "webstudio",
- "version": "1.5.3",
+ "version": "1.5.4",
"private": true,
"dependencies": {
"@babel/core": "7.6.0",
diff --git a/src/App.scss b/src/App.scss
index 1af0ac2..d056570 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -42,6 +42,10 @@ $number-of-channels: 3;
font-size: 0.92em;
}
+ .navbar.hover-menu .hover-label {
+ display: none;
+ }
+
.hover-menu {
.btn {
padding-top: 0.1em;
@@ -57,7 +61,6 @@ $number-of-channels: 3;
}
&:not(:hover) {
- overflow: hidden;
height: 15px;
> *:not(.hover-label) {
diff --git a/src/api.ts b/src/api.ts
index d38c398..206f9ee 100644
--- a/src/api.ts
+++ b/src/api.ts
@@ -1,4 +1,6 @@
import qs from "qs";
+import { getUserError, setCurrentUser } from "./session/state";
+import store from "./store";
export const MYRADIO_NON_API_BASE = process.env.REACT_APP_MYRADIO_NONAPI_BASE!;
export const MYRADIO_BASE_URL = process.env.REACT_APP_MYRADIO_BASE!;
@@ -42,8 +44,14 @@ export async function myradioApiRequest(
if (json.status === "OK") {
return json.payload;
} else {
- console.error(json.payload);
- throw new ApiException(json.payload);
+ if (res.status === 401) {
+ // We've logged out! Oh no!
+ store.dispatch(setCurrentUser({ user: null, canBroadcast: false }));
+ store.dispatch(getUserError("User is no longer logged in."));
+ } else {
+ console.error(json.payload);
+ throw new ApiException(json.payload);
+ }
}
}
diff --git a/src/broadcast/state.ts b/src/broadcast/state.ts
index ed86b3c..d078ea2 100644
--- a/src/broadcast/state.ts
+++ b/src/broadcast/state.ts
@@ -144,7 +144,16 @@ export const registerForShow = (): AppThunk => async (dispatch, getState) => {
})
);
if (streamer) {
- await streamer.stop("ApiException " + e.message);
+ // We're connected,
+ var remain_connected = getState().settings.allowStreamingOnReject;
+ if (remain_connected) {
+ console.log(
+ "StateServer refused registration. Due to setting, staying connected.",
+ e
+ );
+ } else {
+ await streamer.stop("ApiException " + e.message);
+ }
}
} else {
// let raygun handle it
diff --git a/src/optionsMenu/AdvancedTab.tsx b/src/optionsMenu/AdvancedTab.tsx
index 69cb9f6..a77f58a 100644
--- a/src/optionsMenu/AdvancedTab.tsx
+++ b/src/optionsMenu/AdvancedTab.tsx
@@ -305,6 +305,25 @@ export function AdvancedTab() {
/>
+
+
+ dispatch(
+ changeSetting({
+ key: "allowStreamingOnReject",
+ val: e.target.checked,
+ })
+ )
+ }
+ />
+
+
async (dispatch, getState) => {
return getState().session.currentUser;
};
@@ -91,7 +93,7 @@ export const getUser = (): AppThunk => async (dispatch) => {
});
dispatch(sessionState.actions.setCurrentUser({ user, canBroadcast }));
} catch (e) {
- console.log("failed to get user. " + e.toString());
+ console.log("Failed to get user. " + e.toString());
dispatch(sessionState.actions.getUserError(e.toString()));
}
};
@@ -102,7 +104,7 @@ export const getTimeslot = (): AppThunk => async (dispatch) => {
const timeslot = await getCurrentApiTimeslot();
dispatch(sessionState.actions.getTimeslotSuccess(timeslot));
} catch (e) {
- console.log("failed to get selected timeslot. " + e.toString());
+ console.log("Failed to get selected timeslot. " + e.toString());
dispatch(sessionState.actions.getTimeslotError(e.toString()));
}
};
diff --git a/src/showplanner/index.tsx b/src/showplanner/index.tsx
index 6733da1..c15522e 100644
--- a/src/showplanner/index.tsx
+++ b/src/showplanner/index.tsx
@@ -347,17 +347,20 @@ export function LoadingDialogue({
{subtitle}
- {error !== null && (
- <>
-
- Failed! Please tell Computing Team that something
- broke.
-
-
- {error}
-
- >
- )}
+ {error !== null &&
+ (error === "Error: No valid authentication data provided." ? (
+
Redirecting you to MyRadio, please wait...
+ ) : (
+ <>
+
+ Failed! Please tell Computing Team that
+ something broke.
+
+
+ {error}
+
+ >
+ ))}
);
diff --git a/src/showplanner/libraries.tsx b/src/showplanner/libraries.tsx
index 930755f..82938db 100644
--- a/src/showplanner/libraries.tsx
+++ b/src/showplanner/libraries.tsx
@@ -173,38 +173,42 @@ export function LibraryColumn() {
}
export function CentralMusicLibrary() {
- const [track, setTrack] = useState("");
- const [artist, setArtist] = useState("");
- const debouncedTrack = useDebounce(track, 1000);
- const debouncedArtist = useDebounce(artist, 1000);
- const [items, setItems] = useState