From 3ba685448a469f08dd86f6fbf09826ea3b4ecb14 Mon Sep 17 00:00:00 2001 From: MCorange99 Date: Mon, 15 Apr 2024 17:47:43 +0300 Subject: [PATCH] Refractored downloader Implemented add command Created config and merged it with cli --- manifest.json | 638 ++++++++++++---- music_mgr/Cargo.lock | 1154 +++++++++++++++++++++++++++++ music_mgr/Cargo.toml | 2 + music_mgr/src/commands/add.rs | 38 + music_mgr/src/commands/mod.rs | 19 +- music_mgr/src/{ => config}/cli.rs | 21 +- music_mgr/src/config/mod.rs | 132 ++++ music_mgr/src/constants.rs | 15 + music_mgr/src/downloader.rs | 20 +- music_mgr/src/main.rs | 21 +- music_mgr/src/manifest.rs | 30 +- music_mgr/src/prompt.rs | 105 ++- music_mgr/src/util.rs | 36 +- 13 files changed, 2012 insertions(+), 219 deletions(-) create mode 100644 music_mgr/src/commands/add.rs rename music_mgr/src/{ => config}/cli.rs (71%) create mode 100644 music_mgr/src/config/mod.rs create mode 100644 music_mgr/src/constants.rs diff --git a/manifest.json b/manifest.json index 3401a78..c003134 100644 --- a/manifest.json +++ b/manifest.json @@ -1,147 +1,495 @@ { - "format": "m4a", - "genres": { - "pop": [ - {"name": "Green Day - Basket Case", "url": "https://www.youtube.com/watch?v=wZ8eZRxFA-0"}, - {"name": "Icona Pop - I Love It", "url": "https://www.youtube.com/watch?v=UxxajLWwzqY"} - ], - "hip-hop": [ - {"name": "Afroman - Because I Got High", "url": "https://www.youtube.com/watch?v=WeYsTmIzjkw"} - ], - "rave": [ - {"name": "EVERYTHING WHAT", "url": "https://www.youtube.com/watch?v=Gjdsq4kc5cA"}, - {"name": "Tricky Disco", "url": "https://www.youtube.com/watch?v=t78qVdbAiXw"}, - {"name": "DR. VODKA - Tricky Disco", "url": "https://www.youtube.com/watch?v=IknAUhl3i2o"} - ], - "techno": [ - {"name": "Dance For Me", "url": "https://www.youtube.com/watch?v=5DTSvGO_944"}, - {"name": "Give It To Me", "url": "https://www.youtube.com/watch?v=upQe8EeSyZU"}, - {"name": "Empire Of The Sun, southstar - We Are The People", "url": "https://www.youtube.com/watch?v=qguEGR5BK2k"}, - {"name": "Beggin' (Techno)", "url": "https://www.youtube.com/watch?v=tXPs1FwW6lk"}, - {"name": "Lily Allen - Not Fair", "url": "https://www.youtube.com/watch?v=WON_YIbeLis"}, - {"name": "I WAS MADE FOR LOVIN' YOU (TECHNO)", "url": "https://www.youtube.com/watch?v=asVznhccYao"}, - {"name": "Nicolas Julian - Applause", "url": "https://www.youtube.com/watch?v=-pXlrWVICAE"}, - {"name": "08 Blumchen - Blaue Augen", "url": "https://www.youtube.com/watch?v=mE4PZcUfiwE"}, - {"name": "MUTA - Party maker", "url": "https://www.youtube.com/watch?v=LT9VNK1aCXY"}, - {"name": "Restricted - Big Jet Plane", "url": "https://www.youtube.com/watch?v=NpVF0z5N-tE"} - ], - "electronic": [ - {"name": "Zombie Nation - Kernkraft 400", "url": "https://www.youtube.com/watch?v=z5LW07FTJbI"}, - {"name": "Benny Benassi - Satisfaction", "url": "https://www.youtube.com/watch?v=a0fkNdPiIL4"} - - ], - "rock": [ - {"name": "Black Sabbath", "url": "https://www.youtube.com/watch?v=BOTIIw76qiE"} - ], - "house": [ - {"name": "Ralph Castelli - Morning Sex (Mochakk Remix)", "url": "https://www.youtube.com/watch?v=6bCwJ_TIDG4"}, - {"name": "Billie Eilish - Bossa Nova (Lewii Edit)", "url": "https://www.youtube.com/watch?v=gNawHj2NCxA"}, - {"name": "Fidde - I Only See Things I Dont Have", "url": "https://www.youtube.com/watch?v=vX_Ye_ZzI-Y"}, - {"name": "Bauhouse - After Marvins Dance (Marvin Gaye's 'After The Dance' Edit)", "url": "https://www.youtube.com/watch?v=J-cgyYiExh8"}, - {"name": "Men I Trust - Tailwhip (Lewii Edit)", "url": "https://www.youtube.com/watch?v=XhyM-JUWwWQ"}, - {"name": "Sweely - Le Son Dancefloor", "url": "https://www.youtube.com/watch?v=5uEvZgmoG6Y"}, - {"name": "THEOS - Rhodes Trip", "url": "https://www.youtube.com/watch?v=m7guRO0Uz_c"}, - {"name": "Baltra - Tears Drop", "url": "https://www.youtube.com/watch?v=EXXMtKPfuzY"}, - {"name": "Fidde - If Theres A Heaven I Wanna See It", "url": "https://www.youtube.com/watch?v=l2Nw7cIh7qg"}, - {"name": "Unknown Artist - Kcik 23", "url": "https://www.youtube.com/watch?v=SnnqDdZJpzA"} - ], - "lietuviskos": [ - {"name": "Adomas Vysniauskas - As Judu", "url": "https://www.youtube.com/watch?v=dMm16TzZrjg"}, - {"name": "RADVIS - KINO FILMAI", "url": "https://www.youtube.com/watch?v=vhAEkC3xNMo"}, - {"name": "16Hz - Autostrada Vilnius - Kaunas", "url": "https://www.youtube.com/watch?v=ANS2TSegr40"}, - {"name": "Zas - Zalias Pasas", "url": "https://www.youtube.com/watch?v=SZA7IjlCfyI"}, - {"name": "Dzordana Butkute - Nebenoriu Laukt", "url": "https://www.youtube.com/watch?v=_AozFrAqNMk"}, - {"name": "Juodas Garvezys (Remix)", "url": "https://www.youtube.com/watch?v=D-7qQbXHSAw"}, - {"name": "morre - Kaip Diena", "url": "https://www.youtube.com/watch?v=6LDgLWCQSSM"}, - {"name": "MC ENDRAY - AUDI", "url": "https://www.youtube.com/watch?v=oIjNoMGEuRg"}, - {"name": "Mercy Dance - I Pajuri", "url": "https://www.youtube.com/watch?v=RPpkMh47l9w"}, - {"name": "NL - Pasitusinam", "url": "https://www.youtube.com/watch?v=WhSFudvloog"}, - {"name": "SixthBoi - Nevaidink", "url": "https://www.youtube.com/watch?v=nOTNnnrqTII"}, - {"name": "Mr.Bullet - UZ MUS IR JUS", "url": "https://www.youtube.com/watch?v=85q_7jXEgH8"}, - {"name": "Jovani, Karaliska Erdve - Is Leto Leidziasi Saule", "url": "https://www.youtube.com/watch?v=VqSu8iG1_DE"}, - {"name": "Rondo - Margarita", "url": "https://www.youtube.com/watch?v=rF4w-Rxsiv4"}, - {"name": "Radvis - TU ESI MELAGIS (Techno Extended)", "url": "https://www.youtube.com/watch?v=kmvvP7GW_bw"}, - {"name": "Zas - Myliu kina", "url": "https://www.youtube.com/watch?v=ImFrfmi-qT8"}, - {"name": "Zilvinas Zvagulis - Amerikonas grizo sunus", "url": "https://www.youtube.com/watch?v=UvzJEz5ADY8"}, - {"name": "Raketa - I Kluba", "url": "https://www.youtube.com/watch?v=FkSjtpYN3EI"}, - {"name": "Karaliska Erdve - Vakareja", "url": "https://www.youtube.com/watch?v=g0HmrlJ7fhE"}, - {"name": "Tnn - Parukom", "url": "https://www.youtube.com/watch?v=v9pBZK2RIPI"}, - {"name": "DJ Dalgis - Kauniete", "url": "https://www.youtube.com/watch?v=b3xPE9Iyuzc"}, - {"name": "Andzikas - I gamta", "url": "https://www.youtube.com/watch?v=UyLdjC-hihM"}, - {"name": "nemuno krantai - rytmecio rasos", "url": "https://www.youtube.com/watch?v=2-fGbsrofv4"}, - {"name": "Tipo grupe - Lovoj Vezi", "url": "https://www.youtube.com/watch?v=M3zVMzWCy_c"}, - {"name": "Kastanenda - Sombrero", "url": "https://www.youtube.com/watch?v=3Z3_4TknCfQ"}, - {"name": "Elektra - Juda Tavo rankos", "url": "https://www.youtube.com/watch?v=k2RuDoudnOE"}, - {"name": "Vilija ir Marijonas mikutavicius - Dabar Geriausi Musu Vakarai", "url": "https://www.youtube.com/watch?v=MPnZkEscWo0"}, - {"name": "Parnesk alaus OG", "url": "https://www.youtube.com/watch?v=e7cB1JIlZ2k"}, - {"name": "Eugenijus Ostapenko - Dviratukas", "url": "https://www.youtube.com/watch?v=ILFHZQK33Mw"}, - {"name": "Ciulpuoneliai - Jau Nutilo Sirgaliai", "url": "https://www.youtube.com/watch?v=s8qIVA1U0C0"}, - {"name": "Tweaxx - Mersas", "url": "https://www.youtube.com/watch?v=7ljAzgALPdA"}, - {"name": "Dove - Naktinis Tusas", "url": "https://www.youtube.com/watch?v=pz-HEAwFEnk"}, - {"name": "MAMA MANE RODYS PER FARUS", "url": "https://www.youtube.com/watch?v=F5HqXYRDZaE"}, - {"name": "Kastaneda - Kelyje", "url": "https://www.youtube.com/watch?v=JVE6NQqKPL4"}, - {"name": "NL - Juodas Golfas", "url": "https://www.youtube.com/watch?v=f2-ZmElSvPc"}, - {"name": "DJ Dalgis - Zalia Siera", "url": "https://www.youtube.com/watch?v=nfentq_pez4"}, - {"name": "L1GHT CASH - Whiskey Cola Lietuviskai (sultys degtinele) remix", "url": "https://www.youtube.com/watch?v=YVaqDaf1KXU"}, - {"name": "Tipo grupe ir Kastaneda - Po stikliuka", "url": "https://www.youtube.com/watch?v=EtmE60nE7fI"}, - {"name": "MG INTERNATIONAL - JUODA ORCHIDEJA", "url": "https://www.youtube.com/watch?v=HQvceFRBq9M"}, - {"name": "Ganja - Truputi", "url": "https://www.youtube.com/watch?v=Pxve7CwiCHM"}, - {"name": "Riaukenzo - Trys Trys Trys", "url": "https://www.youtube.com/watch?v=qJv6GRQCnCk"}, - {"name": "Grupiokai - Degtine", "url": "https://www.youtube.com/watch?v=8SqbG2VmEFw"}, - {"name": "Robertas Kupstas - Cia Mano Rojus", "url": "https://www.youtube.com/watch?v=xij_YeEInr8"}, - {"name": "NIERKA - PENKTADIENIS", "url": "https://www.youtube.com/watch?v=h3TuZj_OAf0"}, - {"name": "VAIKAI PO LELIJOM (REMIX)", "url": "https://www.youtube.com/watch?v=k1amBbsAZuo"}, - {"name": "Vitalija Katunskyte - Robinzonas", "url": "https://www.youtube.com/watch?v=erDHG-QpbPY"}, - {"name": "Rycka klipas", "url": "https://www.youtube.com/watch?v=nuTUDSQ3BBI"}, - {"name": "Nezinau, Kodel...", "url": "https://www.youtube.com/watch?v=A-i2CkCnPoc"}, - {"name": "NL - R1", "url": "https://www.youtube.com/watch?v=hSgav4fYnZ8"}, - {"name": "DJ Dalgis - Negeriau", "url": "https://www.youtube.com/watch?v=c89YvG3MCcs"}, - {"name": "Tipo Grupe - tipo daina", "url": "https://www.youtube.com/watch?v=PTIOaSjEgIU"}, - {"name": "Depresinis feat. Deivas - 0,7", "url": "https://www.youtube.com/watch?v=rjwFjBgTzAA"}, - {"name": "Depresinis & MERAKI2004 - VASARA ZJBS", "url": "https://www.youtube.com/watch?v=BD-pBjRy-5A"}, - {"name": "Depresinis feat. Deivas - LEDUKAI", "url": "https://www.youtube.com/watch?v=R2-MtpkKgGI"}, - {"name": "Depresinis feat. Deivas - Pavasaris", "url": "https://www.youtube.com/watch?v=yWWAucfQdN4"}, - {"name": "Depresinis - LEDINE", "url": "https://www.youtube.com/watch?v=qugvChkXMLk"}, - {"name": "Depresinis, Jypas - O Mazuti", "url": "https://www.youtube.com/watch?v=4t_DPbe2r3M"}, - {"name": "AVA - Eik Tu NA", "url": "https://www.youtube.com/watch?v=yRf3ijaIgOg"}, - {"name": "Judam Lietuvoj", "url": "https://www.youtube.com/watch?v=WDzWSEgSy5U"}, - {"name": "16Hz - Baliavojam", "url": "https://www.youtube.com/watch?v=Ia-qERX8WLs"}, - {"name": "Deivas - Klaipeda On Top", "url": "https://www.youtube.com/watch?v=g_h2M3e2OYU"}, - {"name": "Depresinis - Volkswagina", "url": "https://www.youtube.com/watch?v=1lZR1VKsQHo"}, - {"name": "SADBOY - Kaifuok", "url": "https://www.youtube.com/watch?v=vclryWgfy8I"}, - {"name": "SADBOY - Blizgantys Naikai", "url": "https://www.youtube.com/watch?v=p5KsYJGcfOM"}, - {"name": "SADBOY - 1001 Naktis", "url": "https://www.youtube.com/watch?v=mLJIjGvWmKI"}, - {"name": "SADBOY - Deginam", "url": "https://www.youtube.com/watch?v=w3R0Aq1EGXg"}, - {"name": "Wenona Waves - Topine Panele", "url": "https://www.youtube.com/watch?v=MPHuhmUomfE"}, - {"name": "Andzikas - Virs debesu", "url": "https://www.youtube.com/watch?v=PHJcVGhxra8"}, - {"name": "Grupe MX - 1.9 TDI", "url": "https://www.youtube.com/watch?v=8FBr5GQXsI8"}, - {"name": "Patruliai - Kur Tu", "url": "https://www.youtube.com/watch?v=OPWhiu3cvj0"}, - {"name": "Ka Tu Ka Vakare", "url": "https://www.youtube.com/watch?v=6SOS4ljHbJY"} - ], - "lietuviskos/rave": [ - {"name": "VainHouse - Malunas Prie Kelio", "url": "https://www.youtube.com/watch?v=bbwuNjDXCiM"}, - {"name": "Sokoledas - Mano Skonis Sokolado (Matuze & Arnisxd Remix)", "url": "https://www.youtube.com/watch?v=hb41bfQxiM0"} - ], - "rusiskos": [ - {"name": "Topolini puh", "url": "https://www.youtube.com/watch?v=UUryvYF8tUs"}, - {"name": "Raim & Artur feat. Zhenis - Diskoteka is 90 hit", "url": "https://www.youtube.com/watch?v=GfBhxlNhrn0"}, - {"name": "Pimp Schwab - vse shto nas ne Ubivaet", "url": "https://www.youtube.com/watch?v=NTEXFyUE9Ww"}, - {"name": "Dzaro and hansa - Visky Kola karaleva trans pola", "url": "https://www.youtube.com/watch?v=fflrMvZ2HtA"} - ], - "noclue": [ - {"name": "Bad Boys", "url": "https://www.youtube.com/watch?v=NTC7RD8xzCY"}, - {"name": "DR. VODKA - DZIEWCZYNO Z TIKTOKA", "url": "https://www.youtube.com/watch?v=HLbw1WQt64o"}, - {"name": "Maco Mamuko - Whiskey, Cola i Tequila", "url": "https://www.youtube.com/watch?v=aBrN0k0Phtc"}, - {"name": "Discobitch - C'est Beau La Bourgeoisie", "url": "https://www.youtube.com/watch?v=RCeQN2aEWxo"} - - ], - "reggea": [ - {"name": "Shaggy - It Wasn't Me", "url": "https://www.youtube.com/watch?v=ssVj50ombaM"} - ], - "alt": [ - {"name": "ROMANCEPLANET - FALL FROM THE SKY", "url": "https://www.youtube.com/watch?v=HMhzxzXBisw"}, - {"name": "ROMANCEPLANET - PLAIN WHITE TEE", "url": "https://www.youtube.com/watch?v=tdVQbNwjGac"}, - {"name": "ROMANCEPLANET - DANCE", "url": "https://www.youtube.com/watch?v=ircOfMb4gEw"} - ] - } + "format": "m4a", + "genres": { + "rave": [ + { + "name": "EVERYTHING WHAT", + "url": "https://www.youtube.com/watch?v=Gjdsq4kc5cA" + }, + { + "name": "Tricky Disco", + "url": "https://www.youtube.com/watch?v=t78qVdbAiXw" + }, + { + "name": "DR. VODKA - Tricky Disco", + "url": "https://www.youtube.com/watch?v=IknAUhl3i2o" + } + ], + "hip-hop": [ + { + "name": "Afroman - Because I Got High", + "url": "https://www.youtube.com/watch?v=WeYsTmIzjkw" + }, + { + "name": "Drenchill - Freed from Desire", + "url": "https://www.youtube.com/watch?v=6b6FBneAENQ" + } + ], + "rusiskos": [ + { + "name": "Topolini puh", + "url": "https://www.youtube.com/watch?v=UUryvYF8tUs" + }, + { + "name": "Raim & Artur feat. Zhenis - Diskoteka is 90 hit", + "url": "https://www.youtube.com/watch?v=GfBhxlNhrn0" + }, + { + "name": "Pimp Schwab - vse shto nas ne Ubivaet", + "url": "https://www.youtube.com/watch?v=NTEXFyUE9Ww" + }, + { + "name": "Dzaro and hansa - Visky Kola karaleva trans pola", + "url": "https://www.youtube.com/watch?v=fflrMvZ2HtA" + } + ], + "pop": [ + { + "name": "Green Day - Basket Case", + "url": "https://www.youtube.com/watch?v=wZ8eZRxFA-0" + }, + { + "name": "Icona Pop - I Love It", + "url": "https://www.youtube.com/watch?v=UxxajLWwzqY" + }, + { + "name": "Modern Talking - You're My Heart, You're My Soul", + "url": "https://www.youtube.com/watch?v=4kHl4FoK1Ys" + } + ], + "house": [ + { + "name": "Ralph Castelli - Morning Sex (Mochakk Remix)", + "url": "https://www.youtube.com/watch?v=6bCwJ_TIDG4" + }, + { + "name": "Billie Eilish - Bossa Nova (Lewii Edit)", + "url": "https://www.youtube.com/watch?v=gNawHj2NCxA" + }, + { + "name": "Fidde - I Only See Things I Dont Have", + "url": "https://www.youtube.com/watch?v=vX_Ye_ZzI-Y" + }, + { + "name": "Bauhouse - After Marvins Dance (Marvin Gaye's 'After The Dance' Edit)", + "url": "https://www.youtube.com/watch?v=J-cgyYiExh8" + }, + { + "name": "Men I Trust - Tailwhip (Lewii Edit)", + "url": "https://www.youtube.com/watch?v=XhyM-JUWwWQ" + }, + { + "name": "Sweely - Le Son Dancefloor", + "url": "https://www.youtube.com/watch?v=5uEvZgmoG6Y" + }, + { + "name": "THEOS - Rhodes Trip", + "url": "https://www.youtube.com/watch?v=m7guRO0Uz_c" + }, + { + "name": "Baltra - Tears Drop", + "url": "https://www.youtube.com/watch?v=EXXMtKPfuzY" + }, + { + "name": "Fidde - If Theres A Heaven I Wanna See It", + "url": "https://www.youtube.com/watch?v=l2Nw7cIh7qg" + }, + { + "name": "Unknown Artist - Kcik 23", + "url": "https://www.youtube.com/watch?v=SnnqDdZJpzA" + } + ], + "electronic": [ + { + "name": "Zombie Nation - Kernkraft 400", + "url": "https://www.youtube.com/watch?v=z5LW07FTJbI" + }, + { + "name": "Benny Benassi - Satisfaction", + "url": "https://www.youtube.com/watch?v=a0fkNdPiIL4" + } + ], + "lietuviskos/rave": [ + { + "name": "VainHouse - Malunas Prie Kelio", + "url": "https://www.youtube.com/watch?v=bbwuNjDXCiM" + }, + { + "name": "Sokoledas - Mano Skonis Sokolado (Matuze & Arnisxd Remix)", + "url": "https://www.youtube.com/watch?v=hb41bfQxiM0" + } + ], + "reggea": [ + { + "name": "Shaggy - It Wasn't Me", + "url": "https://www.youtube.com/watch?v=ssVj50ombaM" + } + ], + "rock": [ + { + "name": "Black Sabbath", + "url": "https://www.youtube.com/watch?v=BOTIIw76qiE" + } + ], + "noclue": [ + { + "name": "Bad Boys", + "url": "https://www.youtube.com/watch?v=NTC7RD8xzCY" + }, + { + "name": "DR. VODKA - DZIEWCZYNO Z TIKTOKA", + "url": "https://www.youtube.com/watch?v=HLbw1WQt64o" + }, + { + "name": "Maco Mamuko - Whiskey, Cola i Tequila", + "url": "https://www.youtube.com/watch?v=aBrN0k0Phtc" + }, + { + "name": "Discobitch - C'est Beau La Bourgeoisie", + "url": "https://www.youtube.com/watch?v=RCeQN2aEWxo" + } + ], + "techno": [ + { + "name": "Dance For Me", + "url": "https://www.youtube.com/watch?v=5DTSvGO_944" + }, + { + "name": "Give It To Me", + "url": "https://www.youtube.com/watch?v=upQe8EeSyZU" + }, + { + "name": "Empire Of The Sun, southstar - We Are The People", + "url": "https://www.youtube.com/watch?v=qguEGR5BK2k" + }, + { + "name": "Beggin' (Techno)", + "url": "https://www.youtube.com/watch?v=tXPs1FwW6lk" + }, + { + "name": "Lily Allen - Not Fair", + "url": "https://www.youtube.com/watch?v=WON_YIbeLis" + }, + { + "name": "I WAS MADE FOR LOVIN' YOU (TECHNO)", + "url": "https://www.youtube.com/watch?v=asVznhccYao" + }, + { + "name": "Nicolas Julian - Applause", + "url": "https://www.youtube.com/watch?v=-pXlrWVICAE" + }, + { + "name": "08 Blumchen - Blaue Augen", + "url": "https://www.youtube.com/watch?v=mE4PZcUfiwE" + }, + { + "name": "MUTA - Party maker", + "url": "https://www.youtube.com/watch?v=LT9VNK1aCXY" + }, + { + "name": "Restricted - Big Jet Plane", + "url": "https://www.youtube.com/watch?v=NpVF0z5N-tE" + } + ], + "lietuviskos": [ + { + "name": "Adomas Vysniauskas - As Judu", + "url": "https://www.youtube.com/watch?v=dMm16TzZrjg" + }, + { + "name": "RADVIS - KINO FILMAI", + "url": "https://www.youtube.com/watch?v=vhAEkC3xNMo" + }, + { + "name": "16Hz - Autostrada Vilnius - Kaunas", + "url": "https://www.youtube.com/watch?v=ANS2TSegr40" + }, + { + "name": "Zas - Zalias Pasas", + "url": "https://www.youtube.com/watch?v=SZA7IjlCfyI" + }, + { + "name": "Dzordana Butkute - Nebenoriu Laukt", + "url": "https://www.youtube.com/watch?v=_AozFrAqNMk" + }, + { + "name": "Juodas Garvezys (Remix)", + "url": "https://www.youtube.com/watch?v=D-7qQbXHSAw" + }, + { + "name": "morre - Kaip Diena", + "url": "https://www.youtube.com/watch?v=6LDgLWCQSSM" + }, + { + "name": "MC ENDRAY - AUDI", + "url": "https://www.youtube.com/watch?v=oIjNoMGEuRg" + }, + { + "name": "Mercy Dance - I Pajuri", + "url": "https://www.youtube.com/watch?v=RPpkMh47l9w" + }, + { + "name": "NL - Pasitusinam", + "url": "https://www.youtube.com/watch?v=WhSFudvloog" + }, + { + "name": "SixthBoi - Nevaidink", + "url": "https://www.youtube.com/watch?v=nOTNnnrqTII" + }, + { + "name": "Mr.Bullet - UZ MUS IR JUS", + "url": "https://www.youtube.com/watch?v=85q_7jXEgH8" + }, + { + "name": "Jovani, Karaliska Erdve - Is Leto Leidziasi Saule", + "url": "https://www.youtube.com/watch?v=VqSu8iG1_DE" + }, + { + "name": "Rondo - Margarita", + "url": "https://www.youtube.com/watch?v=rF4w-Rxsiv4" + }, + { + "name": "Radvis - TU ESI MELAGIS (Techno Extended)", + "url": "https://www.youtube.com/watch?v=kmvvP7GW_bw" + }, + { + "name": "Zas - Myliu kina", + "url": "https://www.youtube.com/watch?v=ImFrfmi-qT8" + }, + { + "name": "Zilvinas Zvagulis - Amerikonas grizo sunus", + "url": "https://www.youtube.com/watch?v=UvzJEz5ADY8" + }, + { + "name": "Raketa - I Kluba", + "url": "https://www.youtube.com/watch?v=FkSjtpYN3EI" + }, + { + "name": "Karaliska Erdve - Vakareja", + "url": "https://www.youtube.com/watch?v=g0HmrlJ7fhE" + }, + { + "name": "Tnn - Parukom", + "url": "https://www.youtube.com/watch?v=v9pBZK2RIPI" + }, + { + "name": "DJ Dalgis - Kauniete", + "url": "https://www.youtube.com/watch?v=b3xPE9Iyuzc" + }, + { + "name": "Andzikas - I gamta", + "url": "https://www.youtube.com/watch?v=UyLdjC-hihM" + }, + { + "name": "nemuno krantai - rytmecio rasos", + "url": "https://www.youtube.com/watch?v=2-fGbsrofv4" + }, + { + "name": "Tipo grupe - Lovoj Vezi", + "url": "https://www.youtube.com/watch?v=M3zVMzWCy_c" + }, + { + "name": "Kastanenda - Sombrero", + "url": "https://www.youtube.com/watch?v=3Z3_4TknCfQ" + }, + { + "name": "Elektra - Juda Tavo rankos", + "url": "https://www.youtube.com/watch?v=k2RuDoudnOE" + }, + { + "name": "Vilija ir Marijonas mikutavicius - Dabar Geriausi Musu Vakarai", + "url": "https://www.youtube.com/watch?v=MPnZkEscWo0" + }, + { + "name": "Parnesk alaus OG", + "url": "https://www.youtube.com/watch?v=e7cB1JIlZ2k" + }, + { + "name": "Eugenijus Ostapenko - Dviratukas", + "url": "https://www.youtube.com/watch?v=ILFHZQK33Mw" + }, + { + "name": "Ciulpuoneliai - Jau Nutilo Sirgaliai", + "url": "https://www.youtube.com/watch?v=s8qIVA1U0C0" + }, + { + "name": "Tweaxx - Mersas", + "url": "https://www.youtube.com/watch?v=7ljAzgALPdA" + }, + { + "name": "Dove - Naktinis Tusas", + "url": "https://www.youtube.com/watch?v=pz-HEAwFEnk" + }, + { + "name": "MAMA MANE RODYS PER FARUS", + "url": "https://www.youtube.com/watch?v=F5HqXYRDZaE" + }, + { + "name": "Kastaneda - Kelyje", + "url": "https://www.youtube.com/watch?v=JVE6NQqKPL4" + }, + { + "name": "NL - Juodas Golfas", + "url": "https://www.youtube.com/watch?v=f2-ZmElSvPc" + }, + { + "name": "DJ Dalgis - Zalia Siera", + "url": "https://www.youtube.com/watch?v=nfentq_pez4" + }, + { + "name": "L1GHT CASH - Whiskey Cola Lietuviskai (sultys degtinele) remix", + "url": "https://www.youtube.com/watch?v=YVaqDaf1KXU" + }, + { + "name": "Tipo grupe ir Kastaneda - Po stikliuka", + "url": "https://www.youtube.com/watch?v=EtmE60nE7fI" + }, + { + "name": "MG INTERNATIONAL - JUODA ORCHIDEJA", + "url": "https://www.youtube.com/watch?v=HQvceFRBq9M" + }, + { + "name": "Ganja - Truputi", + "url": "https://www.youtube.com/watch?v=Pxve7CwiCHM" + }, + { + "name": "Riaukenzo - Trys Trys Trys", + "url": "https://www.youtube.com/watch?v=qJv6GRQCnCk" + }, + { + "name": "Grupiokai - Degtine", + "url": "https://www.youtube.com/watch?v=8SqbG2VmEFw" + }, + { + "name": "Robertas Kupstas - Cia Mano Rojus", + "url": "https://www.youtube.com/watch?v=xij_YeEInr8" + }, + { + "name": "NIERKA - PENKTADIENIS", + "url": "https://www.youtube.com/watch?v=h3TuZj_OAf0" + }, + { + "name": "VAIKAI PO LELIJOM (REMIX)", + "url": "https://www.youtube.com/watch?v=k1amBbsAZuo" + }, + { + "name": "Vitalija Katunskyte - Robinzonas", + "url": "https://www.youtube.com/watch?v=erDHG-QpbPY" + }, + { + "name": "Rycka klipas", + "url": "https://www.youtube.com/watch?v=nuTUDSQ3BBI" + }, + { + "name": "Nezinau, Kodel...", + "url": "https://www.youtube.com/watch?v=A-i2CkCnPoc" + }, + { + "name": "NL - R1", + "url": "https://www.youtube.com/watch?v=hSgav4fYnZ8" + }, + { + "name": "DJ Dalgis - Negeriau", + "url": "https://www.youtube.com/watch?v=c89YvG3MCcs" + }, + { + "name": "Tipo Grupe - tipo daina", + "url": "https://www.youtube.com/watch?v=PTIOaSjEgIU" + }, + { + "name": "Depresinis feat. Deivas - 0,7", + "url": "https://www.youtube.com/watch?v=rjwFjBgTzAA" + }, + { + "name": "Depresinis & MERAKI2004 - VASARA ZJBS", + "url": "https://www.youtube.com/watch?v=BD-pBjRy-5A" + }, + { + "name": "Depresinis feat. Deivas - LEDUKAI", + "url": "https://www.youtube.com/watch?v=R2-MtpkKgGI" + }, + { + "name": "Depresinis feat. Deivas - Pavasaris", + "url": "https://www.youtube.com/watch?v=yWWAucfQdN4" + }, + { + "name": "Depresinis - LEDINE", + "url": "https://www.youtube.com/watch?v=qugvChkXMLk" + }, + { + "name": "Depresinis, Jypas - O Mazuti", + "url": "https://www.youtube.com/watch?v=4t_DPbe2r3M" + }, + { + "name": "AVA - Eik Tu NA", + "url": "https://www.youtube.com/watch?v=yRf3ijaIgOg" + }, + { + "name": "Judam Lietuvoj", + "url": "https://www.youtube.com/watch?v=WDzWSEgSy5U" + }, + { + "name": "16Hz - Baliavojam", + "url": "https://www.youtube.com/watch?v=Ia-qERX8WLs" + }, + { + "name": "Deivas - Klaipeda On Top", + "url": "https://www.youtube.com/watch?v=g_h2M3e2OYU" + }, + { + "name": "Depresinis - Volkswagina", + "url": "https://www.youtube.com/watch?v=1lZR1VKsQHo" + }, + { + "name": "SADBOY - Kaifuok", + "url": "https://www.youtube.com/watch?v=vclryWgfy8I" + }, + { + "name": "SADBOY - Blizgantys Naikai", + "url": "https://www.youtube.com/watch?v=p5KsYJGcfOM" + }, + { + "name": "SADBOY - 1001 Naktis", + "url": "https://www.youtube.com/watch?v=mLJIjGvWmKI" + }, + { + "name": "SADBOY - Deginam", + "url": "https://www.youtube.com/watch?v=w3R0Aq1EGXg" + }, + { + "name": "Wenona Waves - Topine Panele", + "url": "https://www.youtube.com/watch?v=MPHuhmUomfE" + }, + { + "name": "Andzikas - Virs debesu", + "url": "https://www.youtube.com/watch?v=PHJcVGhxra8" + }, + { + "name": "Grupe MX - 1.9 TDI", + "url": "https://www.youtube.com/watch?v=8FBr5GQXsI8" + }, + { + "name": "Patruliai - Kur Tu", + "url": "https://www.youtube.com/watch?v=OPWhiu3cvj0" + }, + { + "name": "Ka Tu Ka Vakare", + "url": "https://www.youtube.com/watch?v=6SOS4ljHbJY" + } + ], + "alt": [ + { + "name": "ROMANCEPLANET - FALL FROM THE SKY", + "url": "https://www.youtube.com/watch?v=HMhzxzXBisw" + }, + { + "name": "ROMANCEPLANET - PLAIN WHITE TEE", + "url": "https://www.youtube.com/watch?v=tdVQbNwjGac" + }, + { + "name": "ROMANCEPLANET - DANCE", + "url": "https://www.youtube.com/watch?v=ircOfMb4gEw" + } + ] + } } \ No newline at end of file diff --git a/music_mgr/Cargo.lock b/music_mgr/Cargo.lock index aed264f..f86a362 100644 --- a/music_mgr/Cargo.lock +++ b/music_mgr/Cargo.lock @@ -17,6 +17,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -80,6 +91,12 @@ version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + [[package]] name = "backtrace" version = "0.3.71" @@ -95,12 +112,78 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "camino" version = "1.1.6" @@ -112,6 +195,10 @@ name = "cc" version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd97381a8cc6493395a5afc4c691c1084b3768db713b73aa215217aa245d153" +dependencies = [ + "jobserver", + "libc", +] [[package]] name = "cfg-if" @@ -119,6 +206,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clap" version = "4.5.4" @@ -165,6 +262,91 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + [[package]] name = "env_filter" version = "0.1.0" @@ -188,12 +370,148 @@ dependencies = [ "log", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "gimli" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "h2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.5.0" @@ -206,18 +524,176 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + [[package]] name = "humantime" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "hyper" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + [[package]] name = "itoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685a7d121ee3f65ae4fddd72b25a04bb36b6af81bc0828f7d5434c0fe60fa3a2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -230,6 +706,12 @@ version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + [[package]] name = "log" version = "0.4.21" @@ -242,6 +724,12 @@ version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "miniz_oxide" version = "0.7.2" @@ -274,12 +762,38 @@ dependencies = [ "lazy_static", "libc", "log", + "reqwest", "serde", "serde_json", "tokio", "windows", + "zip-extensions", ] +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num_cpus" version = "1.16.0" @@ -299,12 +813,129 @@ dependencies = [ "memchr", ] +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pin-project-lite" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "proc-macro2" version = "1.0.79" @@ -323,6 +954,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + [[package]] name = "regex" version = "1.10.4" @@ -352,18 +989,121 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +[[package]] +name = "reqwest" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e6cc1e89e689536eb5aeede61520e874df5a4707df811cd5da4aa5fbb2aae19" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + [[package]] name = "rustc-demangle" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustix" +version = "0.38.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" + [[package]] name = "ryu" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "security-framework" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "serde" version = "1.0.197" @@ -395,6 +1135,40 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -404,12 +1178,43 @@ dependencies = [ "libc", ] +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + [[package]] name = "syn" version = "2.0.58" @@ -421,6 +1226,79 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" version = "1.37.0" @@ -434,6 +1312,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "signal-hook-registry", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] @@ -449,24 +1328,231 @@ dependencies = [ "syn", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + [[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "windows" version = "0.56.0" @@ -658,3 +1744,71 @@ name = "windows_x86_64_msvc" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zip-extensions" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecf62554c4ff96bce01a7ef123d160c3ffe9180638820f8b4d545c65b221b8c" +dependencies = [ + "zip", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/music_mgr/Cargo.toml b/music_mgr/Cargo.toml index 9c34ecf..0a2985c 100644 --- a/music_mgr/Cargo.toml +++ b/music_mgr/Cargo.toml @@ -14,7 +14,9 @@ env_logger = "0.11.3" lazy_static = "1.4.0" libc = "0.2.153" log = "0.4.21" +reqwest = "0.12.3" serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.115" tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread", "process", "sync"] } windows = { version = "0.56.0", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_Console"] } +zip-extensions = "0.6.2" diff --git a/music_mgr/src/commands/add.rs b/music_mgr/src/commands/add.rs new file mode 100644 index 0000000..f7d81a1 --- /dev/null +++ b/music_mgr/src/commands/add.rs @@ -0,0 +1,38 @@ +use crate::{config::ConfigWrapper, downloader::Downloader, manifest::{Manifest, ManifestSong}}; + + + +pub async fn add(cfg: &ConfigWrapper, manifest: &mut Manifest, downloader: &mut Downloader, url: &Option, name: &Option, genre: &Option) -> anyhow::Result<()> { + + let genres = manifest.genres.keys().map(|f| f.clone()).collect::>(); + + let genre = genre.clone().unwrap_or( + crate::prompt::prompt_with_list_or_str("Enter song genre", &genres) + ); + + log::debug!("Genre: {genre}"); + + let url = url.clone().unwrap_or( + crate::prompt::simple_prompt("Enter song youtube url, make sure its not a playlist, (yt only for now)") + ); + + let name = name.clone().unwrap_or( + crate::prompt::simple_prompt("Enter song name with like this: {Author} - {Song name}") + ); + + manifest.add_song(genre.clone(), name.clone(), url.clone())?; + manifest.save()?; + + let should_download = crate::prompt::prompt_bool("Download song now?", Some(true)); + + if should_download { + let song = &ManifestSong { + name, + url, + }; + + downloader.download_song(cfg, song, &genre, &manifest.format()?).await?; + } + + Ok(()) +} \ No newline at end of file diff --git a/music_mgr/src/commands/mod.rs b/music_mgr/src/commands/mod.rs index 88e673d..a62532b 100644 --- a/music_mgr/src/commands/mod.rs +++ b/music_mgr/src/commands/mod.rs @@ -1,22 +1,27 @@ -use crate::{cli::{CliArgs, CliCommand}, downloader::Downloader, manifest::Manifest, util}; +mod add; + +use crate::{config::{cli::CliCommand, ConfigWrapper}, downloader::Downloader, manifest::Manifest}; -pub async fn command_run(cli: &CliArgs, manifest: &Manifest) { - let mut downloader = Downloader::new(util::get_ytdlp_path()); - match &cli.command { + +pub async fn command_run(cfg: &ConfigWrapper, manifest: &mut Manifest) -> anyhow::Result<()> { + let mut downloader = Downloader::new(cfg.cfg.ytdlp.path.clone()); + match &cfg.cli.command { None | Some(CliCommand::Download) => { - if let Ok(count) = downloader.download_all(manifest, &cli).await { + if let Ok(count) = downloader.download_all(manifest, &cfg).await { log::info!("Downloaded {count} songs"); } else { log::error!("Failed to download songs"); - return; + return Ok(()); } }, Some(c) => { match c { CliCommand::Download => unreachable!(), - CliCommand::Add { .. } => todo!(), + CliCommand::Add { url, name, genre } => add::add(cfg, manifest, &mut downloader, url, name, genre).await?, } } } + + Ok(()) } \ No newline at end of file diff --git a/music_mgr/src/cli.rs b/music_mgr/src/config/cli.rs similarity index 71% rename from music_mgr/src/cli.rs rename to music_mgr/src/config/cli.rs index 198db3e..086bd24 100644 --- a/music_mgr/src/cli.rs +++ b/music_mgr/src/config/cli.rs @@ -3,7 +3,7 @@ use clap::{Parser, Subcommand}; use crate::util::isatty; -#[derive(Debug, Parser)] +#[derive(Debug, Parser, Default)] pub struct CliArgs { /// Show more info #[arg(long, short)] @@ -17,11 +17,13 @@ pub struct CliArgs { #[arg(long, short, default_value_t=Utf8PathBuf::from("./out"))] pub output: Utf8PathBuf, + /// Config path + #[arg(long, short, default_value_t=Utf8PathBuf::from("./config.json"))] + pub config: Utf8PathBuf, + #[command(subcommand)] pub command: Option, - #[clap(skip)] - pub is_tty: bool } #[derive(Debug, Subcommand, Default)] @@ -29,15 +31,8 @@ pub enum CliCommand { #[default] Download, Add { - url: String, - name: String, - genre: String + url: Option, + name: Option, + genre: Option } } - -impl CliArgs { - pub fn populate_extra(&mut self) -> &mut Self{ - self.is_tty = isatty(); - self - } -} \ No newline at end of file diff --git a/music_mgr/src/config/mod.rs b/music_mgr/src/config/mod.rs new file mode 100644 index 0000000..4fc54c9 --- /dev/null +++ b/music_mgr/src/config/mod.rs @@ -0,0 +1,132 @@ +pub mod cli; + +use std::path::PathBuf; + +use clap::Parser; +use serde::{Deserialize, Serialize}; +use anyhow::Result; +use crate::util::{self, dl_to_file, isatty}; + +use self::cli::CliArgs; + +const YTDLP_DL_URL: &'static str = "https://github.com/yt-dlp/yt-dlp/archive/refs/heads/master.zip"; +const SPOTDL_DL_URL: &'static str = "https://github.com/spotDL/spotify-downloader/archive/refs/heads/master.zip"; + +#[derive(Debug, Default)] +pub struct ConfigWrapper { + pub cfg: Config, + pub cli: cli::CliArgs, + pub isatty: bool +} + +#[derive(Debug, Serialize, Deserialize, Default)] +pub struct Config { + pub ytdlp: ConfigYtdlp, + pub spotdl: ConfigSpotdl, + pub python: ConfigPython, +} + +#[derive(Debug, Serialize, Deserialize, Default)] +pub struct ConfigYtdlp { + pub path: PathBuf, + pub is_python: bool, +} + +#[derive(Debug, Serialize, Deserialize, Default)] +pub struct ConfigSpotdl { + pub path: PathBuf, + pub is_python: bool +} + +#[derive(Debug, Serialize, Deserialize, Default)] +pub struct ConfigPython { + pub path: PathBuf, +} + + +impl ConfigWrapper { + pub async fn parse() -> Result { + let mut s = Self::default(); + s.cli = cli::CliArgs::parse(); + crate::logger::init_logger(s.cli.debug); + s.cfg = Config::parse(&s.cli).await?; + s.isatty = isatty(); + Ok(s) + } +} + +impl Config { + pub async fn parse(cli: &CliArgs) -> Result { + if !cli.config.exists() { + return Self::setup_config(&cli).await; + } + + let data = std::fs::read_to_string(&cli.config)?; + let data: Self = serde_json::from_str(&data)?; + Ok(data) + } + + async fn setup_config(cli: &CliArgs) -> Result { + let mut s = Self::default(); + + let bin_dir = cli.output.clone().into_std_path_buf().join(".bin/"); + let mut python_needed = false; + + match util::is_program_in_path("yt-dlp") { + Some(p) => { + s.ytdlp.path = p; + s.ytdlp.is_python = false; + }, + + None => { + python_needed = true; + s.ytdlp.is_python = true; + s.ytdlp.path = bin_dir.join("ytdlp"); + dl_to_file(YTDLP_DL_URL, s.ytdlp.path.join("ytdlp.zip")).await?; + zip_extensions::zip_extract(&s.ytdlp.path.join("ytdlp.zip"), &s.ytdlp.path)?; + } + } + + match util::is_program_in_path("spotdl") { + Some(p) => { + s.spotdl.path = p; + s.spotdl.is_python = false; + }, + + None => { + python_needed = true; + s.spotdl.is_python = true; + s.spotdl.path = bin_dir.join("ytdlp"); + dl_to_file(SPOTDL_DL_URL, s.spotdl.path.join("spotdl.zip")).await?; + zip_extensions::zip_extract(&s.spotdl.path.join("spotdl.zip"), &s.ytdlp.path)?; + } + } + + + let python_paths = &[ + util::is_program_in_path("python"), + util::is_program_in_path("python3") + ]; + + if python_needed { + let mut found = false; + for p in python_paths { + match p { + Some(p) => { + s.python.path = p.clone(); + found = true; + break + } + None => { + } + } + } + + if !found { + panic!("Python needs to be installed for this to work, or install ytdlp and spotdl manually, (dont forget to delete the config file after doing so)"); + } + } + + Ok(s) + } +} diff --git a/music_mgr/src/constants.rs b/music_mgr/src/constants.rs new file mode 100644 index 0000000..c9652cb --- /dev/null +++ b/music_mgr/src/constants.rs @@ -0,0 +1,15 @@ + +#[cfg(target_family="windows")] +mod constants { + pub const PATH_VAR_SEP: &'static str = ";"; + pub const EXEC_EXT: &'static str = "exe"; +} + +#[cfg(target_family="unix")] +mod constants { + pub const PATH_VAR_SEP: &'static str = ":"; + pub const EXEC_EXT: &'static str = ""; +} + + +pub use constants::*; \ No newline at end of file diff --git a/music_mgr/src/downloader.rs b/music_mgr/src/downloader.rs index ff34d48..6486a67 100644 --- a/music_mgr/src/downloader.rs +++ b/music_mgr/src/downloader.rs @@ -4,7 +4,7 @@ use lazy_static::lazy_static; use log::Level; use tokio::sync::{Mutex, RwLock}; -use crate::{cli::CliArgs, manifest::Manifest}; +use crate::{config::ConfigWrapper, manifest::{Manifest, ManifestSong}}; #[allow(dead_code)] #[derive(Debug, Clone)] @@ -20,12 +20,12 @@ lazy_static!( pub struct Downloader { count: usize, - ytdlp_path: String, + ytdlp_path: PathBuf, id_itr: usize, } impl Downloader { - pub fn new(ytdlp_path: String) -> Self { + pub fn new(ytdlp_path: PathBuf) -> Self { Self { count: 0, ytdlp_path, @@ -33,12 +33,12 @@ impl Downloader { } } - pub async fn download_all(&mut self, manifest: &Manifest, cli: &CliArgs) -> anyhow::Result { + pub async fn download_all(&mut self, manifest: &Manifest, cfg: &ConfigWrapper) -> anyhow::Result { let format = manifest.format()?; for (genre, songs) in &manifest.genres { for song in songs { - self.download_song(format!("{}/{genre}/{}.{}", cli.output, song.name, &format), &format, &song.url).await?; + self.download_song(cfg, &song, &genre, &format).await?; self.wait_for_procs(10).await?; } } @@ -46,7 +46,9 @@ impl Downloader { Ok(self.count) } - async fn download_song(&mut self, path: String, audio_format: &String, url: &String) -> anyhow::Result<()> { + pub async fn download_song(&mut self, cfg: &ConfigWrapper, song: &ManifestSong, genre: &String, format: &String) -> anyhow::Result<()> { + let path = format!("{}/{genre}/{}.{}", cfg.cli.output, song.name, &format); + if PathBuf::from(&path).exists() { log::debug!("File {path} exists, skipping"); return Ok(()) @@ -55,10 +57,10 @@ impl Downloader { let cmd = cmd.args([ "-x", "--audio-format", - audio_format.as_str(), + format.as_str(), "-o", path.as_str(), - url.as_str() + song.url.as_str() ]); let cmd = if log::max_level() < Level::Debug { @@ -77,7 +79,7 @@ impl Downloader { log::info!("Downloading {path}"); PROCESSES.lock().await.write().await.insert(id, Proc { - url: url.clone(), + url: song.url.clone(), path, finished: false, }); diff --git a/music_mgr/src/main.rs b/music_mgr/src/main.rs index 3c03893..c772348 100644 --- a/music_mgr/src/main.rs +++ b/music_mgr/src/main.rs @@ -1,31 +1,30 @@ -use clap::Parser; +use config::ConfigWrapper; + // TODO: Possibly use https://docs.rs/ytextract/latest/ytextract/ instead of ytdlp - -use crate::cli::CliArgs; - -mod cli; mod manifest; mod logger; mod downloader; mod util; mod commands; mod prompt; +mod config; +mod constants; #[tokio::main] async fn main() { - let mut cli_args = CliArgs::parse(); - cli_args.populate_extra(); - logger::init_logger(cli_args.debug); + let Ok(cfg) = ConfigWrapper::parse().await else { + return; + }; - let manifest = match manifest::Manifest::from_path(&cli_args.manifest.as_std_path()) { + let mut manifest = match manifest::Manifest::from_path(&cfg.cli.manifest.as_std_path()) { Ok(m) => m, Err(e) => { - log::error!("Failed to parse manifest file {}: {e}", cli_args.manifest); + log::error!("Failed to parse manifest file {}: {e}", cfg.cli.manifest); return; } }; - commands::command_run(&cli_args, &manifest).await; + let _ = commands::command_run(&cfg, &mut manifest).await; } diff --git a/music_mgr/src/manifest.rs b/music_mgr/src/manifest.rs index ba0a94b..0dc3787 100644 --- a/music_mgr/src/manifest.rs +++ b/music_mgr/src/manifest.rs @@ -1,4 +1,4 @@ -use std::{collections::HashMap, fs::read_to_string, path::Path}; +use std::{collections::HashMap, fs::read_to_string, path::{Path, PathBuf}}; use anyhow::bail; use serde::{Deserialize, Serialize}; @@ -11,6 +11,8 @@ type Genre = String; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Manifest { + #[serde(skip)] + path: PathBuf, format: String, pub genres: HashMap> } @@ -35,13 +37,35 @@ pub struct ManifestSong { impl Manifest { - pub fn from_string(s: String) -> anyhow::Result { + fn from_string(s: String) -> anyhow::Result { let s = serde_json::from_str(&s)?; Ok(s) } pub fn from_path(p: &Path) -> anyhow::Result { let data = read_to_string(p)?; - Self::from_string(data) + let mut s = Self::from_string(data)?; + s.path = p.to_path_buf(); + Ok(s) + } + + pub fn add_song(&mut self, genre: String, name: String, url: String) -> anyhow::Result<()> { + let Some(genre_ref) = self.genres.get_mut(&genre) else { + log::error!("Invalid genre '{}'", genre); + bail!("Invalid genre") + }; + + genre_ref.push(ManifestSong { + name, + url, + }); + + Ok(()) + } + + pub fn save(&self) -> anyhow::Result<()> { + let data = serde_json::to_string_pretty(self)?; + std::fs::write(&self.path, data)?; + Ok(()) } } \ No newline at end of file diff --git a/music_mgr/src/prompt.rs b/music_mgr/src/prompt.rs index a7b1362..df31587 100644 --- a/music_mgr/src/prompt.rs +++ b/music_mgr/src/prompt.rs @@ -4,9 +4,9 @@ use std::{collections::HashMap, io::Write}; pub fn simple_prompt(p: &str) -> String { - print!("{c}prompt{r}: {p}", - c=anstyle::AnsiColor::Magenta.render_fg(), - r=anstyle::Style::new().render_reset() + print!("{c}prompt{r}: {p} > ", + c=anstyle::AnsiColor::Cyan.render_fg(), + r=anstyle::Reset.render() ); // I dont care if it fails @@ -15,13 +15,13 @@ pub fn simple_prompt(p: &str) -> String { let mut buf = String::new(); let _ = std::io::stdin().read_line(&mut buf); - buf + buf.trim().to_string() } -pub fn prompt_with_options(p: &str, options: &[&str]) -> usize { +pub fn prompt_with_list(p: &str, options: &[&str]) -> usize { println!("{c}prompt{r}: {p}", - c=anstyle::AnsiColor::Magenta.render_fg(), - r=anstyle::Style::new().render_reset() + c=anstyle::AnsiColor::Cyan.render_fg(), + r=anstyle::Reset.render() ); for (i, op) in options.iter().enumerate() { @@ -39,19 +39,47 @@ pub fn prompt_with_options(p: &str, options: &[&str]) -> usize { if num <= options.len() { return num; } else { - log::error!("Number not in range"); - return prompt_with_options(p, options); + return prompt_with_list(p, options); } } else { - log::error!("Not a number"); - return prompt_with_options(p, options); + return prompt_with_list(p, options); } } -pub fn prompt_with_named_options(p: &str, options: HashMap<&str, &str>) -> String { +pub fn prompt_with_list_or_str(p: &str, options: &[String]) -> String { + println!("{c}prompt{r}: {p} (select with number or input text)", + c=anstyle::AnsiColor::Cyan.render_fg(), + r=anstyle::Reset.render() + ); + + for (i, op) in options.iter().enumerate() { + println!(" - {}: {}", i, op); + } + + print!("> "); + // I dont care if it fails + let _ = std::io::stdout().flush(); + + let mut buf = String::new(); + let _ = std::io::stdin().read_line(&mut buf); + + if let Ok(num) = buf.trim().parse::() { + if let Some(g) = options.get(num) { + return g.clone(); + } else { + return prompt_with_list_or_str(p, options); + } + } else { + return buf.trim().to_string(); + } +} + + + +pub fn prompt_with_map(p: &str, options: HashMap<&str, &str>) -> String { println!("{c}prompt{r}: {p}", - c=anstyle::AnsiColor::Magenta.render_fg(), - r=anstyle::Style::new().render_reset() + c=anstyle::AnsiColor::Cyan.render_fg(), + r=anstyle::Reset.render() ); let mut keys = Vec::new(); @@ -69,7 +97,52 @@ pub fn prompt_with_named_options(p: &str, options: HashMap<&str, &str>) -> Strin let mut buf = String::new(); let _ = std::io::stdin().read_line(&mut buf); if !keys.contains(&buf.trim().to_lowercase()) { - return prompt_with_named_options(p, options); + return prompt_with_map(p, options); + } + buf.trim().to_string() +} + +pub fn prompt_bool(p: &str, default: Option) -> bool { + if default == Some(true) { + println!("{c}prompt{r}: {p} (Y/n)", + c=anstyle::AnsiColor::Cyan.render_fg(), + r=anstyle::Reset.render() + ); + } else if default == Some(false) { + println!("{c}prompt{r}: {p} (y/N)", + c=anstyle::AnsiColor::Cyan.render_fg(), + r=anstyle::Reset.render() + ); + } else { + println!("{c}prompt{r}: {p} (y/n)", + c=anstyle::AnsiColor::Cyan.render_fg(), + r=anstyle::Reset.render() + ); + } + print!("> "); + + // I dont care if it fails + let _ = std::io::stdout().flush(); + + let mut buf = String::new(); + let _ = std::io::stdin().read_line(&mut buf); + + if buf.trim().is_empty() { + match default { + Some(true) => return true, + Some(false) => return false, + None => { + return prompt_bool(p, default); + } + } + } + + match buf.to_lowercase().trim() { + "y" => true, + "n" => false, + c => { + log::error!("'{c}' is invalid, type y (yes) or n (no)"); + return prompt_bool(p, default); + } } - buf } diff --git a/music_mgr/src/util.rs b/music_mgr/src/util.rs index 2b9ed5c..2926fa0 100644 --- a/music_mgr/src/util.rs +++ b/music_mgr/src/util.rs @@ -1,26 +1,22 @@ +use std::{io::Write, path::PathBuf}; -fn is_program_in_path(program: &str) -> Option { +use crate::constants; + + + + +pub fn is_program_in_path(program: &str) -> Option { if let Ok(path) = std::env::var("PATH") { - for p in path.split(":") { - let p_str = format!("{}/{}", p, program); - if std::fs::metadata(&p_str).is_ok() { - return Some(p_str); + for p in path.split(constants::PATH_VAR_SEP) { + let exec_path = PathBuf::from(p).join(program).with_extension(constants::EXEC_EXT); + if std::fs::metadata(&exec_path).is_ok() { + return Some(exec_path); } } } None } - - -pub fn get_ytdlp_path() -> String { - if let Some(p) = is_program_in_path("yt-dlp") { - return p; - } - // TODO: Download yt-dlp to ./.bin/yt-dlp if doesnt exist - todo!() -} - #[cfg(target_family="unix")] pub fn isatty() -> bool { use std::{ffi::c_int, os::fd::AsRawFd}; @@ -45,4 +41,14 @@ pub fn isatty() -> bool { ret.is_ok() } +} + +pub async fn dl_to_file(url: &str, p: PathBuf) -> anyhow::Result<()> { + log::info!("Downloading {} -> {:?}", url, p); + let ytdlp_req = reqwest::get(url).await?.bytes().await?; + log::debug!("Downloading {:?} finished, writing to file", p); + let mut fd = std::fs::File::create(&p)?; + fd.write(&ytdlp_req)?; + log::debug!("Finished writing {:?}", p); + Ok(()) } \ No newline at end of file