You are browsing as a guest. Sign up (or log in) to start making projects!

yan music

  • 4 Devlogs
  • 6 Total hours

a lightweight music player application made in C++ and wxWidgets, automatically syncing with youtube playlists downloading them via yt-dlp! (and more.. in the future.. im workin on it..)

Open comments for this post

52m 53s logged

multiple playlists now work as intended! this means that…

  • if a song is present in multiple playlists, it will only download the song once
  • if a song is removed from one playlist, it will not remove it if it is present in another one
  • if a song is removed from ALL playlists, it will be removed

this meant i had to do a little bit of refactoring, before i was storing a map of the playlist id with a vector of strings, now its just a vector of video ids, which made this a lot easier to implement!

multiple playlists now work as intended! this means that…

  • if a song is present in multiple playlists, it will only download the song once
  • if a song is removed from one playlist, it will not remove it if it is present in another one
  • if a song is removed from ALL playlists, it will be removed

this meant i had to do a little bit of refactoring, before i was storing a map of the playlist id with a vector of strings, now its just a vector of video ids, which made this a lot easier to implement!

Replying to @Nibbles

0
1
Open comments for this post

2h 41m 38s logged

probably should’ve split this into 2 devlogs, but uhh..

first: playlists + yt-dlp flags are now loaded from the config file! obviously this will be editable with a ui at some point in the future
i also added a config key for the directory that music will be downloaded! which is important…

and second: the playlist now syncs when new things are added or deleted!

this is done by storing a file with all the video ids of the playlist last time it was downloaded, and comparing it with whatever it is now, downloading individually what was added (to prevent potential ratelimits from youtube that would occur if i was just to run the command to download the entire playlist again), and deleting any songs that were removed from the playlist! (in the future, i want this to be a togglable setting as sometimes you might want to keep songs if they are removed from youtube or something)

next i want to make sure multiple playlists work properly, as i don’t want it to delete song files if a song was only removed from one playlist, or download a song that is already present from another playlist

probably should’ve split this into 2 devlogs, but uhh..

first: playlists + yt-dlp flags are now loaded from the config file! obviously this will be editable with a ui at some point in the future
i also added a config key for the directory that music will be downloaded! which is important…

and second: the playlist now syncs when new things are added or deleted!

this is done by storing a file with all the video ids of the playlist last time it was downloaded, and comparing it with whatever it is now, downloading individually what was added (to prevent potential ratelimits from youtube that would occur if i was just to run the command to download the entire playlist again), and deleting any songs that were removed from the playlist! (in the future, i want this to be a togglable setting as sometimes you might want to keep songs if they are removed from youtube or something)

next i want to make sure multiple playlists work properly, as i don’t want it to delete song files if a song was only removed from one playlist, or download a song that is already present from another playlist

Replying to @Nibbles

0
1
Open comments for this post

1h 20m 9s logged

im… sorta getting into the groove of c++!
i’ve added a new class to handle a config file, which:

  • creates config file in whatever directory it should go in (i think it’s kinda hardcoded to only function properly on linux right now… once i have things more finished i’ll definitely get windows support and maaaybe macos support!)
  • serializes and deserializes the config file via the nlohmann json library, converting it into a struct so it can be easily read from other parts of the code

next i’ll make it so downloads are fetched from the playlists in the config with the yt-dlp flags in the config!!

im… sorta getting into the groove of c++!
i’ve added a new class to handle a config file, which:

  • creates config file in whatever directory it should go in (i think it’s kinda hardcoded to only function properly on linux right now… once i have things more finished i’ll definitely get windows support and maaaybe macos support!)
  • serializes and deserializes the config file via the nlohmann json library, converting it into a struct so it can be easily read from other parts of the code

next i’ll make it so downloads are fetched from the playlists in the config with the yt-dlp flags in the config!!

Replying to @Nibbles

0
1
Open comments for this post

52m 5s logged

i have never made anything in c++ before. this project might be a bit.. ambitious.. but i believe… i believe!!

anywayy…

i’ve set up the very very basics of this project, including:

  • wxWidgets window setup
  • a downloader class, which creates the directory that your music will be stored in, as well as running the yt-dlp command with an array of flags (which i’ll prob make configurable at some point)
    yes, it’s all hardcoded right now, it wont be like that forever obviously, its been 47 minutes…

the first thing i plan to get done with this anyway is the syncing and downloading with youtube playlists, so my next thing will probably be creating a config file that contains links to playlists to sync with as well as any yt-dlp flags if needed!

i have never made anything in c++ before. this project might be a bit.. ambitious.. but i believe… i believe!!

anywayy…

i’ve set up the very very basics of this project, including:

  • wxWidgets window setup
  • a downloader class, which creates the directory that your music will be stored in, as well as running the yt-dlp command with an array of flags (which i’ll prob make configurable at some point)
    yes, it’s all hardcoded right now, it wont be like that forever obviously, its been 47 minutes…

the first thing i plan to get done with this anyway is the syncing and downloading with youtube playlists, so my next thing will probably be creating a config file that contains links to playlists to sync with as well as any yt-dlp flags if needed!

Replying to @Nibbles

0
2

Followers

Loading…