Skip to content

Commit

Permalink
v0.9.2 Settings Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsRiprod committed Oct 31, 2024
1 parent f2af737 commit 9227c04
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DeskThingServer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deskthing",
"version": "0.9.1",
"version": "0.9.2",
"description": "A DeskThing server UI to interface with the DeskThing car thing app",
"main": "./out/main/index.js",
"author": "Riprod",
Expand Down
13 changes: 11 additions & 2 deletions DeskThingServer/src/main/handlers/musicHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class MusicHandler {

dataListener.asyncEmit(
MESSAGE_TYPES.LOGGING,
`[MusicHandler]: Received settings update - checking for changes`
`[MusicHandler]: Received settings update - checking for changes | Playback location: ${settings.playbackLocation}`
)
if (settings.playbackLocation) {
dataListener.asyncEmit(
Expand Down Expand Up @@ -66,7 +66,7 @@ export class MusicHandler {
if (!this.currentApp || this.currentApp.length == 0) {
dataListener.asyncEmit(
MESSAGE_TYPES.ERROR,
`[MusicHandler]: No playback location set! Go to settings -> Music to the playback location!`
`[MusicHandler]: No playback location set! Go to settings -> Music to set the playback location!`
)
return
}
Expand Down Expand Up @@ -98,6 +98,15 @@ export class MusicHandler {
return
}
}

if (this.currentApp == 'none') {
dataListener.asyncEmit(
MESSAGE_TYPES.ERROR,
`[MusicHandler]: Playback location is 'none' ! Go to settings -> Music to set the playback location!`
)
return
}

if (request.app != 'music' && request.app != 'utility') return

if (request.app == 'utility') {
Expand Down
6 changes: 3 additions & 3 deletions DeskThingServer/src/main/stores/settingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import dataListener, { MESSAGE_TYPES } from '../utils/events'
import os from 'os'
import { Settings } from '@shared/types'

const settingsVersion = '0.9.1'
const version_code = 9.1
const settingsVersion = '0.9.2'
const version_code = 9.2

class SettingsStore {
private settings: Settings
Expand Down Expand Up @@ -117,7 +117,7 @@ class SettingsStore {
globalADB: false,
autoDetectADB: false,
refreshInterval: -1,
playbackLocation: undefined,
playbackLocation: 'none',
localIp: getLocalIpAddress(),
appRepos: ['https://github.com/ItsRiprod/deskthing-apps'],
clientRepos: ['https://github.com/ItsRiprod/deskthing-client']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ const MusicSettings: React.FC = () => {
{app.name}
</option>
))}
<option key={'none'} value={'none'} className="rounded-none">
{'None'}
</option>
</select>
</div>
<div className="border-t py-5 border-gray-500 w-full flex justify-end">
Expand Down

0 comments on commit 9227c04

Please sign in to comment.