Closed kkirjala closed 2 years ago
Fix made and added to an existing PR: https://github.com/MarByteBeep/StageLinq/pull/2 (sorry for not creating separate branches for fixes but pushing to main branch directly :-|)
Awesome! Thanks a lot for finding this. I would've never guessed it was a difference between platforms.
In case no track is loaded to a deck, a raw error message is displayed to user and some properties of the player are not fetched:
Steps to reproduce (tested using 2x Denon DJ Prime SC5000 + Denon DJ Prime X1800):
Expected result: In case no track is loaded to deck, empty/null values shall be displayed.
Observed result:
[02:18:45] [INFO] Found 'sc5000' Controller at '192.168.1.235:38173' with following software: { name: 'JP07', version: '2.1.1' } [02:18:45] [LOG] TCP connection to '192.168.1.235:38173' local port: 57821 [02:18:45] [INFO] Discovered the following services: [02:18:45] [INFO] port: 46515 => StateMap [02:18:45] [INFO] port: 38041 => Broadcast [02:18:45] [INFO] port: 44795 => Syncing [02:18:45] [INFO] port: 41825 => TimeSynchronization [02:18:45] [INFO] port: 36115 => BeatInfo [02:18:45] [INFO] port: 34063 => FileTransfer [02:18:45] [LOG] TCP connection to '192.168.1.235:34063' local port: 57822 [02:18:45] [INFO] Connected to service 'FileTransfer' at port 34063 [02:18:46] [INFO] downloaded: '/K-109_USB_1 (USB 1)/Engine Library/m.db' and stored in './localdb/K-109_USB_1 (USB 1)/Engine Library/m.db' [02:18:46] [INFO] dumped 261 albums arts in './localdb/K-109_USB_1 (USB 1)/Album Art/' [02:18:46] [LOG] TCP connection to '192.168.1.235:46515' local port: 57824 [02:18:46] [INFO] Connected to service 'StateMap' at port 46515 [02:18:46] [LOG] /Engine/Deck1/Play => {"state":false,"type":1} [02:18:46] [LOG] /Engine/Deck1/PlayState => {"state":false,"type":1} [02:18:46] [LOG] /Engine/Deck1/Track/ArtistName => {"string":"Aesthetic Perfection","type":8} [02:18:46] [LOG] /Engine/Deck1/Track/TrackNetworkPath => {"string":"net://0f5a9001-ed85-413f-8cbf-f86806696271/K-109_USB1 (USB 1)/Contents/Aesthetic Perfection/A Violent Emotion [Japanese Edition]/02-_AestheticPerfection-_Spit_It_Out.aiff","type":8} [02:18:46] [LOG] /Engine/Deck1/Track/TrackLocalAlbumArtPath => {"string": "./localdb/K-109_USB_1 (USB 1)/Album Art/14.jpg", "type":0} [02:18:46] [LOG] /Engine/Deck1/Track/SongLoaded => {"state":true,"type":1} [02:18:46] [LOG] /Engine/Deck1/Track/SongName => {"string":"Spit It Out","type":8} [02:18:46] [LOG] /Engine/Deck1/Track/TrackData => {"state":true,"type":3} [02:18:46] [LOG] /Engine/Deck1/Track/TrackName => {"string":"/media/K-109_USB1/Contents/Aesthetic Perfection/A Violent Emotion [Japanese Edition]/02-_AestheticPerfection-_Spit_It_Out.aiff","type":8} [02:18:46] [LOG] /Engine/Deck1/CurrentBPM => {"type":0,"value":140} [02:18:46] [LOG] /Engine/Deck1/ExternalMixerVolume => {"type":0,"value":0} [02:18:46] [LOG] /Engine/Deck2/Play => {"state":false,"type":1} [02:18:46] [LOG] /Engine/Deck2/PlayState => {"state":false,"type":1} [02:18:46] [LOG] /Engine/Deck2/Track/ArtistName => {"string":"","type":8} [02:18:46] [LOG] /Engine/Deck2/Track/TrackNetworkPath => {"string":"","type":8} [02:18:46] [ERROR] TypeError: Cannot read properties of null (reading 'source') at Controller.getAlbumArtPath (/Users/kkirjala/Documents/StageLinq/dist/Controller.js:193:50) at StateMap.messageHandler (/Users/kkirjala/Documents/StageLinq/dist/services/StateMap.js:105:42) at Socket. (/Users/kkirjala/Documents/StageLinq/dist/services/Service.js:51:30)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23)