mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-17 00:24:50 -04:00
Add tests to main function
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
11443af6aa
commit
81d0686c26
2 changed files with 62 additions and 56 deletions
|
@ -652,6 +652,7 @@ class MusicDL(list):
|
||||||
|
|
||||||
def essence(s):
|
def essence(s):
|
||||||
s = re.sub(r"&#\d+;", "", s) # remove HTML entities
|
s = re.sub(r"&#\d+;", "", s) # remove HTML entities
|
||||||
|
# TODO: change to finditer
|
||||||
return "".join(words.findall(s))
|
return "".join(words.findall(s))
|
||||||
|
|
||||||
def get_titles(s):
|
def get_titles(s):
|
||||||
|
|
|
@ -53,9 +53,10 @@ def check_album_dl_success(folder, correct):
|
||||||
click.secho(f"Check for {folder} succeeded!", fg="green")
|
click.secho(f"Check for {folder} succeeded!", fg="green")
|
||||||
|
|
||||||
|
|
||||||
reset_config()
|
def main():
|
||||||
download_albums()
|
reset_config()
|
||||||
check_album_dl_success(
|
download_albums()
|
||||||
|
check_album_dl_success(
|
||||||
"/Users/nathan/StreamripDownloads/Morcheeba - Blackest Blue (2021) [FLAC] [24B-44.1kHz]",
|
"/Users/nathan/StreamripDownloads/Morcheeba - Blackest Blue (2021) [FLAC] [24B-44.1kHz]",
|
||||||
{
|
{
|
||||||
"04. Morcheeba - Say It's Over.flac",
|
"04. Morcheeba - Say It's Over.flac",
|
||||||
|
@ -70,9 +71,9 @@ check_album_dl_success(
|
||||||
"05. Morcheeba - Sulphur Soul.flac",
|
"05. Morcheeba - Sulphur Soul.flac",
|
||||||
"06. Morcheeba - Oh Oh Yeah.flac",
|
"06. Morcheeba - Oh Oh Yeah.flac",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
check_album_dl_success(
|
check_album_dl_success(
|
||||||
"/Users/nathan/StreamripDownloads/KHALED KHALED",
|
"/Users/nathan/StreamripDownloads/KHALED KHALED",
|
||||||
{
|
{
|
||||||
"05. DJ Khaled - I DID IT (feat. Post Malone, Megan Thee Stallion, Lil Baby & DaBaby).mp3",
|
"05. DJ Khaled - I DID IT (feat. Post Malone, Megan Thee Stallion, Lil Baby & DaBaby).mp3",
|
||||||
|
@ -90,9 +91,9 @@ check_album_dl_success(
|
||||||
"06. DJ Khaled - LET IT GO (feat. Justin Bieber & 21 Savage).mp3",
|
"06. DJ Khaled - LET IT GO (feat. Justin Bieber & 21 Savage).mp3",
|
||||||
"11. DJ Khaled - JUST BE (feat. Justin Timberlake).mp3",
|
"11. DJ Khaled - JUST BE (feat. Justin Timberlake).mp3",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
check_album_dl_success(
|
check_album_dl_success(
|
||||||
"/Users/nathan/StreamripDownloads/Paul Weller - Fat Pop (2021) [FLAC] [24B-44.1kHz]",
|
"/Users/nathan/StreamripDownloads/Paul Weller - Fat Pop (2021) [FLAC] [24B-44.1kHz]",
|
||||||
{
|
{
|
||||||
"01. Paul Weller - Cosmic Fringes.flac",
|
"01. Paul Weller - Cosmic Fringes.flac",
|
||||||
|
@ -109,5 +110,9 @@ check_album_dl_success(
|
||||||
"10. Paul Weller - Moving Canvas.flac",
|
"10. Paul Weller - Moving Canvas.flac",
|
||||||
"07. Paul Weller - Testify.flac",
|
"07. Paul Weller - Testify.flac",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
restore_config()
|
restore_config()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue