This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Specifically created to mass-edit Ponies At Dawn artist information | |
# The Bandcamp downloader I used does not set this properly, and instead puts the artist in the filename | |
# Uploading here for my personal reference | |
# Based on https://methodmatters.github.io/editing-id3-tags-mp3-meta-data-in-python | |
from mutagen.mp3 import MP3 | |
from mutagen.easyid3 import EasyID3 | |
import glob | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <iostream> | |
#include <string> | |
template<typename T, std::enable_if_t<!std::is_class_v<T> || std::is_same_v<T, std::string>, bool> = true> std::string debug_internal(const T& value, bool printPrefix = true) { | |
std::string prefix; | |
if constexpr (std::is_pointer_v<T>) { | |
if (printPrefix) prefix = "-> "; | |
if (!value) return prefix + "NULL"; | |
if constexpr (std::is_convertible_v<T, std::string>) return prefix + '\"' + value + '\"'; | |
else return prefix + debug_internal(*value, false); |