Skip to content
Extraits de code Groupes Projets
Valider 9c904e67 rédigé par Lionel Dricot's avatar Lionel Dricot
Parcourir les fichiers

Merge branch 'gradar-master-patch-12475' into 'master'

Report for LINFO2401

See merge request ldricot/lingi2401!292
parents fddec1e1 70ed0e88
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# LINFO2401 - Open Source Contribution Project
*Author:* RADAR Gautier
*NOMA:* 52822100
*Year:* 2022-2023
*Selected project:* [Spotify-DL](https://github.com/SathyaBhat/spotify-dl)
*License:* MIT
## Chapter 1 : Finding an application
To start with, I first looked for projects related to software I use on a daily basis like Youtube, Instagram, ... But I quickly noticed that all these projects had problems to solve but that I was not interested in. So it wasn't going to motivate me to work on them. Then I thought of Spotify, because I use it several times a day.
## Chapter 2 : Finding the project
After a long search on github, I found two projects:
- [SpotDL](https://github.com/spotDL/spotify-downloader) : The project has been running since 2016 and has over 10K stars. I joined the community directly on Discord to discuss with them but I noticed that the community was more based on people who had installation problems rather than contributors/developers. beside that, the project being already very solid and too complete so I decided to look for a smaller one with more things to do.
- [Spotify-DL](https://github.com/SathyaBhat/spotify-dl) : This project is much smaller and has only 1K stars for 39 contributors. So I was more interested in helping this project. This project does not have a Discord community or anything else, but the creator is very responsive and available for questions. The project allows you to connect to your Spotify account and download your own or other users' playlists directly from youtube, as Spotify does not yet support this. This allows you to get all the sounds you want directly on your PC and offline.
## Chapter 3 : Finding something to do
After choosing my project, I started by looking at what I could fix in the issues. There wasn't much, but I decided to download it and see what problems I could fix by myself.
To do this, I used a Kali Linux distribution simply because I already had it in my virtual machines. At the first run nothing works as expected, the spotify_dl command was not recognized. However, after some time, I decided to create a python virtual environment to be sure that there are no more problems. And now it works!
So I set up the settings for my spotify account and I created a test playlist. At first glance, it seemed to work but as the download was not very fast, this gave me the idea to add the option to be able to download through a proxy, either for speed reasons or just for anonymity.
So I created a new [issue](https://github.com/SathyaBhat/spotify-dl/issues/304) on Github to see what the creator thought and after a few messages he assigned me the task.
## Chapter 4 : Trying to implement
In order to add the proxies I first had to take a closer look at the workings behind the download. As explained in the documentation, Spotify-DL actually takes the metadata of Spotify sounds and gives it to another open-source project: [yt-dlp](https://github.com/yt-dlp/yt-dlp) which will download it.
So I had to read up on this other project and I found that it already supports proxies but this option is not yet implemented in my project, so I tried to implement it.
After a few tries and tests, everything works perfectly. I have however a small error message that I did not have the previous days but that does not seem to be related to my modifications. So I decide to send my pull request.
## Chapter 5 : Dealing with errors
Once my pull request is sent, tests are automatically launched on Github to see if my code passes these tests. Unfortunately, due to a code error the tests do not validate my code. After discussing with the developer, we quickly find a solution and I submit my new code but this time, a new error occurs... The same one I had before some days ago.
In fact, the software also uses an API that removes youtube ads in order to download only the original sound: [SponsorBlock](https://sponsor.ajay.app/). However, I checked the status of the API and it is actually down since a few days. So my code will not pass until the API is up and running.
Finally, the developer then modified this error by skipping the use of SponsorBlock by default and my code passes the tests!
## Chapter 6 : Conclusion
I was able to discuss and join an open source community and in a second time to interact with a professional developer, it allowed me to see the different types of ways to contribute to an open source project !
The update can be found right here: [v8.5.0](https://github.com/SathyaBhat/spotify-dl/discussions/313) and my PR : [Added option to download through a proxy](https://github.com/SathyaBhat/spotify-dl/pull/308).
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter