Commit 35657cf6e7
Unsigned
Layout: unified · split
cmd/curd/main.go +8
| @@ -74,9 +74,16 @@ func main(){ | ||
| 74 | 74 | |
| 75 | 75 | if err != nil{ |
| 76 | 76 | fmt.Println("No episode list found") |
| 77 | internal.RestoreScreen() | |
| 77 | 78 | os.Exit(1) |
| 78 | 79 | } |
| 79 | 80 | |
| 81 | if episodeList == nil { // if user selected "Add new anime option" | |
| 82 | fmt.Println("Add new anime") | |
| 83 | internal.RestoreScreen() | |
| 84 | os.Exit(0) | |
| 85 | } | |
| 86 | ||
| 80 | 87 | internal.Log(episodeList, logFile) |
| 81 | 88 | var episodeNumber string |
| 82 | 89 | fmt.Printf("Enter the episode (%v episodes)", episodeList[len(episodeList)-1]) |
| @@ -98,6 +105,7 @@ func main(){ | ||
| 98 | 105 | |
| 99 | 106 | if err != nil { |
| 100 | 107 | internal.Log("Failed to start mpv", logFile) |
| 108 | os.Exit(1) | |
| 101 | 109 | } |
| 102 | 110 | |
| 103 | 111 | for { // Loop while video is playing |