JBOMLS
Just a Bunch Of Music Library Scripts
Install / Use
/learn @trevordavies095/JBOMLSREADME
JBOMLS
Just a Bunch Of Music Library Scripts
A collection of Python scripts for maintaining and organizing music libraries. These tools help with cleanup, transcoding, metadata management, and library maintenance tasks.
Table of Contents
Requirements
- Python 3.6+
- ffmpeg (must be installed and available in PATH)
- Dependencies listed in
requirements.txt:ffmpeg-pythonfiletypemutagen(for FLAC metadata editing)
Installation
- Clone or download this repository
- Install dependencies:
pip install -r requirements.txt - Ensure
ffmpegis installed and accessible from your command line
Scripts
Cleanup Scripts
cleanup_orphan_dirs.py
Removes directories that contain only a single image file (typically orphaned cover art directories).
Usage:
python cleanup_orphan_dirs.py -p /path/to/music/library
Example: The following directory would be deleted:
/Music/Talk Talk/[1991] Laughing Stock/
└── cover.jpg
The following directory would not be deleted (contains audio files):
/Music/Talk Talk/[1982] The Party's Over/
├── cover.jpg
├── 01 Talk Talk.flac
├── 02 It's So Serious.flac
└── ...
cleanup_orphan_dirs_v2.py
Finds album directories (at depth 1: library/artist/album) that don't contain audio files. Checks for audio files with a specific pattern (looking for '01 ' in filenames). If an album directory doesn't contain matching audio files, it will offer to delete the directory.
Usage:
python cleanup_orphan_dirs_v2.py -p /path/to/music/library
cleanup_orphan_dirs_v3.py
An improved version of the orphan directory cleanup script. Uses the filetype library to properly detect audio files and recursively checks subdirectories for any music files. If an album directory (at depth 1: library/artist/album) has no music files anywhere within it, it will offer to delete the directory. More reliable than v2 as it uses proper audio file detection rather than filename pattern matching.
Usage:
python cleanup_orphan_dirs_v3.py -p /path/to/music/library
delete_numbered_covers.py
Finds and deletes numbered cover art files (e.g., cover.1.jpg, cover.2.png) from a directory structure. Recursively searches through all subdirectories and matches files with the pattern cover.N.jpg or cover.N.png where N is any integer >= 1. The script will display all matching files and prompt for user confirmation before deletion.
Usage:
python delete_numbered_covers.py -p /path/to/music/library
Example: The following files would be deleted:
/Music/Radiohead/[1997] OK Computer/
├── cover.jpg
├── cover.1.jpg ← deleted
├── cover.2.jpg ← deleted
└── cover.3.png ← deleted
Note: Only files matching cover.N.jpg or cover.N.png where N >= 1 will be deleted. Files like cover.jpg or cover.0.jpg are not affected.
Transcoding Scripts
flac_to_lame.py
Transcodes FLAC files in a directory to MP3 format. Supports both 320kbps and V0 quality settings.
Usage:
python flac_to_lame.py -p /path/to/flac/directory -t 320 v0
Options:
-p, --path: Path to directory containing FLAC files-t, --transcodes: Transcode options - choose320(320kbps),v0(V0 quality), or both
Note: Creates subdirectories mp3_320/ and/or mp3_v0/ in the source directory.
hifi_to_cdq.py
Transcodes lossless audio files (FLAC, WAV, MKA) to CD quality FLAC (16-bit, 44.1kHz).
Usage:
python hifi_to_cdq.py -p /path/to/audio/directory
Note: Creates a transcode/ subdirectory in the source directory with the converted files.
recursive_transcode.py
Recursively transcodes lossless audio files (FLAC, WAV) throughout a directory structure and rebuilds the original folder structure at the destination. Converts to ALAC format by default.
Usage:
python recursive_transcode.py -p /path/to/source -o /path/to/destination
Options:
-p, --path: Source directory to transcode-o, --output_path: Destination directory for transcoded files
Metadata Scripts
plexamp_release_type.py
Updates RELEASETYPE metadata tags in FLAC files to the format required by Plex/Plexamp. Plex/Plexamp requires specific formatting for release types to properly categorize albums.
Usage:
python plexamp_release_type.py -p /path/to/music/library
Example: A file with release type "Live" will be updated to "album;live" so it appears under Plex/Plexamp's Live Albums grouping.
Supported Release Types:
| Original Release Type | Updated Release Type | |----------------------|---------------------| | live | album;live | | compilation | album;compilation | | remix | album;remix | | mixtape | album;mixtape | | soundtrack | album;soundtrack |
Utility Scripts
folder_to_cover.py
Renames folder.jpg files to cover.jpg throughout a directory structure. Useful for standardizing cover art filenames in your music library.
Usage:
python folder_to_cover.py -p /path/to/music/library
no_cover.py
Reports album directories (those with "[" in the path, indicating album naming convention) that don't have a cover.jpg file. Prints out the paths of directories missing cover art.
Usage:
python no_cover.py -p /path/to/music/library
non_log_flacs.py
Scans a music library and reports on lossless albums (at depth 1: library/artist/album) that do not have a log file in the album directory. Useful for identifying albums that may be missing EAC/ripping logs.
Usage:
python non_log_flacs.py -p /path/to/music/library
Example: The following directory would show up in the report (no log file):
/Music/Radiohead/[1997] Karma Police (Single)/
├── cover.jpg
└── 01 Karma Police.flac
The following directory would not show up (has log file):
/Music/Radiohead/[1997] Karma Police (Single)/
├── cover.jpg
├── 01 Karma Police.flac
└── Karma Police.log
Contributing
Contributions are welcome! Feel free to submit issues, improvements, or new scripts.
Related Skills
claude-opus-4-5-migration
84.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
docs-writer
99.5k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
341.6kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
50.1k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
