@@ -29,7 +29,7 @@ let lastPayload: QueueCreatePayload | undefined;
2929Router . respond ( "queue::create" , async ( _evt , payload ) => {
3030 if ( comparePayload ( payload , lastPayload ) ) {
3131 // Payload is practically same. Find start song and play queue from there
32- const newIndex = queue . findIndex ( ( s ) => s . path === payload . startSong ) ;
32+ const newIndex = queue . findIndex ( ( s ) => s . osuFile === payload . startSong ) ;
3333
3434 if ( newIndex === - 1 || newIndex === index ) {
3535 return ;
@@ -58,7 +58,7 @@ Router.respond("queue::create", async (_evt, payload) => {
5858 }
5959
6060 // Set playing index
61- const songIndex = queue . findIndex ( ( s ) => s . path === payload . startSong ) ;
61+ const songIndex = queue . findIndex ( ( s ) => s . osuFile === payload . startSong ) ;
6262
6363 if ( songIndex !== - 1 ) {
6464 index = songIndex ;
@@ -72,7 +72,7 @@ Router.respond("queue::create", async (_evt, payload) => {
7272
7373function getIndexes ( view : QueueView ) : SongIndex [ ] {
7474 if ( view . playlists !== undefined ) {
75- //todo implement multi playlist playback
75+ //TODO: implement multi playlist playback
7676 return [ ] ;
7777 }
7878
@@ -86,7 +86,7 @@ function getIndexes(view: QueueView): SongIndex[] {
8686 }
8787
8888 if ( view . playlist ) {
89- //todo get playlist
89+ //TODO: get playlist
9090 return [ ] ;
9191 }
9292
@@ -167,11 +167,11 @@ Router.respond("queue::shuffle", async () => {
167167 return ;
168168 }
169169
170- const current = queue [ index ] . path ;
170+ const current = queue [ index ] . osuFile ;
171171 shuffle ( queue ) ;
172172
173173 for ( let i = 0 ; i < queue . length ; i ++ ) {
174- if ( queue [ i ] . path !== current ) {
174+ if ( queue [ i ] . osuFile !== current ) {
175175 continue ;
176176 }
177177
@@ -193,7 +193,7 @@ Router.respond("queue::shuffle", async () => {
193193
194194Router . respond ( "queue::place" , ( _evt , what , after ) => {
195195 // Find index of subject
196- const whatIndex = queue . findIndex ( ( s ) => s . path === what ) ;
196+ const whatIndex = queue . findIndex ( ( s ) => s . osuFile === what ) ;
197197
198198 if ( whatIndex === - 1 ) {
199199 return ;
@@ -220,7 +220,7 @@ Router.respond("queue::place", (_evt, what, after) => {
220220 return ;
221221 }
222222
223- const afterIndex = queue . findIndex ( ( s ) => s . path === after ) ;
223+ const afterIndex = queue . findIndex ( ( s ) => s . osuFile === after ) ;
224224
225225 if ( afterIndex === - 1 ) {
226226 // After index was not found... put subject back
@@ -249,7 +249,7 @@ Router.respond("queue::place", (_evt, what, after) => {
249249
250250Router . respond ( "queue::play" , async ( _evt , song ) => {
251251 // Point currently playing index to given song
252- const newIndex = queue . findIndex ( ( s ) => s . path === song ) ;
252+ const newIndex = queue . findIndex ( ( s ) => s . osuFile === song ) ;
253253
254254 if ( newIndex === - 1 || newIndex === index ) {
255255 return ;
@@ -264,7 +264,7 @@ Router.respond("queue::playNext", async (_evt, song) => {
264264 return ;
265265 }
266266
267- const songIndex = queue . findIndex ( ( s ) => s . path === song ) ;
267+ const songIndex = queue . findIndex ( ( s ) => s . osuFile === song ) ;
268268
269269 if ( songIndex === index ) {
270270 return ;
@@ -297,7 +297,7 @@ Router.respond("queue::removeSong", async (_evt, what) => {
297297 return ;
298298 }
299299
300- const whatIndex = queue . findIndex ( ( s ) => s . path === what ) ;
300+ const whatIndex = queue . findIndex ( ( s ) => s . osuFile === what ) ;
301301
302302 if ( whatIndex === - 1 ) {
303303 return ;
0 commit comments