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