Skip to content

Commit

Permalink
add force api mode
Browse files Browse the repository at this point in the history
  • Loading branch information
itouakirai authored May 7, 2024
1 parent 97f0fa5 commit 7589401
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type Config struct {
CoverFormat string `yaml:"cover-format"`
AlacSaveFolder string `yaml:"alac-save-folder"`
AtmosSaveFolder string `yaml:"atmos-save-folder"`
ForceApi bool `yaml:"force-api"`
Check string `yaml:"check"`
}

Expand Down Expand Up @@ -1249,6 +1250,12 @@ func rip(albumId string, token string, storefront string, userToken string) erro
if string(Checkbody) != "no_found"{
manifest.Attributes.ExtendedAssetUrls.EnhancedHls=string(Checkbody)
fmt.Println("Found m3u8 from API")
} else {
if config.ForceApi {
fmt.Println(" Not Found m3u8 from API, Skip")
continue
}
fmt.Println(" Not Found m3u8 from API")
}
}
}
Expand Down Expand Up @@ -2059,4 +2066,4 @@ type SongLyrics struct {
} `json:"playParams"`
} `json:"attributes"`
} `json:"data"`
}
}

0 comments on commit 7589401

Please sign in to comment.