@@ -392,6 +392,19 @@ func main() {
392
392
}
393
393
}()
394
394
395
+ // Thread to prompt for next episode in CLI Mode
396
+ go func () {
397
+ if ! userCurdConfig .RofiSelection && userCurdConfig .NextEpisodePrompt {
398
+ internal .NextEpisodePrompt (& userCurdConfig )
399
+ anime .Ep .Number ++
400
+ anime .Ep .Started = false
401
+ internal .Log ("Completed episode, starting next." )
402
+ anime .Ep .IsCompleted = true
403
+ // Exit the skip loop
404
+ close (skipLoopDone )
405
+ }
406
+ }()
407
+
395
408
wg .Add (1 )
396
409
// Thread to update playback time in database
397
410
go func () {
@@ -453,7 +466,6 @@ func main() {
453
466
if err != nil {
454
467
internal .Log ("Error sending skip times to MPV: " + err .Error ())
455
468
}
456
- fmt .Println ("Skip times sent!" ) // TODO: REMOVE
457
469
}
458
470
459
471
// If resume is true, seek to the playback time
@@ -593,19 +605,8 @@ func main() {
593
605
internal .ExitCurd (nil )
594
606
}
595
607
596
- if userCurdConfig .NextEpisodePrompt {
597
- internal .CurdOut (fmt .Sprintf ("Start next episode (%d)?" , anime .Ep .Number ))
598
-
599
- selectedOption , err := internal .DynamicSelect (map [string ]string {"yes" : "Yes" })
600
- if err != nil {
601
- internal .ExitCurd (err )
602
- }
603
-
604
- if selectedOption .Key != "yes" {
605
- internal .ExitMPV (anime .Ep .Player .SocketPath )
606
- internal .ExitCurd (nil )
607
- }
608
- // If yes or any other case, continue with the next episode
608
+ if userCurdConfig .RofiSelection && userCurdConfig .NextEpisodePrompt {
609
+ internal .NextEpisodePrompt (& userCurdConfig )
609
610
}
610
611
611
612
internal .CurdOut (fmt .Sprint ("Starting next episode: " , anime .Ep .Number ))
0 commit comments