Commit 65d23fbc9b

65d23fbc9bff41fbec2851c94d945f3b496254c8

parent: 80a1c429c8

Unregistered key

Kian-Meng Ang <kianmeng.ang@gmail.com> · 2025-03-02 18:03 UTC
committer: <noreply@github.com>

Fix typos (#53)

Found via `codespell -S vendor -L skiped` and `typos README.md internal`

Layout: unified · split

README.md +1 −1
@@ -193,7 +193,7 @@ Run `curd` with the following options:
193curd [options] 193curd [options]
194``` 194```
195 195
196### Arugments would always take precendence over configuration 196### Arguments would always take precedence over configuration
197 197
198> **Note**: 198> **Note**:
199> - To use rofi you need rofi and ueberzug installed. 199> - To use rofi you need rofi and ueberzug installed.
internal/anime_list.go +4 −4
@@ -57,8 +57,8 @@ func SearchAnime(query, mode string) (map[string]string, error) {
57 57
58 // Prepare the anime list 58 // Prepare the anime list
59 animeList := make(map[string]string) 59 animeList := make(map[string]string)
60 60
61 searchGql := `query($search: SearchInput, $limit: Int, $page: Int, $translationType: VaildTranslationTypeEnumType, $countryOrigin: VaildCountryOriginEnumType) { 61 searchGql := `query($search: SearchInput, $limit: Int, $page: Int, $translationType: ValidTranslationTypeEnumType, $countryOrigin: ValidCountryOriginEnumType) {
62 shows(search: $search, limit: $limit, page: $page, translationType: $translationType, countryOrigin: $countryOrigin) { 62 shows(search: $search, limit: $limit, page: $page, translationType: $translationType, countryOrigin: $countryOrigin) {
63 edges { 63 edges {
64 _id 64 _id
@@ -139,13 +139,13 @@ func SearchAnime(query, mode string) (map[string]string, error) {
139 episodesStr = "Unknown" 139 episodesStr = "Unknown"
140 } 140 }
141 } 141 }
142 142
143 // Use English name if available and configured, otherwise use default name 143 // Use English name if available and configured, otherwise use default name
144 displayName := anime.Name 144 displayName := anime.Name
145 if anime.EnglishName != "" && userCurdConfig.AnimeNameLanguage == "english" { 145 if anime.EnglishName != "" && userCurdConfig.AnimeNameLanguage == "english" {
146 displayName = anime.EnglishName 146 displayName = anime.EnglishName
147 } 147 }
148 148
149 animeList[anime.ID] = fmt.Sprintf("%s (%s episodes)", displayName, episodesStr) 149 animeList[anime.ID] = fmt.Sprintf("%s (%s episodes)", displayName, episodesStr)
150 } 150 }
151 return animeList, nil 151 return animeList, nil
internal/curd.go +1 −1
@@ -153,7 +153,7 @@ func ExitCurd(err error) {
153 CurdOut("Have a great day!") 153 CurdOut("Have a great day!")
154 // If the error is not about the connection refused, print the error 154 // If the error is not about the connection refused, print the error
155 if err != nil && !strings.Contains(err.Error(), "dial unix "+anime.Ep.Player.SocketPath+": connect: connection refused") { 155 if err != nil && !strings.Contains(err.Error(), "dial unix "+anime.Ep.Player.SocketPath+": connect: connection refused") {
156 CurdOut(fmt.Sprintf("Erorr: %v", err)) 156 CurdOut(fmt.Sprintf("Error: %v", err))
157 if runtime.GOOS == "windows" { 157 if runtime.GOOS == "windows" {
158 fmt.Println("Press Enter to exit") 158 fmt.Println("Press Enter to exit")
159 var wait string 159 var wait string
internal/episode_url.go +2 −2
@@ -112,7 +112,7 @@ func extractLinks(provider_id string) map[string]interface{} {
112// - []string: a list of links for specified episode. 112// - []string: a list of links for specified episode.
113// - error: an error if the episode is not found or if there is an issue during the search. 113// - error: an error if the episode is not found or if there is an issue during the search.
114func GetEpisodeURL(config CurdConfig, id string, epNo int) ([]string, error) { 114func GetEpisodeURL(config CurdConfig, id string, epNo int) ([]string, error) {
115 query := `query($showId:String!,$translationType:VaildTranslationTypeEnumType!,$episodeString:String!){episode(showId:$showId,translationType:$translationType,episodeString:$episodeString){episodeString sourceUrls}}` 115 query := `query($showId:String!,$translationType:ValidTranslationTypeEnumType!,$episodeString:String!){episode(showId:$showId,translationType:$translationType,episodeString:$episodeString){episodeString sourceUrls}}`
116 116
117 variables := map[string]string{ 117 variables := map[string]string{
118 "showId": id, 118 "showId": id,
@@ -183,7 +183,7 @@ func GetEpisodeURL(config CurdConfig, id string, epNo int) ([]string, error) {
183 if highestPriorityURL != "" { 183 if highestPriorityURL != "" {
184 validURLs = []string{highestPriorityURL} 184 validURLs = []string{highestPriorityURL}
185 } 185 }
186 186
187 if len(validURLs) == 0 { 187 if len(validURLs) == 0 {
188 return nil, fmt.Errorf("no valid source URLs found in response") 188 return nil, fmt.Errorf("no valid source URLs found in response")
189 } 189 }