Open comments for this post
Devlog 13: I added an installer .exe file, added screenshots to the readme, and added a new release on GitHub. Configuring the installer was a little hard, as I was new to this process and didn’t know where to start. I used Codex to help me figure out that I could use a program called Inno. This handled the installer file, uninstall, as well as configuring it with Windows. Codex guided me through how to set that up, and eventually I got everything working. Finally I created a new version on Git and pushed everything.
Open comments for this post
Devlog 12: I compiled the app into a .exe, updated the readme, and pushed the first version to git. I ran into some issues when compiling the app. Specifically after the initial compiling YT-DLP couldn’t see the location of FFMPEG. Because of this I had to update the “get_app_root.py” file so it accounted for the file changes when compiling.
Open comments for this post
Devlog 11: I added a preview button to the GUI so that users could see the song details and confirm they were right before downloading the song. also prepared for packaging this file into an executable (.exe).
Open comments for this post
Devlog 10: Added app.py and introduced a GUI window using Custom Tkinter. Now when users run app.py they see a new desktop window open up, see a text box and a download button. Once they paste in a Spotify link they see status messages like “Downloading”. At the end they also see the downloaded path. On top of this if there are any errors during the download (like fetching metadata), this also displays as a status message. This took a little bit because I get to get familiar with Custom Tkinter, add another function that gets called by the button, and add some safeguards/quality of life updates. The main safeguard was disabling the download button while the song was downloading, which ensured the user didn’t spam processes. The quality of life update was that the download path now wraps the text to multiple lines if the path is very long.
Open comments for this post
Devlog 09
Simple update, but it now uses Mutagen to add track name, artists, and album name to the downloaded files.
Open comments for this post
Devlog 08
Introduced FFMPEG to the project to be able to convert downloads from .webm to .mp3 files. Also change the song title to be the title of the song. Introduced a file check to ensure file names are valid and accepted by Windows.
Open comments for this post
Devlog 07
The program now automatically uses YT-DLP to download the best match found. This works by using YT-DLP’s build in “Download” method. I pass in the number 1 match found by YT-DLP (built in the last devlog), and it downloads it to the users default “Downloads” folder. This is a major step in the project, and I am almost ready to ship the first version.
Open comments for this post
Devlog 06
Major Update: Now added YT-DLP to the project. Now whenever you put in a valid link you get more than just the metadata. You also get the top 5 best matches from YouTube Music. This took a while because I had to learn to properly call and use the YT-DLP package in python. I created 3 helper functions. The first created the search query using the metadata, the second returned the search results, and the last one formatted and returned the results. I created one last function as a wrapper, such that when I passed in the metadata it returned the YouTube Music search results. When calling yt_dlp.YoutubeDL(), I got a type error when passing the parameters. This was because the package expected its own datatype, while I was simply passing a dictionary. I was able to fix this by setting the type to “Any” when passing in the argument. I also changed main.py to include the YouTube search results. Now, whenever you pass in a Spotify link you get the song metadata as well as well as the top 5 best matches from YouTube Music.
Open comments for this post
Devlog 05
This is a pretty small update, all I did was add a small test file to be able to consistently check for errors and functionality.
Open comments for this post
Devlog 04
This was a big change in the metadata retrieving/handling. Last devlog I explained how the new restrictions on the Spotify API made it difficult to fetch the metadata, so I had to use the public oEmbed API. This didn’t give much information and was hard to work with. After researching some more I found a python package that does the metadata fetching for me, “SpotifyScraper”. this package takes in a spotify url (which the user will be providing), and can get information like song names, artists, duration, etc. This was very useful for me when coding the metadata functions. On top of this it supports playlist and album inputs as well, which is great for future updates. I spent this time rewriting the metadata retrieving functions and cleaning everything up. I removed a few redundant functions and introduced proper error messages.
Open comments for this post
Devlog 03
After getting the link cleaner to work, I wanted to use the Spotify API to get the metadata of the song. The problem with this is that Spotify introduced heavy limitations on its API earlier this year. Because of this I had to fallback to the Spotify oEmbed, which gives only provides the song name. I am still researching for more options.
Open comments for this post
Devlog 02
This took a while, but I was able to make the program that strips the input down to only the Spotify link. This ensures that (for the most part) that only the Spotify link gets used, and not any other whitespace/extra characters that might have appeared. It took a while because I was researching and learning how to use the ‘re’ library in Python, and it took some trial and error/debugging to get the logic to work.
How this works;
- The user inputs into the text field
- First the type of track gets identified (single track, playlist, album)
- Then it uses the ‘re’ library to detect the pattern of Spotify URLs and URIs. This ensures that the Spotify track is actually valid.
- It then uses the ‘.group()’ function to capture the matching section out of the input
- Finally the functions are checked to ensure everything is valid, then the type of track and song url are returned.
Open comments for this post
Devlog 01
This is the initial commit for the myMusic project. I created the file system locally, then opened the project inside IntelliJ Idea. I kept things simple and only introduced a README for now. I ran into a few problems when pushing to GitHub. Mainly, the .gitignore was being placed inside a .idea folder (I think because I was using IntelliJ). Because of this I had to go back into the IDE and move the .gitignore into the main branch and not into a subfolder.