@@ -198,44 +198,10 @@ def download_all_assets(tmpdir: str, version="0.2.5"):
198198 suffix = "zip" if is_win else "tar.gz"
199199 RVCMD_URL = BASE_URL + f"v{ version } /rvcmd_{ system_type } _{ architecture } .{ suffix } "
200200 cmdfile = os .path .join (tmpdir , "rvcmd" )
201- try :
202- if is_win :
203- download_and_extract_zip (RVCMD_URL , tmpdir )
204- cmdfile += ".exe"
205- else :
206- download_and_extract_tar_gz (RVCMD_URL , tmpdir )
207- os .chmod (cmdfile , 0o755 )
208- subprocess .run ([cmdfile , "-notui" , "-w" , "0" , "assets/rvc" ])
209- except Exception :
210- BASE_URL = "https://raw.gitcode.com/u011570312/RVC-Models-Downloader/assets/"
211- suffix = {
212- "darwin_amd64" : "555" ,
213- "darwin_arm64" : "556" ,
214- "linux_386" : "557" ,
215- "linux_amd64" : "558" ,
216- "linux_arm64" : "559" ,
217- "windows_386" : "562" ,
218- "windows_amd64" : "563" ,
219- }[f"{ system_type } _{ architecture } " ]
220- RVCMD_URL = BASE_URL + suffix
221- download_dns_yaml (
222- "https://raw.gitcode.com/u011570312/RVC-Models-Downloader/raw/main/dns.yaml" ,
223- tmpdir ,
224- )
225- if is_win :
226- download_and_extract_zip (RVCMD_URL , tmpdir )
227- cmdfile += ".exe"
228- else :
229- download_and_extract_tar_gz (RVCMD_URL , tmpdir )
230- os .chmod (cmdfile , 0o755 )
231- subprocess .run (
232- [
233- cmdfile ,
234- "-notui" ,
235- "-w" ,
236- "0" ,
237- "-dns" ,
238- os .path .join (tmpdir , "dns.yaml" ),
239- "assets/rvc" ,
240- ]
241- )
201+ if is_win :
202+ download_and_extract_zip (RVCMD_URL , tmpdir )
203+ cmdfile += ".exe"
204+ else :
205+ download_and_extract_tar_gz (RVCMD_URL , tmpdir )
206+ os .chmod (cmdfile , 0o755 )
207+ subprocess .run ([cmdfile , "-notui" , "-w" , "0" , "assets/rvc" ])
0 commit comments