Skip to content

FFFluoride/the_playlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lookup Table Settings

(my/table-lookup table value find-row search-row)

Table of Contents

What’s this project

It’s a script that downloads my playlists and puts them into nice playlists (m3u files)

How to run

To extract source code in emacs use the org-babel-tangle (C-c C-v C-t)

Then run the the-playlist.bash script

Data

nameid
balatroPLEITERw4PaKFs_uS0MoXkIfGbsYJHmWVU
silksongPLyfXx1BeqwFYFwnXDZo6xYSIsek2x2fhp
celestePLyfXx1BeqwFbnI87AyqLP5XcEg1u5kydi
hollow_knightPLyfXx1BeqwFZXtJPE153jA-8NJWz579Pb
terrariaPLyfXx1BeqwFb9eMbR78HzJtvhAuGH2rnc
calamityPLyfXx1BeqwFY7_xMkP9BCAogmUQbwFBjc
calamity_infernumPLyfXx1BeqwFb0IcIT2_cbShbguqGOvnaq
babaPLyfXx1BeqwFaO6xFIQXFhQTJtFdP4WYyc
deltarunePLyfXx1BeqwFakIcMEOb5L3hLLuTWHZhFv
undertalePLyfXx1BeqwFZoI5JKqSOCYTq9_fxIqPPc
isaac_rebirthPLyfXx1BeqwFYwjv_IHypwL_QeR4IT4rW_
isaac_afterbirthPLyfXx1BeqwFYEsmSq2YcXYfPoSxhqUdKj
isaac_repentancePLyfXx1BeqwFYukH-L7NXfhom6UPaSb33N
isaac_antibirthPLyfXx1BeqwFZfbk9ksALFm-Q6hmQPacQ1
minecraftPLyfXx1BeqwFZ3paVLhJwsHpuWM4zlhLPj
stardew_valleyPLyfXx1BeqwFYtf2Dntv405dH8I9FP5GcV
cassette_beastsPLyfXx1BeqwFZw1-JcUkkxHcodnwr_W6Nd
RoAPLyfXx1BeqwFYNtQ2sBVUvZ0_PUYvGLe_x
rhythm_doctorPLyfXx1BeqwFYvPfUFBjkZvmpFYFbSJQ2R
luck_be_a_landlordPLyfXx1BeqwFbcG-8eBmiIbmDtNmn4tq2H
animePLyfXx1BeqwFZcwV_yqpe5khtlKWGf0jM_
miscPLyfXx1BeqwFZzRwmxQ1To7HQN37pj1EAs
operationcommand
naiive_download_plyt-dlp -t aac –restrict-filenames
download_pl_m3uyt-dlp –restrict-filenames -o ‘../pool/%(title)s.m4a’ –get-filename

Collecting playlists

Queue up commands that download video titles and attatch the m4a file extension and put in an m3u file in the appropriate place

commands=()

mkdir playlists

for playlist_name in ${!playlists[@]}; do
    echo "[THE PLAYLIST] Added $playlist_name to queue"
    commands+=("($download_playlists_function ${playlists[$playlist_name]} > playlists/${playlist_name}.m3u && echo \"[THE PLAYLIST] Generated \\\"$playlist_name\\\" playlist\") &")
done

Downloading Audio

Queue up commands that download audio from playlists “balatro” must be detected such that it’s tracks can be slowed down after downloading to play like it does in game

handle_balatro () {
    $download_audio_pl -o 'pool/tmp/%(title)s' $1
    cd "pool/tmp"
    balatro_list=($(ls))
    for track in ${balatro_list[@]}; do
	echo "[THE PLAYLIST] Slowing down balatro track: \"$track\""
	ffmpeg -y -i "$track" -strict -2 -filter:a "atempo=0.75" -vn "../$track"
    done
    cd "../.."
    rm "pool/tmp" -r
}
for playlist_name in ${!playlists[@]}; do
    echo "[THE PLAYLIST] Queued up $playlist_name playlist"
    if [ "$playlist_name" = "balatro" ]; then
	commands+=("(handle_balatro ${playlists[$playlist_name]} && echo \"[THE PLAYLIST] Finished downloading $playlist_name playlist\") &")
    else
	commands+=("($download_audio_pl -o 'pool/%(title)s' ${playlists[$playlist_name]} && echo \"[THE PLAYLIST] Finished downloading $playlist_name playlist\") &")
    fi
done

Executing commands

Up to this point we’ve built up a queue of commands. The commands get executed in a parallel way and in a way that when you press C-c (Ctrl-C) in the terminal, it exits propperly. This way also insures the terminal doesn’t hang (pretty nifty eh?)

(trap 'kill 0' SIGINT; eval ${commands[*]} wait)

Yup that’s it

Custom Playlists

Generates the everything playlist

rm -f playlists/everything.m3u
cat playlists/* > playlists/everything.m3u

Generates the “isaac” playlist

rm playlists/isaac
cat playlists/isaac* > playlists/isaac.m3u

Goals [1/7]

  • [X] Fix Balatro Playlist
  • [ ] Renaming specific vids according to id
  • [ ] Have commands be a queue of getting filenames and downloading audio of individual vids so that I can implement sleeping as a workaround avoiding “Too many requests” error OR get rid of concurrent file downloading and use builtin workarounds in yt-dlp
  • [ ] Use permanent Toby Fox Undertale and deltarune
  • [ ] Fix the anime playlists (e.g. alternate ops, extended endings)
  • [ ] Make the actual silksong playlist
  • [ ] Drawn to life: The next chapter
  • [ ] Human Resource machine (when I finish it)

About

My playlist(s)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages