From 1bdb73d3e41dfdded3c33581382f97a0e33a4aef Mon Sep 17 00:00:00 2001 From: janis Date: Sat, 12 Nov 2022 17:29:35 +0100 Subject: [PATCH] added a file converter --- .../filepathanalysis.cpython-310.pyc | Bin 1075 -> 1075 bytes bin/__pycache__/info_handler.cpython-310.pyc | Bin 1283 -> 1283 bytes bin/__pycache__/player.cpython-310.pyc | Bin 3341 -> 3341 bytes converter.py | 24 ++++++++++++++++++ data/songtemp.csv | 6 ++--- data/temp.csv | 2 +- 6 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 converter.py diff --git a/bin/__pycache__/filepathanalysis.cpython-310.pyc b/bin/__pycache__/filepathanalysis.cpython-310.pyc index 39673c29ddc8563a009ad1c1106e904ee8739d5b..73a4b52dae97823a392d59a589dc589587798442 100644 GIT binary patch delta 20 acmdnYv6+KApO=@50SN4t=WpcJU;zLx&IC~a delta 20 acmdnYv6+KApO=@50SFrA$8F@+U;zLz7X*3$ diff --git a/bin/__pycache__/info_handler.cpython-310.pyc b/bin/__pycache__/info_handler.cpython-310.pyc index b29881f0b6c8dcb3aeb53fe0e1f68394c5786044..4490715116ea1f7173ede1acde72b2640e11c0d7 100644 GIT binary patch delta 20 acmZqXYUbk3=jG*M00RBx`5U=^umAumEd;gz delta 20 acmZqXYUbk3=jG*M0D?dF;x=;sU;zLyy#=WN diff --git a/bin/__pycache__/player.cpython-310.pyc b/bin/__pycache__/player.cpython-310.pyc index b804f95f9a4b8859ff21bf73b20440bed22121cf..e4893d47b209331ba3e0126fef1b7714cbdde958 100644 GIT binary patch delta 20 ZcmeB`>XqWo=jG*M00PB?{Egg9yZ|Zs1E>H1 delta 20 acmeB`>XqWo=jG*M0D{>M5;k%(@d5xa1q71- diff --git a/converter.py b/converter.py new file mode 100644 index 0000000..37ab939 --- /dev/null +++ b/converter.py @@ -0,0 +1,24 @@ +import os + +folderpath = input("Type the path to a folder containing to be converted files (excluding final /): ") + +files = os.listdir(folderpath) + +toberun = [] +for file in files: + extension = file[len(file) - 4:] + if extension == ".m4a" or extension == ".wav": + toberun.append(str(folderpath + "/" + file)) + + +for item in toberun: + command = f"ffmpeg -i {item} -acodec mp3 {item[:len(item) - 4]}.mp3" + os.system(command) + +print(""" + + + DONE + + +""") \ No newline at end of file diff --git a/data/songtemp.csv b/data/songtemp.csv index c619105..f1a0568 100755 --- a/data/songtemp.csv +++ b/data/songtemp.csv @@ -1,3 +1,3 @@ -42 -Tennessee Waltz - New 101 Strings Orchestra | Slow Walz (Langsam),Morning has broken - Cat Stevens | Walzer (Mittel),Magia - Alvaro Soler | Flashmob (Mittel),Say So - Doja Cat | Discofox (Langsam),Save Your Tears (Remix) - The Weeknd & Ariana Grande | Discofox (Langsam),Shivers - Ed Sheeran | Jive/ Rocknroll (Mittel),I feel good - Ray Charles | Jive/Rocknroll (Mittel),Muevelo - Rey Ruiz | Cha cha cha (Mittel),Suelta la cintura - Ruben leon | Cha cha cha (Mittel),Como Volver a Ser Feliz - Luis Enrique | Salsa (Mittel),Mas que nada - black eyed peas | Salsa/Discofox (Mittel),Moon River - Henry Mancini | Slow Walz (Langsam),Dancing Queen - ABBA | Discofox (Langsam),Don't Call Me Up - Mabel | Discofox (Mittel),Magia - Alvaro Soler | Flashmob (Mittel),Lets have a Party - Wanda Jackson | Jive (mittel),Crazy Little Thing Called Love - Queen | Jive / Rocknroll (Schnell),El Diablo Anda Suelto - Rey Ruiz | Cha cha cha (Mittel),Lets get loud - Jennifer Lopez | Cha cha cha (Schnell),Enamorame - Somos del Barrio | Salsa (Mittel),Something Stupid (feat. Reese Witherspoon) - Michael Bublé | Rumba/cha cha cha (Langsam),When a man loves a woman - Percy Sledge | (Langsam),Scharlachrot - Patent Ochsner | Walzer (Langsam),Ily (i love you baby) [feat. Emilee] - Surf Mesa | Discofox (Mittel),Like a sex machine - James Brown | Discofox (Mittel),Uptown Funk (feat. Bruno Mars) - Discofox | Discofox (Schnell),Tutti Frutti - Little Richard | Jive / Rocknroll (Mittel),Jailhouse Rock - Elvis Presley | Jive / Rocknroll (Schnell),Are you lonesome - Elvis Presley | Slow Walz (Langsam),Ay Mujer - Rey Ruiz | Cha cha cha (Mittel),Rico Vacilon - Pedro Garcia & His Del Prado Orchestra | Cha cha cha (Mittel),Jeepers creepers - Benny Goodmann | Foxtrott (Mittel),An der schönen blauen Donau - New 101 Strings Orchestra | Wiener Walzer (Schnell),The Last Waltz - Engelbert Humperdinck | Walzer (Mittel),Stand by me - Sam Brown | Cha cha cha (Lansam),Stayin' Alive - Bee Gees | Discofox (Mittel),Easy On Me - Adele | (Langsam),Magia - Alvaro Soler | Flashmob (Mittel),Friday (feat. Mufasa & Hypeman) [Dopamine Re-Edit] - Riton & Nightcrawlers | Party (Mittel),YMCA - Village People | Party (Mittel),Cotton eyed Joe (Hennustall zermatt mix) - Rednex | Party (Mittel),Gangnam style - PSY | Party (Mittel),Take On Me - a-ha | Jive (Schnell),Rock Around the Clock - Bill Haley & His Comets | Jive / Rocknroll (Schnell),Satisfaction - Rolling Stones | Party (Mittel),"Un, dos, tres - Ricky Martin | Party (Mittel)",Party Rock anthem - LFMBQ | Party (Mittel),I don't care - Icona Pop | Party (Mittel),Love tonight - Shouse & David Guetta | Party (Mittel),Insomnia - Faithless | Party (Mittel),Angels - Robbie Williams | Slow (Langsam),Nothing compares to you - Sinead O'Connor | Slow (Langsam) -219.21958923339844 +4 +Tennessee Waltz - New 101 Strings Orchestra | Slow Walz (Langsam),Kaiserwalzer - New 101 Strings Orchestra | Walzer (Mittel),Zorba's Dance - Aroma | Flashmob (Mittel),Snap - Rosa Linn | Discofox (Langsam),Anti-Hero - Taylor Swift | Discofox (Langsam),Lips are Movin - Meghan Trainor | Jive/ Rocknroll (Mittel),I feel good - Ray Charles | Jive/Rocknroll (Mittel),Muevelo - Rey Ruiz | Cha cha cha (Mittel),Suelta la cintura - Ruben Leon | Cha cha cha (Mittel),Bam Bam - Camilla Carbello | Salsa/Discofox (Mittel),Como Volver a Ser Feliz - Luis Enrique | Salsa/Discofox (Mittel),Moon River - Henry Mancini | Slow Walz (Langsam),Louenesee - Span | Walzer (Mittel),Dancing Queen - ABBA | Discofox (Langsam),Don't Call Me Up - Mabel | Discofox (Mittel),Zorba's Dance - Aroma | Flashmob (Mittel),Crazy Little Thing Called Love - Queen | Jive (mittel),Lets have a Party - Wanda Jackson | Jive / Rocknroll (Schnell),El Diablo Anda Suelto - Rey Ruiz | Cha cha cha (Mittel),Tea for two - Tommy Dorsey | Cha cha cha (Mittel),Something Stupid (feat. Reese Witherspoon) - Michael Bublé | Rumba/cha cha cha (Langsam),Can't stop the feeling - Justin Timberlake | Discofox (Mittel),Uptown Funk (feat. Bruno Mars) - Discofox | Discofox (Schnell),Super freaky Girl - Nicki Minaj | Jive / Rocknroll (Mittel),Jailhouse Rock - Elvis Presley | Jive / Rocknroll (Schnell),Are you lonesome - Elvis Presley | Slow Walz (Langsam),About Damn Time - Lizzo | Discofox (Mittel),Say so - Doja Cat | Discofox (Mittel),Rico Vacilon - Pedro Garcia & His Del Prado Orchestra | Cha cha cha (Mittel),Come Dance with me - Michael Bublé | Cha cha cha (Mittel),An der schönen blauen Donau - New 101 Strings Orchestra | Wiener Walzer (Schnell),The Last Waltz - Engelbert Humperdinck | Walzer (Mittel),Kiss me - Sixpence none the Richer | Discofox (Lansam),Zorba's Dance - Aroma | Flashmob (Mittel),Friday (feat. Mufasa & Hypeman) [Dopamine Re-Edit] - Riton & Nightcrawlers | Party (Mittel),Macarena - Los del Rio | Rarty (Mittel),In the Dark - Purple Disco Machine | Party (Mittel),Gimme! Gimme! Gimme! (a Man after Midnight) - Abba | Party (Mittel),YMCA - Village People | Party (Mittel),Gangnam style - PSY | Party (Mittel),Take On Me - a-ha | Jive (Schnell),Party Rock anthem - LMFAO | Party (Mittel),I love it - Icona Pop | Party (Mittel),Hangover - Taio Cruz | Party (Mittel),Samba de Janeiro - Bellini | Party (Schnell),Insomnia - Faithless | Party (Mittel),Love tonight - Shouse & David Guetta | Party (Mittel),Ily (i love you baby) - Surf Mesa | Party (Mittel),Angels - Robbie Williams | Party (Langsam),Easy On Me - Adele | Party (Langsam) +200.70167541503906 diff --git a/data/temp.csv b/data/temp.csv index 95bdfde..10a2a54 100755 --- a/data/temp.csv +++ b/data/temp.csv @@ -1 +1 @@ -/mnt/storage/SORTED/Music/KB/ +/mnt/storage/SORTED/Music/KB2022/