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:
193193curd [options]
194194```
195195
196### Arugments would always take precendence over configuration
196### Arguments would always take precedence over configuration
197197
198198> **Note**:
199199> - 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) {
5757
5858 // Prepare the anime list
5959 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) {
6262 shows(search: $search, limit: $limit, page: $page, translationType: $translationType, countryOrigin: $countryOrigin) {
6363 edges {
6464 _id
@@ -139,13 +139,13 @@ func SearchAnime(query, mode string) (map[string]string, error) {
139139 episodesStr = "Unknown"
140140 }
141141 }
142
142
143143 // Use English name if available and configured, otherwise use default name
144144 displayName := anime.Name
145145 if anime.EnglishName != "" && userCurdConfig.AnimeNameLanguage == "english" {
146146 displayName = anime.EnglishName
147147 }
148
148
149149 animeList[anime.ID] = fmt.Sprintf("%s (%s episodes)", displayName, episodesStr)
150150 }
151151 return animeList, nil
internal/curd.go +1 −1
@@ -153,7 +153,7 @@ func ExitCurd(err error) {
153153 CurdOut("Have a great day!")
154154 // If the error is not about the connection refused, print the error
155155 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))
157157 if runtime.GOOS == "windows" {
158158 fmt.Println("Press Enter to exit")
159159 var wait string
internal/episode_url.go +2 −2
@@ -112,7 +112,7 @@ func extractLinks(provider_id string) map[string]interface{} {
112112// - []string: a list of links for specified episode.
113113// - error: an error if the episode is not found or if there is an issue during the search.
114114func 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}}`
116116
117117 variables := map[string]string{
118118 "showId": id,
@@ -183,7 +183,7 @@ func GetEpisodeURL(config CurdConfig, id string, epNo int) ([]string, error) {
183183 if highestPriorityURL != "" {
184184 validURLs = []string{highestPriorityURL}
185185 }
186
186
187187 if len(validURLs) == 0 {
188188 return nil, fmt.Errorf("no valid source URLs found in response")
189189 }