Logo JukeGram (BASH script)
JukeGram (BASH script)

JukeGram (BASH script)

By Page Telegram
πŸ’› Support Page Telegram directly πŸ’³ Donate
Current Version: 3.2.7
27
Unique Views
11
Free Downloads
0
Donation Downloads

JukeGram

A full-featured terminal jukebox written in Bash. Search YouTube, YouTube Music, SoundCloud, Odysee, Dailymotion, Rumble, any PeerTube instance, or a custom site; stream or download tracks; manage a local library by week; create multi-format custom playlists (M3U, PLS, XSPF, …); build URL-based streaming playlists; and play music β€” all from a navigable TUI. Current version: v3.27 β€” see CHANGELOG.md for release notes.

╔══════════════════════════════════════════════════════╗
β•‘           β™ͺ  J u k e G r a m  β™ͺ                     β•‘
β•‘              Terminal Jukebox  v3.27                 β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

  MAIN MENU

  β–Ά  [S]  Search & Download
     [L]  Library  (by week)
     [B]  Bookmarks  (live streams)
     [Z]  Shuffle all
     [P]  Custom playlists
     [R]  Streaming playlists  (URL-based, import / export)
     [C]  Player controls
     [O]  Player settings  (mpv / no_video / none)
     [W]  Connect to WiFi  (nmtui)
     [U]  USB / Drive manager
     [X]  System startup config
     [I]  Install / check dependencies
     [Q]  Quit

Features

  • Multi-site search β€” default is YouTube; also YouTube Music, SoundCloud, Odysee (LBRY), Dailymotion, Rumble, PeerTube (any instance host), or a custom yt-dlp prefix / URL template ({q} = encoded query); history and cache are site-aware
  • YouTube search β€” query yt-dlp, browse 10 results with title, duration, and uploader; live streams are tagged [LIVE] in the results list; upload date is fetched and stored per result
  • Playlist search β€” from within any search result screen, select "πŸ“‹ Search playlists: \<query\>" to switch to a playlist-only search; results list playlist title and channel; each playlist can be downloaded in full (MP3 HQ/STD, Video 320p/720p/1080p) or streamed audio-only
  • Full playlist download β€” download every track in a YouTube playlist to a named subfolder inside the current week's library directory (YYYY/Week_NN/<playlist-title>/); output is prefixed with the playlist index for correct ordering; the subfolder appears in the Library browser alongside regular week folders
  • Upload date display and logging β€” every stream and download shows the original video's upload date (YYYY-MM-DD) on screen; a persistent access log (~/.jukegramstreamlog) records each stream/download with timestamp, action type, upload date, title, and URL
  • Stream quality selection β€” stream at 320p (mobile), 480p (default), or 1080p (Full HD)
  • Audio-only streaming β€” stream best available audio with no video window via "β™ͺ Stream audio only" in any stream action menu
  • Stream buffering β€” mpv pre-buffers network streams to prevent stutter; buffer depth (10 s / 30 s / 60 s / 120 s) is configurable in Player Settings; uses mpv cache with pause-on-underrun so playback resumes smoothly rather than glitching
  • Live stream bookmarks β€” search results identified as live streams show a "β˜… Bookmark this live stream" option; bookmarks are saved persistently and accessible from [B] Bookmarks in the main menu; each bookmark can be played at any quality (including audio-only) or removed; press [B] (uppercase) on the now-playing screen to instantly bookmark the current stream without opening any sub-menu
  • Quick bookmark from now-playing β€” [B] (Shift+B) while a stream is playing immediately saves it to bookmarks; reads the current URL live from mpv IPC; does nothing for local files; [b] lowercase still goes back
  • Auto-download + add to last playlist β€” [P] on the now-playing screen (and the "⬇+β˜…" action in search results) downloads the current stream using the configured default format and automatically appends the saved file to the most recently used playlist; if no last playlist is known, a playlist-picker opens immediately after the download so the file is never left unassigned
  • Batch download from search results β€” press Space on any search result to toggle it selected (● green / β—‹ unselected); once one or more items are marked, press D to open a format picker and download all selected tracks in sequence; progress is shown as [N/total] with a βœ”/✘ per track; selections are cleared after the batch completes; pressing Enter on any result still opens the normal single-item action menu unchanged
  • Last-playlist tracking β€” JukeGram remembers the last playlist you played or added a track to; the [P] key uses this automatically so no manual selection is needed
  • Streaming playlists β€” URL-based playlists ([R]) stored as .spl files; hold YouTube links, live stream URLs, or any direct media URL; independent of the local custom playlist system; create, edit, play, shuffle, and delete entries; add tracks directly from the last search results without leaving the playlist editor
  • Import / export streaming playlists β€” export any streaming playlist to a portable .jkpl file (human-readable, tab-separated); import on another JukeGram instance by pointing to the file path; format is validated by a #JUKEGRAMSPLV1 header before import
  • Export to mpv-compatible M3U β€” export any custom playlist, streaming playlist, or bookmarks list as an #EXTM3U file compatible with mpv --playlist=<file>; available in the manage menu for all playlist types
  • Add / bookmark from now-playing screen β€” press [a] while any track is playing to save or queue it: streaming URLs offer "β˜… Bookmark" or "✚ Add to streaming playlist"; local files offer "✚ Add to custom playlist"; reads the current path live from mpv IPC so it works mid-playlist
  • Download options β€” 5 formats: MP3 HQ (~320kbps VBR), MP3 STD (~128kbps), Video 320p/720p/1080p
  • Weekly library β€” tracks organized under ~/Music/JukeGram/YYYY/Week_NN/
  • Stay in folder β€” after playing or acting on a track, the library returns to that week's folder
  • Shuffle all β€” play the entire library in random order
  • Custom playlists β€” create, edit, add/remove tracks, play or shuffle; supports M3U/M3U8, PLS, XSPF, ASX (and JukeGram SPL/JKPL); import external files; open external paths/URLs; entries may be local files or stream URLs; HLS .m3u8 plays as a single stream
  • Media management β€” delete individual tracks or multi-select bulk delete from the library; delete files from disk directly in the playlist editor
  • USB / drive manager β€” list, mount, unmount drives; browse and play music directly from removable media
  • USB media migration β€” copy or move tracks from removable media into the library; multi-select import with copy/move choice and destination week picker
  • Multiple player engines β€” mpv (default), mplayer, ffplay, vlc
  • Video modes β€” GPU window, audio-only, ASCII art (--vo=tty), colour ASCII (--vo=caca / libcaca), framebuffer DRM (fb_video)
  • Framebuffer video (fb_video) β€” renders video via DRM/KMS (--vo=drm) with no X11 required; works on bare TTYs, Raspberry Pi, and headless systems; X11 screen flags are automatically suppressed so mpv does not conflict between X11 and DRM mode
  • Visualizers β€” cava spectrum bars, mpv waveform (showwaves), mpv vector scope (avectorscope)
  • Output device control β€” select which screen video plays on (multi-monitor, including "All displays" span), and which audio device to use (HDMI, audio jack, PulseAudio/PipeWire)
  • TAB / Backspace track skip β€” during shuffle or playlist playback, Tab skips to the next track and Backspace returns to the previous; works on macOS and Linux keyboards
  • Full transport controls β€” on the now-playing screen and [C] Player controls: Space pause/resume, arrow keys seek (Β±10 s / Β±60 s), +/- volume, m mute; live progress bar with time and volume via mpv IPC
  • Storage bar in header β€” live disk-usage bar (used / free / total + colour-coded block bar) shown in the header on every screen
  • Network & battery in header β€” active interface RX/TX byte counters and battery level (with charge state) shown in the header; battery colour-codes green / yellow / red by charge level
  • Search result caching β€” results for the last 5 site+query pairs are cached to disk; re-selecting a history entry is instant (⚑); new searches and explicit refresh re-fetch from the active site (⟳)
  • yt-dlp upgrade β€” one-click upgrade in the Install / check dependencies menu; auto-detects pacman (Arch), pipx, or pip3
  • Console mode β€” disables all X11-requiring options; safe on headless systems and TTYs
  • System startup config β€” toggle auto-login on TTY1 and auto-launch JukeGram on boot (console mode only)
  • WiFi β€” launches nmtui for NetworkManager-based WiFi management
  • Dependency installer β€” checks, installs, and upgrades all packages individually so a single failure does not abort the rest; supports Debian Sid, Ubuntu, and Arch Linux; on Debian/Ubuntu, a failed package install is automatically retried with apt-get --fix-missing before being counted as a failure
  • Uppercase hotkeys β€” every menu item with a [X] label can be activated directly by pressing that uppercase letter
  • Arrow key navigation throughout; Esc or q goes back at every screen
  • Search history β€” last 5 queries shown at the top of the search screen; select to re-run instantly, or choose "New search..." to type a fresh query; history is deduplicated and persisted to ~/Music/JukeGram/.jukegram_history
  • Kiosk PIN lock β€” optional PIN that locks the Player Settings menu; set/clear/change from within Settings; main menu shows πŸ”’ when active; wrong PIN returns to main menu
  • Kiosk exit protection β€” when a kiosk PIN is active, pressing q or Esc at the main menu fires a beep and does nothing; the [Q] Quit item requires the correct PIN before the program exits; prevents unattended kiosks from being closed without the PIN
  • Kiosk stream/download restrictions β€” when a kiosk PIN is active, stream quality and download options can each be locked to a single choice (configured in Player Settings β†’ Kiosk restrictions); the action menu collapses to exactly one stream quality and one download option β€” no filtering from a long list, just the permitted option
  • Colorful TUI β€” WCAG AA contrast-compliant colour palette, Unicode box-drawing, pixel-accurate border alignment, now-playing bar
  • TV safe-area margin β€” entire TUI is indented by one tab with matching right margin so text survives typical overscan on TVs / HTPCs
  • Requirements

    PackageDebian / Ubuntu nameArch Linux nameRoleRequired?
    mpvmpvmpvPrimary playerYes
    yt-dlpvia pipxyt-dlpSearch & downloadYes
    socatsocatsocatIPC (track skip, seek, now-playing info, add/bookmark) β€” python3 is used as fallbackRecommended
    mplayermplayermplayer (AUR)Alternate playerOptional
    ffmpeg / ffplayffmpegffmpegMP3 conversion, alternate playerOptional (X11)
    vlcvlcvlcAlternate player (ncurses)Optional
    NetworkManagernetwork-managernetworkmanagerWiFi management (nmtui)Optional
    libcacalibcaca-utilslibcacaColour ASCII videoOptional
    cavacavacavaSpectrum visualizerOptional
    pipxpipx / python3-pipxpython-pipxInstall yt-dlp (Debian only)Recommended (Debian)
    udisksctludisks2udisks2No-sudo USB mount/unmountOptional
    curlcurlcurlOdysee / Rumble search helpersRecommended
    python3python3python3mpv IPC JSON, Odysee/Rumble/XSPF parsing fallbackRecommended

    Installation

    Quick one-liner

    Arch Linux β€” Console mode:
    bash
    sudo pacman -Sy --noconfirm mpv mplayer vlc networkmanager libcaca cava yt-dlp
    
    Arch Linux β€” Full mode (includes ffmpeg / ffplay):
    bash
    sudo pacman -Sy --noconfirm mpv mplayer ffmpeg vlc networkmanager libcaca cava yt-dlp
    
    Debian / Ubuntu β€” Console mode (no X11, no ffmpeg):
    bash
    sudo apt-get update && sudo apt-get install -y mpv mplayer vlc network-manager libcaca-utils cava pipx && pipx install yt-dlp && pipx ensurepath
    
    Debian / Ubuntu β€” Full mode (includes ffmpeg / ffplay):
    bash
    sudo apt-get update && sudo apt-get install -y mpv mplayer ffmpeg vlc network-manager libcaca-utils cava pipx && pipx install yt-dlp && pipx ensurepath
    

    Built-in installer

    JukeGram includes an installer accessible from the main menu ([I]). It auto-detects the distro (Arch or Debian/Ubuntu), selects the right package names and package manager, and installs each package individually showing a pass/fail result. The displayed one-liner also reflects the detected distro. The installer menu also offers ⬆ Upgrade yt-dlp β€” auto-detects the installation method (pacman on Arch, pipx, or pip3) and upgrades yt-dlp in place, showing the version before and after.

    Manual script setup

    bash
    

    Download or copy jukegram.sh, then:

    chmod +x jukegram.sh ./jukegram.sh
    If yt-dlp or mpv are missing, JukeGram will offer to open the installer automatically on first launch. If yt-dlp was installed via pipx, make sure ~/.local/bin is on your PATH:
    bash
    pipx ensurepath
    source ~/.bash_profile   # or open a new terminal
    

    Usage

    Navigation

    KeyAction
    ↑ / kMove up
    ↓ / jMove down
    PgUp / PgDnScroll a page
    Home / EndJump to top / bottom
    EnterSelect
    SpaceToggle selection (multi-select menus and search results)
    q or EscBack / cancel
    S, L, Z …Uppercase hotkey (selects labelled item directly)
    TabSkip to next track (shuffle / playlist playback)
    BackspaceGo to previous track (shuffle / playlist playback)
    SpacePause / resume (now-playing and player controls; mpv)
    ← / β†’Seek Β±10 s (now-playing and player controls)
    ↑ / ↓Seek Β±60 s (now-playing and player controls)
    + / -Volume Β±5 (now-playing and player controls)
    mMute toggle (now-playing and player controls)
    aAdd to playlist or bookmark (now-playing screen)

    Search & Stream / Download

    Select [S] Search & Download, choose a search site (default YouTube), enter a query, and browse results.
    SiteHow it searches
    YouTubeytsearch50: via yt-dlp with --flat-playlist (default)
    YouTube Musicmusic.youtube.com search (artist / album metadata)
    SoundCloudscsearch50: via yt-dlp
    OdyseeLBRY Lighthouse API β†’ odysee.com claim URLs
    DailymotionDailymotion site search
    RumbleScrapes rumble.com/search/video β†’ playable video pages (yt-dlp plays each URL)
    PeerTube…Any PeerTube instance host (e.g. framatube.org, peertube.tv). Uses /api/v1/search/videos; last host remembered. Federated results may live on other instances.
    Custom…Your yt-dlp prefix (e.g. scsearch50, nicosearch20) or URL template with {q} (encoded) / {query} (raw). Last custom value is remembered. Example for Vimeo-style search: https://vimeo.com/search?q={q} (support depends on yt-dlp / the site).
    History entries remember which site was used (including the PeerTube host); the results header shows the active site. YouTube playlist search remains available only when searching YouTube / YouTube Music. PeerTube tips
  • Enter a bare host or full URL: framatube.org or https://tilvids.com
  • Public instance directory: instances.joinpeertube.org
  • Requires curl + python3 to call/parse the PeerTube API
  • Stream and download work on returned watch URLs via yt-dlp’s PeerTube extractor
  • Multi-select batch download

    In the results list, press Space to toggle any result between unselected β—‹ and selected ●. The header updates with a live count (● N selected) and the hint bar gains a [D] Download N selected shortcut. Press D to open a format picker; all selected tracks are then downloaded in sequence to the current week's library folder. Selections survive navigating into an individual action menu and back. Pressing Enter on a result item always opens the single-item action menu regardless of what else is selected. For each individual result: Stream options (plays immediately via mpv, with automatic stream buffering):
    OptionQuality
    Stream 480pDefault β€” SD/HD balanced
    Stream 320pMobile / low bandwidth
    Stream 1080pFull HD
    Stream audio onlyBest available audio, no video window
    Playlist / bookmark options:
    OptionDescription
    ✚ Add to streaming playlistSaves the URL and title into a streaming playlist of your choice
    β˜… Bookmark this live streamLive results only β€” saves URL to ~/Music/JukeGram/.jukegram_bookmarks
    Download options (saves to ~/Music/JukeGram/YYYY/Week_NN/):
    OptionDescription
    MP3 HQAudio only, ~320kbps VBR β€” best audio quality
    MP3 STDAudio only, ~128kbps β€” smaller file size
    Video 320pMobile-quality video
    Video 720pHD video
    Video 1080pFull HD video

    Playlist Search & Download

    From any search results screen, select πŸ“‹ Search playlists: \<query\> to search YouTube for playlists matching the same keyword. Results show the playlist title and channel name. For each playlist result:
    OptionDescription
    ⬇ Download all β€” MP3 HQDownloads every track, audio only, ~320kbps VBR
    ⬇ Download all β€” MP3 STDDownloads every track, audio only, ~128kbps
    ⬇ Download all β€” Video 320p/720p/1080pDownloads every track as MP4 at the chosen resolution
    β–Ά Stream playlist (audio only)Streams all tracks via mpv without downloading
    Downloaded playlists are saved to ~/Music/JukeGram/YYYY/Week_NN/<playlist-title>/ with filenames prefixed by their playlist index (e.g. 1 - Track Name.mp3).

    Now-Playing Screen Controls

    KeyAction
    TabSkip to next track
    BackspaceGo to previous track
    sStop playback
    B (uppercase)Instantly bookmark the current stream (no sub-menu)
    aAdd / bookmark current track (opens context menu)
    P (uppercase or lowercase)Download current stream and add to last playlist
    b (lowercase)Back to menu (playback continues)
    β†’ / ←Seek Β±10 s (fbvideo mode only)
    ↑ / ↓Seek Β±60 s (fbvideo mode only)
    The upload date of the currently playing stream is shown beneath the track title when available. #### Quick Bookmark ([B]) Press B (Shift+B) to immediately add the current stream URL to your bookmarks β€” no confirmation screen, no sub-menu. The title is read live from mpv IPC and saved alongside the URL. [B] only works for network streams (http://, https://, rtmp://); pressing it for a local file does nothing. #### Add / Bookmark from now-playing ([a]) Press a at any time while a track is playing. JukeGram reads the current path from mpv's IPC socket and offers context-appropriate options:
    Currently playingOptions
    Streaming URL (http://, https://, rtmp://)β˜… Bookmark this stream Β· ✚ Add to streaming playlist
    Local file✚ Add to custom playlist
    Requires socat (or python3) and the mpv engine. Works mid-playlist β€” the current track at the moment you press a is what gets saved. #### Auto-Download + Add to Last Playlist ([P]) Press P while a stream is playing to download it and add the resulting file to the last playlist you interacted with (played or added a track to). The download format follows the Default download setting in Player Settings.
  • If a last playlist is known: downloads the track, then appends the file path to that playlist automatically
  • If no last playlist is known: downloads the track, then immediately opens a playlist picker so the file can be assigned on the spot β€” nothing is left unassigned
  • The "last playlist" is updated any time you play a playlist, shuffle a playlist, or add a track to a playlist from any menu
  • Search History & Caching

    The search screen shows the last 5 queries above the text prompt. Each entry is labelled with a speed indicator:
    IndicatorMeaning
    ⚑Results cached β€” selecting this entry is instant
    ⟳No cache yet β€” yt-dlp will fetch on selection
    Caches are stored in ~/Music/JukeGram/.jukegram_cache/ (one file per query, named by hash). They are pruned automatically when a query falls off the 5-entry history. A ⟳ Refresh results (re-fetch from YouTube) option inside the results screen forces a fresh fetch and updates the cache.

    Bookmarks

    [B] Bookmarks in the main menu shows all saved live stream bookmarks. For each bookmark:
    OptionDescription
    Stream 480p / 320p / 1080pStream at the selected quality
    Stream audio onlyAudio stream, no video window
    βœ— Remove bookmarkDeletes the entry from the bookmarks file
    ⬇ Export bookmarks as mpv M3U...Writes an #EXTM3U file loadable with mpv --playlist=<file>
    Bookmarks are stored as tab-separated url<TAB>title lines in ~/Music/JukeGram/.jukegrambookmarks. The "β˜… Bookmark" option only appears for results yt-dlp identifies as live (islive=True); regular videos do not show it in the search results action menu. Streams can also be bookmarked from the now-playing screen with [a] (context menu) or [B] (instant, no sub-menu). #### Exporting Bookmarks as M3U Select ⬇ Export bookmarks as mpv M3U... to write a standard extended M3U file containing all your bookmarked stream URLs. The default output path is ~/bookmarks.m3u. Play the exported file with:
    bash
    mpv --playlist=~/bookmarks.m3u
    

    Streaming Playlists

    [R] Streaming playlists manages URL-based playlists that can hold any YouTube link, live stream URL, or direct media URL. Unlike custom playlists (which store local file paths), streaming playlists are portable and designed for sharing between machines. #### Within a streaming playlist you can:
    ActionDescription
    β–Ά Play allStreams all URLs in order via mpv
    ⟳ Shuffle & playStreams all URLs in random order
    ✚ Add from last search resultsPick any result from your most recent YouTube search
    ✎ Add URL manuallyPaste a URL and give it a label
    βœ— Remove tracksMulti-select tracks to remove
    ⬇ Export to fileWrites a portable .jkpl file
    ⬇ Export as mpv M3U...Writes a standard #EXTM3U file for use with mpv --playlist=
    ⚠ Delete playlistPermanently removes the .spl file
    Each track in the list can be played directly at 480p / 320p / 1080p / audio-only, or removed, from its individual action menu. #### Export Exporting writes a .jkpl file (plain text, tab-separated). The default path is ~/jukegram<name>.jkpl. The file begins with a #JUKEGRAMSPL_V1 header followed by the playlist name, export date, track count, and one url<TAB>title line per track.
    
    #JUKEGRAMSPLV1
    #NAME:My Playlist
    #EXPORTED:2026-05-28
    #COUNT:3
    https://www.youtube.com/watch?v=...	Track One
    https://www.youtube.com/watch?v=...	Track Two
    https://www.youtube.com/watch?v=...	Track Three
    
    #### Import From the Streaming Playlists menu, choose ⬆ Import playlist from file.... Enter the path to a .jkpl file (supports ~ expansion). JukeGram validates the header, previews the first 5 tracks, and prompts for a playlist name before saving. If a playlist with the same name exists, you are asked to confirm before overwriting.

    Library

    Browse by year and week. Downloaded YouTube playlists appear as named subfolders within their week (e.g. 2026/Week_24/My Playlist/) and are listed alongside regular week entries. Within any folder you can:
  • Play a single track, queue from a track onwards, or shuffle the week
  • Add individual tracks to a custom playlist
  • Delete a single track from the track action menu (with confirmation)
  • Bulk delete via βœ— Delete tracks... β€” multi-select with Space, then confirm
  • After any track action, you return to the same week folder automatically
  • Custom Playlists

    Create named playlists, add tracks from any week folder (multi-select with Space), reorder by removing and re-adding, and play or shuffle. Custom playlists are stored under ~/Music/JukeGram/custom_playlists/ and support common formats:
    FormatNotes
    .m3u / .m3u8Extended M3U (#EXTINF titles); relative paths resolved; stream URLs allowed
    .plsWinamp-style FileN / TitleN
    .xspfXML Shareable Playlist Format
    .asxWindows Media metafile
    .spl / .jkplJukeGram URL+title rows (also under Streaming Playlists)
    HLS .m3u8Detected via #EXT-X-* β€” played as one stream (not expanded)
    From the Custom Playlists menu you can import an external playlist (converted to extended M3U with resolved paths), open & play a path or remote playlist URL without importing, or Play native to hand the file to mpv/mplayer/VLC. Use Add path or stream URL for radio streams and remote media. Streaming Playlists ([R]) remain the dedicated URL-centric editor with .jkpl portable export. Each track in a playlist offers two removal options:
  • βœ— Remove from playlist β€” removes the entry from the .m3u file only
  • ⚠ Delete file from disk β€” permanently deletes the file and removes it from the playlist
  • Each playlist's manage menu includes ⬇ Export as mpv M3U... which writes a standard extended M3U with all resolved entries (local paths and stream URLs). Open it with:
    bash
    mpv --playlist=~/my_playlist.m3u
    

    USB / Drive Manager

    Lists all mountable partitions detected by lsblk. Select a partition to mount or unmount. Uses udisksctl (no sudo needed) when available, with a sudo mount fallback. Once mounted, browse the drive for audio/video files. From the drive's music browser:
    OptionDescription
    Select a trackPlay, copy to library, or move to library
    ✚ Copy all to libraryCopies every file on the drive to this week's folder
    ⬆ Import selection...Guided 3-step import flow (see below)
    #### Guided import (⬆ Import selection...)
  • Select β€” multi-select tracks with Space
  • Action β€” choose Copy (keep originals on USB) or Move (copy then delete from USB). Move is safe: the source file is only deleted after cp succeeds.
  • Destination β€” pick "This week" or choose any existing library week folder
  • Player Settings

    Access via [O] in the main menu.
    SettingOptions
    Console modeON / OFF
    Player enginempv (default), mplayer, ffplay, vlc
    Video / render modedefault, novideo, ttyascii, cacaascii, fbvideo
    Visualizernone, cava, mpvwave, mpvscope
    Normalize audioON / OFF β€” EBU R128 loudnorm via mpv lavfi
    Default downloadmp3hq, mp3std, mp4320p, mp4720p, mp4_1080p
    Stream quality480p (default), 320p, 1080p
    Stream buffer10s, 30s (default), 60s, 120s β€” seconds of ahead-buffer for network streams
    Output displayX11: detected active monitors via xrandr + "All displays" option; Console: connected DRM connectors from /sys/class/drm/
    Overscan comp.OFF, 3%, 5%, 8%, 10% β€” linear --video-scale-x/y (e.g. 5% β†’ scale 0.95) so TV overscan does not crop edges
    Audio outputauto, detected active sinks (pactl), mpv device list, or manual entry
    Kiosk PINSet / change / clear the kiosk PIN that gates Player Settings
    Kiosk restrictionsStream quality limit and download type limit (enforced when a kiosk PIN is active)
    \* Requires X11. Blocked in console mode.

    Kiosk Mode

    When a Kiosk PIN is set:
  • The Player Settings menu requires the PIN to enter
  • Pressing q or Esc at the main menu fires a terminal beep and does nothing β€” the program cannot be dismissed without the PIN
  • Selecting [Q] Quit prompts for the PIN before exiting; wrong PIN cancels and returns to the menu
  • The Kiosk restrictions sub-menu (accessible from within Player Settings once unlocked) lets you configure what end-users can do: Stream quality restriction (kiosk_stream):
    SettingBehaviour
    all (default)All stream qualities available (480p, 320p, 1080p, audio-only)
    480pOnly 480p and audio-only stream offered
    320pOnly 320p and audio-only stream offered
    When a kiosk stream restriction is active, the action menu collapses to exactly one stream quality option rather than filtering a longer list. Download restriction (kiosk_dl):
    SettingBehaviour
    all (default)All download formats available
    audioOnly MP3 download offered; video download options hidden
    noneNo download option shown at all
    Restrictions apply in showsearchresults (search result action menus) and in buildstream_menu (used by bookmarks and streaming playlist track actions), so they are consistently enforced everywhere a stream or download is offered. fb_video uses mpv's --vo=drm (DRM/KMS) to render video directly to the framebuffer without X11 β€” useful on bare TTYs and Raspberry Pi. When fb_video is active, the now-playing screen gains seek controls via arrow keys:
    KeyAction
    β†’Seek forward 10 seconds
    ←Seek back 10 seconds
    ↑Seek forward 60 seconds
    ↓Seek back 60 seconds
    Seek requires socat to communicate with mpv via its IPC socket.

    Output Display selection

    In X11 mode, the setting queries xrandr --listactivemonitors and lists only monitors that are currently active. The selected index is passed as --screen=N to mpv. An additional "All displays" option passes --fs-screen=all --fullscreen to span video across every connected monitor. In console mode (or when no display server is detected), the setting scans /sys/class/drm/card-/status and lists only connectors whose status file reads connected. The selected connector (e.g. HDMI-A-1, DP-1) is passed as --drm-connector=<name> to mpv when using fb_video mode. Connectors that are disconnected are not shown.

    Overscan Compensation

    Some TVs cut off the edges of the picture (overscan). The Overscan comp. setting shrinks the image with linear mpv --video-scale-x / --video-scale-y so the full frame stays inside the TV’s crop.
    SettingEffectmpv flags
    OFFNo scaling(none)
    3%Slight zoom-out--video-scale-x=0.97 --video-scale-y=0.97
    5%Typical--video-scale-x=0.95 --video-scale-y=0.95
    8%Heavy--video-scale-x=0.92 --video-scale-y=0.92
    10%Very heavy--video-scale-x=0.90 --video-scale-y=0.90
    Applied for single-track play, expanded playlists, and native playlist hand-off (mpv paths). Settings are saved to ~/Music/JukeGram/.jukegram_config. > Note: Releases before v3.24 used logβ‚‚ --video-zoom=-0.0N, which barely changed the picture. Upgrade and re-select overscan if an older setting still β€œdoes nothing.”

    TUI safe-area margin (text overscan)

    Independently of video overscan scaling, the whole terminal UI is drawn with a one-tab left indent and a matching reduction in content width (default 8 columns left + right). This keeps menus, the header box, and prompts inside a typical TV safe area when JukeGram runs full-screen on a console or HTPC.
    ConstantDefaultRole
    SAFEINDENTone tab (\t)Prefix on every UI line
    SAFEINDENT_COLS8Columns reserved left and right when computing COLS

    Header Display

    The header box shown on every screen contains up to four rows of live system information beneath the title.

    Storage Bar

    
      Disk  β–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘  used 45G / free 89G  (33%)
    
    Reads / via df -h. The 22-character block bar (β–ˆ / β–‘) turns yellow at 75% use and red at 90%.

    Network & Battery Row

    
      Net  ↓ 1G  ↑ 204M   |   πŸ”‹ 78%  (Charging)
    
  • Network β€” detects the active interface via ip route get 8.8.8.8 (local routing-table lookup, no packet sent), then reads cumulative RX and TX byte counters from /proc/net/dev. Values are formatted as B / K / M / G.
  • Battery β€” reads /sys/class/power_supply/BAT*/capacity and /status. Colour-coded: green > 40%, yellow 20–40%, red ≀ 20%. The row is omitted when no battery is present (desktop systems).
  • Download Format Differences

    FormatDescription
    MP3 HQAudio stripped from video, re-encoded to MP3 at VBR quality 0 (~320kbps). Best audio quality, slightly larger file.
    MP3 STDSame process but at VBR quality 5 (~128kbps). Good for casual listening, roughly half the file size.
    Video 320p/720p/1080pFull video downloaded at the specified maximum height. Merged to MP4 container.

    Output Device Control

    #### Video Screen (multi-monitor) Under Player Settings β†’ Video screen, JukeGram reads connected monitors via xrandr --listactivemonitors and lists them by index and connector name (e.g. 0 β€” HDMI-1, 1 β€” DP-1). Select the screen index where mpv should open its video window. auto lets mpv decide (usually the primary display). "All displays" passes --fs-screen=all --fullscreen to mpv, spanning the video window across every connected monitor simultaneously. #### Audio Output Device Under Player Settings β†’ Audio output, JukeGram builds a deduplicated device list from two sources and always presents it as an arrow-key menu:
  • pactl list sinks short (PulseAudio / PipeWire compat) β€” lists currently active sinks; sinks in RUNNING state are marked with a ● active indicator
  • mpv --audio-device=help β€” any additional devices mpv knows about that pactl did not already cover
  • Devices are annotated:
  • [HDMI] β€” HDMI audio output
  • [Analog] β€” 3.5mm headphone/speaker jack
  • [PulseAudio] / [PipeWire] β€” software audio server
  • [ALSA default] β€” ALSA system default
  • ● active β€” sink currently in use
  • An "Enter device name manually" option at the bottom allows typing a custom mpv device string (e.g. alsa/hdmi:CARD=PCH,DEV=0) for devices not auto-detected. Select auto to use the system default. The selected device is passed to every mpv session via --audio-device.

    Console Mode

    Enable console mode when running on a headless server, Raspberry Pi, or bare TTY where no display server is available. In console mode:
  • ffplay engine and default video mode are blocked
  • The installer skips ffmpeg / ffplay
  • The System startup config option becomes available
  • Framebuffer video (fb_video) is available β€” plays video via DRM/KMS (--vo=drm) without X11

System Startup Config

Available under [X] in the main menu when console mode is on. Auto-login on TTY1 β€” writes a systemd getty override so the current user logs in automatically on TTY1 at boot:

/etc/systemd/system/getty@tty1.service.d/autologin.conf
Auto-start JukeGram β€” appends a guarded block to ~/.bashrc that runs JukeGram on TTY1 login:
bash

>>> JukeGram autostart >>>

if [[ -z "$DISPLAY" && "$(tty)" == "/dev/tty1" ]]; then exec /path/to/jukegram.sh fi

<<< JukeGram autostart <<<

Both toggles can be reversed from the same menu.

File Layout


~/Music/JukeGram/
β”œβ”€β”€ .jukegramconfig          # saved settings (searchcustom, search_peertube, overscan, kiosk PIN, …)
β”œβ”€β”€ .jukegram_history         # last 5 searches (site-aware tokens, e.g. peertube<TAB>host<TAB>query)
β”œβ”€β”€ .jukegram_bookmarks       # saved stream bookmarks (url<TAB>title, one per line)
β”œβ”€β”€ .jukegramstreamlog      # access log: tab-separated (accessed, action, upload_date, title, url)
β”œβ”€β”€ .jukegram_cache/          # cached search results (hash of site+query token)
β”‚   └── a1b2c3d4e5f6...
β”œβ”€β”€ custom_playlists/
β”‚   β”œβ”€β”€ favourites.m3u        # custom playlists (m3u/m3u8/pls/xspf/asx/spl/jkpl)
β”‚   β”œβ”€β”€ road_trip.m3u
β”‚   β”œβ”€β”€ imported_radio.pls
β”‚   └── streaming/            # URL-based streaming playlists
β”‚       β”œβ”€β”€ lofi.spl
β”‚       └── live_concerts.spl
β”œβ”€β”€ 2026/
β”‚   β”œβ”€β”€ Week_20/
β”‚   β”‚   β”œβ”€β”€ Track One.mp3
β”‚   β”‚   β”œβ”€β”€ Clip.mp4
β”‚   β”‚   └── My Playlist/          # downloaded YouTube playlist subfolder
β”‚   β”‚       β”œβ”€β”€ 1 - First Track.mp3
β”‚   β”‚       └── 2 - Second Track.mp3
β”‚   └── Week_21/
β”‚       └── ...
Stream access log format (.jukegramstreamlog) β€” tab-separated, one entry per stream or download:

2026-06-08 14:32	stream_480p	2024-11-15	Track Title Here	https://youtu.be/...
2026-06-08 14:45	downloadmp3hq	2023-08-22	Another Track	https://youtu.be/...
Columns: accessedtime, action (e.g. stream480p, downloadmp3hq, streamaudio), uploaddate (YYYY-MM-DD or - if unavailable), title (truncated to 80 chars), url. Streaming playlist file format (.spl):

#JUKEGRAMSPLV1
#NAME:My Playlist
https://www.youtube.com/watch?v=...	Track Title
https://www.youtube.com/watch?v=...	Another Track
Exported / importable playlist file (.jkpl) β€” same format with added metadata headers:

#JUKEGRAMSPLV1
#NAME:My Playlist
#EXPORTED:2026-05-28
#COUNT:2
https://www.youtube.com/watch?v=...	Track Title
https://www.youtube.com/watch?v=...	Another Track

Troubleshooting

Colors not displaying β€” ensure your terminal supports 256-colour ANSI (TERM=xterm-256color or similar). yt-dlp not found after pipx install β€” run pipx ensurepath and open a new shell, or add ~/.local/bin to your PATH manually. Unable to extract uploader id / YouTube downloads fail β€” almost always a too-old system yt-dlp (Debian/Ubuntu apt often ships 2022.04.08). JukeGram auto-picks the newest install it can find (~/.local/bin / pipx over /usr/bin) and refuses to start if the only copy is below 2023.03.01. Fix:
bash
pipx install --force yt-dlp && pipx ensurepath

or from the main menu: [I] Install β†’ ⬆ Upgrade yt-dlp

Do not rely on apt install yt-dlp alone on Debian/Ubuntu β€” that package is years behind YouTube’s API. mpv output corrupts the TUI β€” this is handled automatically. If you see corruption, switch video mode to no_video in Player Settings. USB mount fails without sudo β€” install udisksctl (apt install udisks2) for password-free mounting. USB move leaves source file behind β€” the source is only deleted after a successful copy. If rm fails (e.g. read-only filesystem), the copy is kept and a warning is shown. Auto-login not taking effect β€” reboot; the systemd unit change requires a restart of the getty service. Video plays on wrong screen β€” go to Player Settings β†’ Video screen and select the correct monitor index. No audio / wrong audio output β€” go to Player Settings β†’ Audio output and select the correct device. Run mpv --audio-device=help in a terminal to see all available device names. Stream quality too high for connection β€” go to Player Settings β†’ Stream quality and select 320p. Stream stutters or buffers frequently β€” go to Player Settings β†’ Stream buffer and increase the buffer (60 s or 120 s). This pre-fills the cache before playback starts and pauses briefly on underrun instead of glitching. [B] bookmark does nothing β€” [B] only works for network streams (http://, https://, rtmp://). It silently does nothing for local files. If the current mpv IPC path cannot be read (socat/python3 unavailable, or a non-mpv engine is in use), the key is a no-op. [P] downloads but does not add to a playlist β€” if no playlist has been played or added to yet in this session, [P] downloads the track and then immediately opens a playlist-picker so you can assign it on the spot. If the picker is dismissed with q/Esc, the file is kept in the library but not added to any playlist. Upload date shows - β€” the upload date is unavailable for live streams in progress (yt-dlp returns None for live dates). It is also absent if the yt-dlp network call fails. The download and stream still proceed normally. [B] bookmark shows "β˜… Bookmark" option not showing β€” the option only appears for results yt-dlp identifies as live (is_live=True). Regular videos and premieres do not qualify. You can still bookmark a stream mid-playback using [a] on the now-playing screen, or [B] for an instant bookmark. Bookmark plays but stream has ended β€” live streams are time-sensitive. If the stream is offline, mpv will report an error. Remove the stale bookmark and search for the channel again. Current track not shown during shuffle β€” the now-playing screen queries mpv via its IPC socket. JukeGram tries socat first, then falls back to python3. Install socat (apt install socat) for the fastest path; if unavailable, ensure python3 is installed. The [a], Tab/Backspace skip, and seek all use the same fallback. [a] Add/Bookmark shows "Cannot read current track path" β€” requires socat or python3 and the mpv engine. The [a] key has no effect with mplayer, ffplay, or vlc since those engines do not expose an IPC socket. Streaming playlist import fails validation β€” the file's first line must be exactly #JUKEGRAMSPLV1. Files created by other tools or with a missing header are rejected. Re-export from JukeGram to generate a valid file. Streaming playlist shows empty after import β€” entries must be url<TAB>title (a literal tab character between the URL and title). Lines starting with # are treated as header comments and skipped. Framebuffer video (fbvideo) shows blank screen or DRM errors β€” your user may need to be in the video group (sudo usermod -aG video $USER). Also ensure no X server is running on the same TTY. DRM errors now print to the terminal (stderr is no longer suppressed in fbvideo mode) so the specific error will be visible. Output display shows "No active DRM connectors" β€” the display may not be detected until it is connected before boot, or the DRM module may not be loaded. Run ls /sys/class/drm/ to check. Overscan compensation does nothing / barely changes the picture β€” needs v3.24+ (linear --video-scale-x/y). On older builds, β€œ5%” used ineffective --video-zoom=-0.05. Update JukeGram, open Player Settings β†’ Overscan, pick 5% or 8%, and start a new video play (not an already-running process). Overscan makes the picture too small β€” try a lower percentage (3% instead of 5% or 8%) or OFF. The optimal value depends on your TV. Rumble search returns no results β€” needs network access and curl (browser-like request to rumble.com). Cloudflare or layout changes can block scraping; try again later or open a Rumble URL via Streaming Playlists / custom URL. Individual Rumble video pages still play via yt-dlp once you have a URL. Odysee search empty β€” uses the public Lighthouse API (curl); check network, or paste an odysee.com URL into a streaming playlist. PeerTube search fails / empty β€” confirm the instance host is reachable (curl -I https://HOST/api/v1/config). Needs curl + python3. Some instances disable search or federation; try another host from instances.joinpeertube.org. Tab / Backspace skip not working β€” requires socat to communicate with the mpv IPC socket (apt install socat). Also ensure the player is using the mpv engine (not mplayer/ffplay/vlc). Battery not shown in header β€” the system has no battery (desktop), or the kernel power-supply path /sys/class/power_supply/BAT*/ is absent. This is expected on desktops and in virtual machines. Network stats show ? or 0 β€” ip and /proc/net/dev are required. If the active interface cannot be detected, the network segment is omitted from the header. Search cache not speeding up re-queries β€” cache files live in ~/Music/JukeGram/.jukegram_cache/. If the directory is missing, JukeGram creates it automatically on the next successful search. Check that the music directory is writable. yt-dlp upgrade reports "not found" β€” JukeGram checks for pacman, pipx, and pip3 in that order. If none is present, the upgrade cannot proceed β€” install pipx first (apt install pipx) and re-try.

Download Options

Free Download: Source code is freely available below.
Compiled Versions: Support development with a PayPal donation.

Free Downloads

πŸ“¦ Download Source Code

Changelog

Changelog

All notable changes to JukeGram are documented here. Format follows Keep a Changelog. ---

[3.27] β€” 2026-07-31

Fixed

  • YouTube search hung for minutes / felt broken β€” video and YouTube Music search ran yt-dlp without --flat-playlist on ytsearch100:, so each of up to 100 hits did a full page extract (JS runtime, API retries). Searches now use --flat-playlist --playlist-end 50 like SoundCloud/custom (search listing only, typically a few seconds)
  • Default YouTube target reduced from ytsearch100: to ytsearch50: (still 5 UI pages at 10/page)
  • Unable to extract uploader id / YouTube download & stream failure β€” Debian/Ubuntu’s apt yt-dlp (e.g. 2022.04.08) is broken against modern YouTube. JukeGram now:
  • - Resolves the newest yt-dlp on the system (~/.local/bin, pipx venv, then PATH//usr/bin) - Prepends ~/.local/bin to PATH so child processes see the modern binary - Points mpv’s ytdl hook at that binary via --script-opts=ytdlhook-ytdlpath=… - Treats versions older than 2023.03.01 as a hard dependency failure and steers the user to pipx install --force yt-dlp - Surfaces the active binary/version on download failure

    Changed

  • Version string bumped to v3.27
  • ---

    [3.26] β€” 2026-07-19

    Added

  • PeerTube search (custom instance) β€” site picker entry PeerTube (custom instance)…
  • - Prompts for any PeerTube host/URL (e.g. framatube.org, https://peertube.tv, tilvids.com) - Queries GET https://HOST/api/v1/search/videos?search=…&count=40 - Results include federated videos (URL may point at other instances); stream/download via yt-dlp - Last instance remembered as search_peertube in config; history/cache token peertube\thost\tquery - Helpers: peertubenormalizehost, srchpromptpeertube, srchpeertube_fetch

    Changed

  • Version string bumped to v3.26
  • ---

    [3.25] β€” 2026-07-19

    Added

  • TUI safe-area margin (TV overscan) β€” every on-screen line is prefixed with one tab (SAFE_INDENT), and the usable content width is reduced by two tab-stops (left + right) so menus, headers, and prompts stay inside a typical TV safe area
  • - Helpers: siecho, siprintf; getdims subtracts 2 Γ— SAFEINDENT_COLS (8 cols each side by default) - Applies to header box, arrow/multi menus, now-playing, settings, install screens, and other UI text via si_echo -e

    Changed

  • Version string bumped to v3.25
  • ---

    [3.24] β€” 2026-07-19

    Fixed

  • Overscan compensation was effectively a no-op β€” values like 5% were applied as --video-zoom=-0.05, but mpv’s --video-zoom is logβ‚‚ (so βˆ’0.05 is only a tiny scale change and felt broken). Overscan now uses linear --video-scale-x/y at (100βˆ’pct)/100:
  • - 3% β†’ 0.97, 5% β†’ 0.95, 8% β†’ 0.92, 10% β†’ 0.90 - Shared helper mpvappendoverscan used by single-track play (buildmpvcmd), expanded playlists (launchplaylist), and native playlist hand-off (launchplaylistfile)

    Added

  • Rumble search β€” site picker entry Rumble (rumble.com):
  • - Fetches https://rumble.com/search/video?q=… via curl (browser User-Agent) - Parses video links into playable https://rumble.com/v….html URLs for stream/download via yt-dlp - Site-aware history/cache token rumble\tquery (same pattern as other non-YouTube sites)
  • Overscan menu option 10% (scale to 90%)
  • Changed

  • Overscan settings UI labels now show the resulting scale (e.g. β€œ5% β€” typical (scale video to 95%)”)
  • Version string bumped to v3.24
  • README: overscan table corrected to --video-scale-*; Rumble documented; requirements list curl / python3
  • ---

    [3.23] β€” 2026-07-19

    Added

  • Multi-format custom playlists β€” Custom Playlists list and play more than plain .m3u:
  • - M3U / M3U8 (extended #EXTINF titles; relative paths resolved next to the playlist) - PLS (Winamp FileN / TitleN) - XSPF (XML Shareable Playlist Format) - ASX (Windows Media metafile) - SPL / JKPL (JukeGram streaming tab format) - HLS .m3u8 (#EXT-X-*) detected and played as a single stream (not expanded into segments)
  • Import playlist file… β€” copy/convert an external playlist into custom_playlists/ as extended M3U (paths resolved; stream URLs kept)
  • Open & play external playlist… β€” play a local playlist path or remote playlist URL without importing
  • Play native β€” hand the playlist file to the player (mpv --playlist= / mplayer -playlist / VLC)
  • Add path or stream URL… β€” append local files or http(s) / rtmp / rtsp / lbry / etc. streams to a custom playlist
  • Shared helpers: plreadfile, plparse*, launchplaylistfile, plimporttocustom, plopen_external
  • Changed

  • Custom playlist entries may be local files or remote stream URLs; play/export no longer drop non-file lines
  • addtocustom_playlist / remove / export use the multi-format reader
  • Version string bumped to v3.23
  • ---

    [3.22] β€” 2026-07-19

    Added

  • Multi-site search β€” Search is no longer YouTube-only. Site picker (default remains YouTube):
  • - YouTube β€” ytsearch100: (unchanged default) - YouTube Music β€” artist / album metadata - SoundCloud β€” scsearch50: - Odysee β€” LBRY Lighthouse API β†’ playable odysee.com claim URLs via yt-dlp - Dailymotion β€” site search URL - Custom site β€” user-entered yt-dlp prefix (e.g. scsearch50, nicosearch20) or URL template with {q} (URL-encoded) / {query} (raw); last custom specifier remembered in config as search_custom - (Rumble added later in 3.24)
  • Site-aware search history & cache β€” history entries store site + query so re-running a SoundCloud/Odysee search does not hit the wrong YouTube cache; menu labels show the site name
  • Search results header shows the active site; β€œSearch playlists” utility row only appears for YouTube / YouTube Music
  • Changed

  • Search result parsing uses %(webpage_url)s instead of reconstructing youtube.com/watch?v=ID, so stream/download works for any yt-dlp-supported site
  • Version string bumped to v3.22
  • ---

    [3.21] β€” 2026-07-19

    Fixed

  • mplayer argv construction β€” video modes previously built mplayer mplayer -vo aa … (binary name appended twice); no_video also briefly set -nosound (mute) before overwriting the array. Each mode now builds a single clean argv: mplayer -vo null (audio only), -vo aa, -vo caca, or plain mplayer
  • download_track always reported success β€” yt-dlp exit status was ignored and the UI always printed β€œDone!”; failures now show ✘ Download failed and return non-zero
  • download_playlist exit status β€” full-playlist downloads now report failure when yt-dlp exits non-zero (partial files noted)
  • mpv IPC JSON parsing β€” title/path extraction no longer uses a fragile regex that broke on quotes or escapes; prefers python3 JSON decode with a regex fallback
  • Download temp stamp files β€” switched from predictable /tmp/jukegramdlts_$$ paths to mktemp
  • Added

  • Full transport controls on Now Playing and Player Controls (mpv IPC):
  • - [Space] pause / resume - [←]/[β†’] seek Β±10 s, [↑]/[↓] seek Β±60 s (all video modes, not only fb_video`) - [+]/[-] volume Β±5, [m] mute toggle - Live status line: pause/play state, time-pos / duration, progress bar, volume, mute badge
  • drawplaybackstatus, mpvcyclepause, mpvaddvolume, mpvcyclemute, mpvgetprop, mpvjsondata, fmttime helpers
  • Changed

  • Shared download helper ytdownload β€” single formatβ†’flags mapping used by downloadtrack, downloadplaylist, dodlandaddplaylist, batchdownloadsearch, and playlist track selection; companion ytfindnewfile for post-download discovery
  • Player Controls screen upgraded from stop-only to the same transport keys as Now Playing
  • Version string bumped to v3.21
  • ---

    [3.20] β€” 2026-06-13

    Added

  • Kiosk exit protection β€” when a kiosk PIN is set, pressing q or Esc at the top-level main menu no longer exits the program; instead the terminal bell fires (\a) and the menu stays visible; this prevents unattended kiosks from being closed by accident or by curious users without the PIN
  • PIN-gated Quit β€” the [Q] Quit menu item now requires the kiosk PIN before exiting when a PIN is set; entering the correct PIN exits normally; an incorrect PIN cancels and returns to the main menu; both behaviours are enforced by the existing kioskcheckpin function
  • Changed

  • Version string bumped to v3.20
  • ---

    [3.12] β€” 2026-06-11

    Added

  • Batch download from search results β€” search results now support multi-select: press Space to toggle any result between unselected β—‹ and selected ● (lime); the header updates with a live ● N selected count and the hint bar gains a [D] Download N selected shortcut; pressing D opens a format picker (MP3 HQ / STD, Video 320p / 720p / 1080p, filtered by kiosk restrictions) then downloads every selected track in sequence to the current week folder with a [N/total] progress indicator and per-track βœ”/✘ result; selections are cleared after the batch completes; Enter on any result still opens the single-item action menu unchanged
  • - New batchdownload_search() function handles format selection, per-track yt-dlp calls, file detection, access logging, and the summary screen - showsearchresults inner display loop replaced with an inline version that intercepts Space and D without breaking existing Enter/q/Esc/page-key behaviour; srpicked[] array persists selection state across single-item actions; cursor position (srcursor) is preserved when returning from an action menu; both are reset on results refresh

    Fixed

  • Downloaded YouTube playlists not visible in Library β€” downloadplaylist saves tracks to MUSICDIR/YYYY/WeekNN/<playlist-title>/ (depth 3 from MUSICDIR), but browselibrary scanned only mindepth 2 -maxdepth 2, finding week-level directories only; the playlist subfolder was never listed and its files were unreachable from the Library browser; browselibrary now scans maxdepth 3 so playlist subfolders appear as their own entries alongside normal week folders; clicking one calls browse_week on that subfolder, which finds files at depth 1 within it using its existing -maxdepth 1 scan
  • "Download & add to last playlist" silently failing when no last playlist is set β€” dodlandaddplaylist (called by [P] on the now-playing screen and by the "⬇+β˜…" search results action) showed a static message and did nothing when LASTPLAYLISTFILE was empty; the downloaded file was left in the library with no playlist assignment and no path forward; the elif [[ -z "$LASTPLAYLISTFILE" ]] branch now calls addtocustomplaylist "$new_file" so a playlist picker opens immediately after the download; if the picker is dismissed the file is kept in the library but not assigned
  • Changed

  • Version string bumped to v3.12
  • ---

    [3.11] β€” 2026-06-08

    Added

  • Upload date display and logging β€” every stream and download now records when the original video was uploaded:
  • - Search results fetch %(uploaddate)s alongside existing metadata; stored in the new SRCHDATES[] parallel array - Stream actions from search results display Uploaded: YYYY-MM-DD in the now-playing screen header and write a timestamped entry to ~/.jukegramstreamlog (tab-separated: accessedtime, action, uploaddate, title, url) - download_track fetches the upload date (quick --no-download yt-dlp call) before the main download, displays it on screen, and logs the completed download; shows the date as YYYY-MM-DD with the raw YYYYMMDD value in parentheses - Bookmark and streaming playlist stream accesses are also logged (without upload date, to avoid an extra network call for every playback) - New helpers: fmtuploaddate (formats YYYYMMDD β†’ YYYY-MM-DD), fetchuploaddate (metadata-only yt-dlp call), logaccess (appends to STREAMLOGFILE) - New global STREAMLOGFILE="${MUSICDIR}/.jukegramstreamlog" and NOWPLAYINGUPLOADDATE (shown in now-playing screen when set)
  • Key B β€” quick bookmark from now-playing screen β€” pressing B (uppercase / Shift+B) while a stream is playing immediately saves it to bookmarks without opening any sub-menu; npquickbookmark reads the current URL from mpv IPC and calls bookmark_add; does nothing for local files; hint line updated to [B] β˜…Bookmark; lowercase b continues to go back as before (the old b|B combined binding is split)
  • Key P β€” auto-download + add to last playlist β€” pressing P (or p) on the now-playing screen triggers npdownloadandaddplaylist: downloads the current stream using the configured default format (CFG[dlformat]), detects the newly created file via a pre/post timestamp comparison, and appends its path to LASTPLAYLISTFILE; if no last playlist is known, it downloads only and shows a hint; hint line updated to [P] ⬇+Playlist
  • Last-playlist tracking β€” new globals LASTPLAYLISTFILE and LASTPLAYLISTNAME are set whenever a playlist is played or a track is added to one; tracked in addtocustomplaylist, manageoneplaylist (play / shuffle), spladdtoplaylist, and splmanageone (play / shuffle); used by the P key handler to know where to add a downloaded track
  • Kiosk mode β€” single stream/download option β€” when a kiosk PIN is active the action menu in showsearchresults collapses to exactly one stream quality (the configured kioskstream max: 320p, 1080p, or 480p as default) and one download option (MP3 if kioskdl=audio|all, none if kioskdl=none); previously multiple qualities were shown even in kiosk mode with only the restricted ones filtered; buildstreammenu (used by bookmarks and streaming playlists) similarly collapses to one stream quality in kiosk mode
  • Export playlists and bookmarks as mpv-compatible M3U β€” three new export functions write standard #EXTM3U / #EXTINF:-1,Title extended M3U files that mpv can open directly with mpv --playlist=<file>:
  • - exportcustomplm3u β€” exports a custom (local-file) playlist; accessible via new "⬇ Export as mpv M3U..." entry in the manageoneplaylist menu - exportbookmarksm3u β€” exports all saved bookmarks as streaming URLs; accessible via new "⬇ Export bookmarks as mpv M3U..." entry in the browsebookmarks menu - exportsplasm3u β€” exports a streaming playlist; accessible via new "⬇ Export as mpv M3U..." entry in splmanage_one alongside the existing .jkpl export

    Fixed

  • fbvideo conflicts with X11 screen flags β€” buildmpvcmd and launchplaylist previously added --screen=N or --fs-screen=all --fullscreen (X11-only mpv options) before the --vo=drm flag when videomode=fbvideo; mpv ignored or errored on these flags under DRM; both functions now skip the screen/fullscreen block entirely when the video mode is fb_video
  • fbvideo errors hidden β€” launchplayer redirected both stdout and stderr to /dev/null for all non-tty modes; DRM/KMS errors (e.g. missing video group permission, no display connector) were silently swallowed; fb_video now redirects only stdout so DRM error messages surface in the terminal for debugging
  • Changed

  • downloadtrack now accepts an optional third argument uploaddate; callers from showsearchresults pass the cached SRCH_DATES[$idx] value to avoid a redundant yt-dlp metadata call; when called without it (e.g. from the library) the function fetches the date itself
  • showsearchresults now stores SRCHDATES[$idx] in udate and passes it through to logaccess and downloadtrack; stream actions set NOWPLAYINGUPLOADDATE before calling launch_player
  • parsesearchraw resets and populates SRCHDATES[] alongside all other result arrays; both dosearch and fetchandcache yt-dlp --print format extended with a sixth %(upload_date)s field
  • manageoneplaylist menu expanded from 6 to 7 entries: "Export as mpv M3U..." inserted at index tc+4; "Delete playlist" shifts to tc+5; Back to tc+6; back/exit guard updated from tc+5 to tc+6
  • splmanage_one menu expanded from 8 to 9 entries: "Export as mpv M3U..." inserted at index tc+6; "Delete playlist" shifts to tc+7; Back to tc+8; exit guard updated from tc+7 to tc+8
  • browse_bookmarks menu now includes "⬇ Export bookmarks as mpv M3U..." as a penultimate item; back/exit guard updated accordingly
  • Now-playing hint lines updated on both the standard screen and the fb_video screen: [B] β˜…Bookmark, [P] ⬇+Playlist, lowercase [b] Back (previously [a] β˜…Add/Bookmark [b] Back)
  • Version string bumped to v3.11
  • ---

    [3.10] β€” 2026-05-28

    Added

  • Kiosk stream-quality restriction β€” new kiosk_stream config key (all / 480p / 320p); when a kiosk PIN is active and set to 480p, the 1080p stream option is hidden; when set to 320p, only 320p streaming is available; audio-only stream is always available regardless of restriction
  • Kiosk download restriction β€” new kiosk_dl config key (all / audio / none); when audio, video download options (320p/720p/1080p) are hidden and only MP3 HQ/STD remain; when none, all download options are removed from the action menu
  • Kiosk restrictions menu β€” kioskrestrictions_menu submenu accessible from Player Settings β†’ Kiosk restrictions (index 12); shows current stream and download limits with colour-coded status; configurable independently; requires a PIN to be set (attempts without a PIN show an informational message)
  • kioskactive / kioskstreamok / kioskdlok helpers β€” called at menu-build time; kioskstreamok "1080p" returns 1 (blocked) when the restriction is 480p or 320p; kioskdlok "video" returns 1 when downloads are audio or none; restrictions are only enforced when a kiosk PIN is set
  • buildstreammenu helper β€” populates smenu[] (labels) and sids[] (action IDs) with quality-filtered stream options; used by browsebookmarks and spltrack_action so restrictions apply consistently everywhere a stream quality is offered
  • Dynamic action menu in search results β€” showsearchresults now builds actmenu[] and actids[] arrays at runtime based on kiosk restrictions; replaced the fixed-index case $MENURESULT in N) block with an action-ID dispatch (case "$chosen" in s480) ...) so menu positions are stable regardless of which options are filtered out
  • ensuredirs β€” new startup function that creates MUSICDIR, CUSTOMPLDIR, STREAMPLDIR, and SEARCHCACHE_DIR if any are missing; called immediately on every launch so the script is safe to install on a fresh system with no pre-existing data directories; replaces the old single mkdir -p line
  • β˜… Bookmark on all search results β€” bookmark option is now always shown for every result (not just live streams); live results are labelled β˜… Bookmark [LIVE]; the action-menu position is stable under kiosk filtering
  • Fixed

  • Streaming playlists β€” directory not created β€” splcreate now calls mkdir -p "$STREAMPLDIR" before writing the .spl file and checks the write result; previously, if the streaming/ directory was missing (e.g. on a fresh install or upgrade), the file write failed silently and the playlist was reported as created but never existed
  • SEARCHCACHEDIR declared twice β€” moved the declaration from the search-globals block (~line 872) to the top-level path-constants block alongside MUSICDIR, CUSTOMPLDIR, and STREAMPLDIR; ensuredirs now creates the cache directory on startup so the mkdir -p in cache_save is redundant but harmless
  • Changed

  • Player Settings menu expanded from 13 to 14 entries: "Kiosk restrictions" inserted at index 12; Back shifts to 13
  • browsebookmarks play action menu rebuilt via buildstreammenu; quality options now respect kiosk_stream restriction
  • spltrackaction play action menu rebuilt via buildstreammenu; same restriction applies
  • Both browsebookmarks and spltrackaction now use action-ID dispatch instead of fixed indices so the menu is correct even when options are filtered out
  • Version string bumped to v3.10
  • ---

    [3.9] β€” 2026-05-28

    Added

  • Playlist search β€” new doplaylistsearch / showplaylistresults functions; search YouTube for playlists by keyword using the YouTube playlist-filter URL (sp=EgIQAw%3D%3D); results list shows playlist title and channel; each playlist can be downloaded in full (MP3 HQ/STD, Video 320p/720p/1080p) or streamed audio-only via mpv
  • πŸ“‹ Search playlists option in search results β€” a new "πŸ“‹ Search playlists: \<query\>" item appears between "⟳ Refresh" and "── Back ──" in showsearchresults; selected it passes the current query to doplaylistsearch
  • downloadplaylist β€” downloads every track in a YouTube playlist URL to a named subdirectory inside the current week folder (~/Music/JukeGram/YYYY/WeekNN/<playlist-title>/); output template uses %(playlist_index)s - %(title)s for proper ordering; supports all five existing format/quality options
  • urlencode_query helper β€” encodes spaces as + and escapes &, #, " for use in YouTube search URLs
  • Python3 IPC fallback β€” new mpvipc_raw unified helper replaces individual socat-only calls; tries socat first, then falls back to an inline python3 unix-socket script; this means the now-playing current-track display, track skip (Tab/Backspace), seek, and the [a] bookmark/add key all work without socat if python3 is available; socat remains the fastest path when installed
  • PLSRCHURLS, PLSRCHTITLES, PLSRCHCHANNELS, PLSRCHITEMS global arrays for playlist search results
  • Fixed

  • Bookmarks not sticking β€” bookmarkadd now calls draw_header before showing the confirmation message; waits for an explicit keypress instead of a 1-second sleep so the "β˜… Bookmarked" screen is always clearly visible; write errors (permission denied, bad path) are detected and reported rather than showing a false-positive confirmation
  • Bookmark remove corrupting entries β€” browse_bookmarks remove used grep -v "^${burl}\t" where the URL's . and ? were interpreted as regex metacharacters; replaced with awk -F'\t' -v url="$burl" '$1 != url' for exact-string field comparison
  • Search result items overflowing narrow terminals β€” parsesearchraw column widths reduced from %-52s %8s %-20s (83 chars total) to %-44s %9s %-18s (74 chars); prevents the arrowmenu selection row from wrapping on 80-column terminals; the wider duration field (%9s) also prevents misalignment for HH:MM:SS durations
  • Header rows overflowing narrow terminals β€” drawstoragerow falls back to a compact HDD [bar] used/total pct% layout when the full row would exceed the box width; drawsysinforow drops the NET segment and shows only the battery when both segments together would overflow
  • Changed

  • mpvgettitle, mpvgetpath, mpvseek, mpvplaylistnext, mpvplaylistprev all refactored to use mpvipc_raw; socat dependency removed from each function individually
  • showsearchresults back index updated from refreshidx + 1 to refreshidx + 2 to account for the new playlist-search item; playlist_idx local variable added
  • Version string bumped to v3.9
  • ---

    [3.8] β€” 2026-05-28

    Added

  • Streaming playlists ([R] in main menu) β€” new playlist type backed by .spl files stored in ~/Music/JukeGram/custom_playlists/streaming/; holds any YouTube URL, live stream URL, or direct media URL; fully independent of the local custom playlist system (which requires file paths); supports create, play in order, shuffle, add/remove tracks, and delete
  • Add from last search results β€” within the streaming playlist editor, "✚ Add from last search results" lets you pick any result from the most recent YouTube search without leaving the playlist; duplicate URLs are detected and rejected
  • Add URL manually β€” "✎ Add URL manually" prompts for a URL and a label, then appends the entry to the open streaming playlist
  • Streaming playlist export β€” "⬇ Export this playlist to file" writes a portable .jkpl file (plain text, tab-separated); default output path is ~/jukegram<name>.jkpl; file begins with #JUKEGRAMSPL_V1 header followed by #NAME:, #EXPORTED:, #COUNT:, then one url<TAB>title line per track
  • Streaming playlist import β€” "⬆ Import playlist from file..." in the Streaming Playlists menu; validates the #JUKEGRAMSPLV1 header, previews the first 5 tracks, prompts for a save name (defaulting to the embedded #NAME:), and writes the result to STREAMPLDIR; existing playlist of the same name triggers an overwrite confirmation
  • ✚ Add to streaming playlist from search results β€” new action at index 9 in the search results action menu; callable for any result (live or not); uses SRCHRAWTITLES[] for the unpadded title; duplicate detection before writing; requires at least one streaming playlist to exist (shows a hint if not)
  • spladdtoplaylist() β€” shared helper that picks a target .spl file from an arrow_menu, checks for duplicate URLs, and appends url<TAB>title; called from both the search results action and the now-playing [a] handler
  • mpvgetpath() IPC helper β€” queries mpv's path property via the IPC socket (same pattern as mpvgettitle); unescapes JSON \/ sequences so URLs are returned in their standard form; returns 1 when the socket is absent or socat is not installed
  • npaddorbookmark() β€” bookmark / add-to-playlist handler invoked from the now-playing screen; reads the current path and title from mpv IPC in real time; branches on URL vs local file: streaming URLs offer "β˜… Bookmark this stream" and "✚ Add to streaming playlist"; local files offer "✚ Add to custom playlist"; shows a clear error when IPC is unavailable instead of silently failing
  • [a] key in nowplayingscreen β€” calls npaddorbookmark(); works mid-playlist since it queries the currently playing item from mpv rather than relying on a parameter; hint line updated on both the standard screen and the fb_video screen to show [a] β˜…Add/Bookmark
  • SRCHRAWTITLES[] array β€” parallel to SRCHTITLES[] but stores the original unformatted title string (before printf '%-52s %8s %-20s' padding); populated in parsesearchraw; used when writing entries to streaming playlists so titles are clean rather than padded
  • STREAMPLDIR path constant β€” ${CUSTOMPLDIR}/streaming; created with mkdir -p at startup alongside other data directories
  • Internal helper functions: splname (reads #NAME: header or falls back to filename stem), splread (parses a .spl file into SPLAYURLS[] / SPLAYTITLES[] globals), splcreate, splmanageone, spladdfromsearch, spladdmanual, splremovetracks, spltrackaction, splexport, splimport
  • Changed

  • parsesearchraw β€” initializes and populates SRCHRAWTITLES[] alongside the existing SRCH* arrays; the reset line now includes SRCHRAWTITLES=()
  • Search results action menu expanded from 10 to 11 entries: "✚ Add to streaming playlist" inserted at index 9; for live results, the "β˜… Bookmark" entry is now at index 10 (was 9); "β—€ Back to results" is always last
  • showsearchresults β€” added cleantitle local variable populated from SRCHRAWTITLES[$idx] (falling back to the truncated formatted title); passed to spladdto_playlist as the track label
  • Main menu expanded from 12 to 13 entries: "Streaming playlists [R]" inserted at index 5 (between Custom playlists and Player controls); all subsequent indices shift by one; Quit moves to index 12
  • Version string bumped to v3.8
  • ---

    [3.7] β€” 2026-05-28

    Added

  • Stream buffering β€” buildmpvcmd now detects network-URL sources (http://, https://, rtmp://, rtmps://) and automatically injects mpv cache flags: --cache=yes, --cache-secs=N, --demuxer-max-bytes=150M, --demuxer-readahead-secs=N, --cache-pause=yes, --cache-pause-wait=5; mpv pauses briefly on cache underrun and resumes cleanly instead of glitching; buffer depth (N) comes from the new stream_buffer config key
  • Stream buffer setting β€” new entry in Player Settings (index 7, shifting Output display and below by one): choose 10 s / 30 s (default) / 60 s / 120 s; stored as streambuffer in ~/.jukegramconfig
  • Audio-only stream option β€” "β™ͺ Stream audio only (no video, best audio)" added to the search results action menu (index 3) and to the bookmarks player; uses --ytdl-format=bestaudio/best --no-video; fetches only the audio track, no window appears
  • Live stream detection β€” yt-dlp --print format extended with %(islive)s; parsesearchraw parses the fifth field into the new SRCH_LIVE[] array; live results are labelled [LIVE] in the search results list
  • Live stream bookmarks β€” when a search result is live, an additional "β˜… Bookmark this live stream" option appears at the end of the action menu; bookmarkadd() writes url<TAB>title to ~/Music/JukeGram/.jukegrambookmarks, rejecting duplicates with a notice; BOOKMARKSFILE path constant added alongside other path constants
  • Bookmarks browser (browse_bookmarks) β€” new screen listing all saved live stream bookmarks; each entry offers Stream 480p / 320p / 1080p, Stream audio only, and Remove bookmark; accessible from [B] in the main menu; empty-state message shown when no bookmarks exist
  • Main menu [B] Bookmarks entry β€” inserted at index 2 (between Library and Shuffle all); all subsequent main menu indices shift by one; [Q] Quit moves to index 11
  • apt --fix-missing retry β€” in runinstall_steps, if an apt-get install call fails, the installer automatically retries with apt-get install -y --fix-missing before counting the package as a failure; the retry is attempted once per failing package; a yellow warning message is shown when the retry triggers
  • Changed

  • dosearch and fetchandcache yt-dlp --print format updated to include %(islive)s as a fifth tab-separated field; parsesearchraw updated accordingly (reads five fields instead of four; clears SRCH_LIVE alongside other result arrays)
  • Search results action menu indices shifted: Downloads now start at index 4 (was 3); new audio-only stream at index 3; bookmark at index 9 when visible (dynamic β€” only appended for live results)
  • Player Settings menu expanded from 12 to 13 entries: Stream buffer inserted at index 7; Output display moves to 8, Overscan to 9, Audio output to 10, Kiosk PIN to 11; Back at 12
  • apt-get update errors in runinstall_steps are now treated as warnings (yellow ⚠) rather than failures, since partial updates can still allow package installs to succeed
  • Version string bumped to v3.7
  • ---

    [3.6] β€” 2026-05-26

    Added

  • TAB / Backspace track skip β€” while a shuffle or playlist is playing, Tab sends playlist-next to mpv via IPC socket and Backspace sends playlist-prev; works on macOS keyboards (handles \177 DEL, \b ^H, and \e[3~ forward-delete variants); hint line in the now-playing screen updated to [Tab] Next [Bksp] Prev [s] Stop [b] Back (keeps playing); two new IPC helpers mpvplaylistnext() and mpvplaylistprev() added alongside mpvseek
  • Storage bar in header β€” drawstorage_row() helper draws a per-row storage summary inside the header box: total/used/free from df -h / plus a 22-character block bar (β–ˆ/β–‘) coloured lime β†’ yellow β†’ red at 75 % / 90 % use; right border always aligns regardless of terminal width
  • Network & battery row in header β€” drawsysinforow() helper adds a second info row beneath the storage bar: detects the active interface via ip route get 8.8.8.8 (local routing table, no packet sent), reads RX/TX byte counters from /proc/net/dev, formats them with fmtbytes(); battery level and charge state are read from /sys/class/powersupply/BAT*/capacity and /status; battery segment is green > 40 %, yellow 20–40 %, red ≀ 20 %; row is omitted when neither battery nor network data is available
  • fmtbytes() helper β€” formats a raw byte count as B / K / M / G string; used by drawsysinfo_row
  • All-displays video output β€” "All displays β€” fullscreen spanning all monitors" option added to the Video screen picker (X11 mode only); passes --fs-screen=all --fullscreen to mpv; stored as videoscreen=all in config; handled in both buildmpvcmd and launchplaylist
  • Search result caching β€” search results for the last five saved queries are cached to ~/Music/JukeGram/.jukegramcache/<hash> on first fetch; re-selecting a history entry loads the cache instantly (⚑ indicator) instead of re-running yt-dlp (⟳ indicator); new search queries always re-fetch; a ⟳ Refresh results (re-fetch from YouTube) option in the results screen forces a fresh yt-dlp run and updates the cache; cache files for expired history entries are pruned in historyadd(); new helpers: cachekey, cacheexists, cachesave, cacheload, parsesearchraw, fetchand_cache
  • yt-dlp upgrade option β€” upgrade_ytdlp() in the Install / check dependencies menu; detects upgrade method in order: pacman (Arch), pipx upgrade β†’ pipx install fallback, pip3 install --upgrade; shows version before and after upgrade
  • Changed

  • Header border alignment fixed β€” drawheader now uses visiblelen() (ANSI-strip + char count) for all padding calculations; previously ${#tsub} over-counted by the length of embedded escape sequences when [CONSOLE MODE] badge was appended, pushing the right β•‘ border ~22 columns off; now-playing row padding changed from %-$((W-2))s (wrong for multi-byte track titles) to %s%${npad}s
  • Header β™« bar tracks current song β€” nowplayingscreen now fetches the current media title from mpv IPC before drawheader is called each tick; NOWPLAYING is updated to <playlist label> β–Ά <current track> so the β™« bar in the header follows the playing song in real time for custom playlist shuffle (and all other playlist/shuffle modes); falls back gracefully to the playlist label when socat is unavailable or IPC is not yet ready
  • stripansi() and visiblelen() helpers added (after center()); used by drawheader and drawstoragerow / drawsysinfo_row for correct column math when ANSI colour codes are present
  • Version string bumped to v3.6
  • ---

    [3.52] β€” 2026-05-25

    Added

  • fbvideo seek controls β€” when video mode is fbvideo, the now-playing screen accepts arrow key input to seek within the current track via mpv's IPC socket: β†’ +10 s, ← βˆ’10 s, ↑ +60 s, ↓ βˆ’60 s; seek hint line is shown in the UI only when fb_video is active; requires socat
  • mpvseek() IPC helper β€” sends {"command":["seek", N, "relative"]} to the mpv socket; used by the now-playing screen seek bindings
  • Changed

  • nowplayingscreen inner loop now uses readkeytimed (multi-byte escape sequence reader with timeout) instead of bare read -rsn1 -t 1; allows arrow keys to be distinguished from [ or A/B/C/D at any speed
  • ---

    [3.51] β€” 2026-05-25

    Fixed

  • cava console distortion β€” root cause was cava & running in the background while the JukeGram TUI was also writing escape sequences to the same terminal, causing both processes to interleave output and scramble the display
  • - Removed cava launch entirely from launch_player (the broken location) - Cava is now launched from nowplayingscreen only, after mpv is confirmed playing: cava & captures the PID, then wait "$CAVA_PID" blocks the shell β€” the parent is suspended so no TUI drawing occurs, giving cava exclusive terminal ownership - A watcher subshell (kill -0 poll on $MPV_PID) terminates cava automatically when the track ends, so wait returns without user interaction - After cava exits, tput rmcup + show_cursor restore any terminal state cava altered before returning to the normal now-playing status screen - Previous race condition fixed: the old watcher referenced $CAVA_PID before it was assigned; PID is now set before the watcher is forked ---

    [3.5] β€” 2026-05-25

    Added

  • Search history β€” last 5 queries persisted to ~/Music/JukeGram/.jukegramhistory (newest first, exact-match deduplicated); dosearch shows a menu of recent queries before the text prompt β€” select one to re-run it immediately, or choose "✎ New search..." to type a fresh query; on first launch with no history the text prompt appears directly as before
  • Kiosk PIN lock β€” new kiosk_pin config key (default empty = no lock); when set, selecting "Player settings" in the main menu first prompts for the PIN (read -rs β€” hidden input); incorrect PIN returns to main menu with a brief error; the main menu entry shows a πŸ”’ icon when a PIN is active; PIN management (set / change / clear) lives inside Player Settings as the last entry ("Kiosk PIN") which is reachable once already unlocked; PINs are confirmed by typing twice; empty PIN is rejected
  • Changed

  • player_settings menu expanded to 12 entries (Kiosk PIN at index 10; Back at 11)
  • Main menu [O] Player settings branch changed to kioskcheckpin && player_settings so the settings screen is gated when a PIN is set
  • ---

    [3.4] β€” 2026-05-25

    Added

  • Arch Linux support β€” installer and dependency checker now work on both Arch and Debian/Ubuntu:
  • - detectdistro() checks /etc/arch-release, /etc/debianversion, then falls back to probing for pacman / apt-get - installoneliner() produces the correct one-liner for the detected distro and console/full mode - runinstall_steps now takes the distro as its first argument; uses pacman -Sy + pacman -S --noconfirm on Arch, apt-get update + apt-get install -y on Debian - On Arch, yt-dlp is installed as a regular pacman package (it is in the official extra repo); the pipx/pip3 block is skipped entirely - The installdepsmenu header shows the detected distro name

    Changed

  • Arch package name mapping (Debian β†’ Arch): network-manager β†’ networkmanager, libcaca-utils β†’ libcaca, pipx|python3-pipx β†’ not needed (yt-dlp via pacman)
  • Global INSTALLCMDCONSOLE / INSTALLCMDFULL string constants removed; replaced by installoneliner "$distro" "$mode" calls at the point of use in installdepsmenu and check_deps
  • installdepsmenu local variable renamed from aptpkgs to pkglist to reflect distro-agnostic use
  • ---

    [3.3] β€” 2026-05-25

    Fixed / Changed

  • Audio output device selection β€” setaudio_device completely rewritten:
  • - Primary source: pactl list sinks short enumerates PulseAudio / PipeWire sinks; sinks in RUNNING state are marked ● active; sink names are prefixed with pulse/ to form the mpv device ID - Secondary source: mpv --audio-device=help covers ALSA, PipeWire-native, and any other devices mpv knows about; robust sed extractor handles both the 'name' (desc) and name desc output formats; duplicate IDs (via associative-array dedup) are skipped - Arrow-key arrow_menu is always used β€” no longer falls through to a bare text prompt when the list is short - "Enter device name manually" option added as the last selectable item before Cancel, so custom mpv device strings remain accessible - auto no longer appears twice (was captured by both the hardcoded first entry and the awk/sed pass) - New audiodevice_label helper consolidates the annotation logic ([HDMI], [Analog], [ALSA default], [PulseAudio], [PipeWire], ● active) ---

    [3.2] β€” 2026-05-25

    Added

  • DRM connector detection for console mode β€” in console mode (or when no display server is detected), the Output display setting scans /sys/class/drm/card-/status and lists only connectors whose status file reads connected; disconnected outputs are filtered out; the chosen connector name (e.g. HDMI-A-1) is stored in drmconnector config and passed as --drm-connector=<name> to mpv when using fbvideo mode
  • Overscan compensation β€” new overscan config key; options: OFF, 3%, 5%, 8%; applies --video-zoom=-0.NN to mpv so the full picture fits within the TV's visible area; available in both X11 and console/DRM modes; displayed in Player Settings with current value shown
  • Changed

  • setvideo_screen split into two code paths: console/no-display path uses sysfs DRM connector enumeration with friendly [HDMI] / [DisplayPort] / [Embedded / LVDS] annotations; X11 path keeps xrandr but no longer falls back to a hardcoded 0–3 list β€” instead shows an informational message if no monitors are detected
  • Player Settings menu entry "Video screen" renamed to "Output display" and shows drmconnector value in console mode, videoscreen value in X11 mode
  • Player Settings menu expanded from 10 to 11 entries: Overscan comp. inserted at index 8; Audio output shifts to 9; Back shifts to 10
  • ---

    [3.1] β€” 2026-05-25

    Added

  • Current track display during shuffle / playlist β€” nowplayingscreen queries the mpv IPC socket via socat to show the title of the currently-playing track beneath the playlist name; updates every ~1 second; gracefully absent if socat is not installed
  • Framebuffer video mode (fbvideo) β€” new videomode value that passes --vo=drm to mpv; renders video directly via DRM/KMS without X11; works on bare TTYs, Raspberry Pi, and headless systems; available in both normal and console mode
  • Audio normalization β€” new normalize config key (default 0); when ON, appends --af=lavfi=[loudnorm] to every mpv playback session (both launchplayer and launchplaylist) for EBU R128 loudness leveling; toggled via a new Normalize audio entry in Player Settings
  • Changed

  • nowplayingscreen replaces the static white title line with a cyan playlist label plus a lime β–Ά <track> line that updates with the current mpv media-title when IPC is available
  • Player Settings menu expanded from 9 entries to 10: Normalize audio inserted at index 4; Default download, Stream quality, Video screen, Audio output shift to 5–8; Back shifts to 9
  • ---

    [3.0] β€” 2026-05-25

    Added

  • Stream quality selection β€” search results action menu now offers three separate stream options:
  • - Stream 480p (default, SD/HD balanced) - Stream 320p (mobile / low bandwidth) - Stream 1080p (Full HD) - Quality is passed to mpv via --ytdl-format so yt-dlp fetches the correct resolution
  • Expanded download formats β€” five distinct download options replace the previous two:
  • - MP3 HQ (~320kbps VBR, --audio-quality 0) β€” highest audio quality - MP3 STD (~128kbps, --audio-quality 5) β€” smaller file, adequate for casual use - Video 320p, 720p, 1080p β€” full video downloads at each resolution, merged to MP4
  • Output device control panel (in Player Settings):
  • - Video screen β€” lists connected monitors via xrandr --listactivemonitors; selected index passed as --screen=N to mpv; falls back to offering 0–3 manually if xrandr is unavailable - Audio output β€” lists available audio devices via mpv --audio-device=help with friendly annotations ([HDMI], [Audio Jack / Analog], [PulseAudio], [PipeWire], [ALSA Default]); selected device passed as --audio-device=NAME to every mpv session; offers manual text entry if no devices are detected - Both settings stored in ~/.jukegramconfig as videoscreen and audio_device
  • Uppercase hotkeys β€” every menu item containing a [X] label pattern registers that letter as a hotkey; pressing the uppercase letter immediately selects that item without navigating with arrow keys (hotkeys are uppercase-only; lowercase letters still behave as before)
  • Stay in folder after playback β€” after playing, queueing, or adding a track to a playlist from a library week folder, the view returns to that week folder instead of dropping back to the main menu
  • Changed

  • Player Settings menu expanded from 6 entries to 9: added Stream quality, Video screen, Audio output
  • Search results action menu expanded from 5 entries to 9: 3 stream quality options + 5 download formats + back
  • arrow_menu hotkey map built at menu construction time by scanning [A-Z] patterns; Q without a registered hotkey still acts as back
  • download_track() refactored from if/else to a case statement covering all five format identifiers; mp4 and mp3 remain as backward-compatible aliases
  • buildmpvcmd and launch_playlist both inject --screen and --audio-device flags when the corresponding config values are not auto
  • CFG[dlformat] default changed from mp3 to mp3hq
  • ---

    [2.51] β€” 2026-05-24

    Added

  • Media management β€” delete tracks
  • - Library week view: βœ— Delete tracks... bulk option β€” multi-select with Space, confirmation listing all chosen files, per-file βœ”/✘ progress, then refreshes the view - Library week view: βœ— Delete file in the single-track action menu β€” confirmation before deletion, refreshes the list - Playlist editor track action: ⚠ Delete file from disk β€” permanently removes the file and simultaneously strips it from the .m3u; distinct from βœ— Remove from playlist which only edits the playlist
  • USB media migration (usbmigrate)
  • - ✚ Copy all to library in the USB music browser β€” copies every detected file to the current week folder with per-file progress - ⬆ Import selection... β€” guided 3-step flow: (1) multi-select tracks, (2) choose Copy or Move, (3) choose destination (this week or any existing library week folder) - Individual track action now offers both ✚ Copy to library and ⬆ Move to library - Move is always copy-first: source deleted only after cp succeeds; ⚠ warning shown if rm fails so the copy is never silently lost

    Changed

  • USB music browser menu expanded from 3 fixed options to 5: play all, shuffle, copy all, import selection, back
  • Playlist track action label changed from βœ— Remove to βœ— Remove from playlist for clarity alongside the new disk-delete option
  • Fixed

  • Colour contrast compliance β€” all six standard dark ANSI colours replaced with contrast-safe equivalents:
  • - cBLU \e[34m β†’ \e[38;5;75m (sky blue; dark blue is ~2:1 on black, hard WCAG fail) - cRED \e[31m β†’ \e[91m (bright red) - cGRN \e[32m β†’ \e[92m (bright green) - cYLW \e[33m β†’ \e[93m (bright yellow; \e[33m renders as olive/brown on most terminals) - cMAG \e[35m β†’ \e[95m (bright magenta) - cCYN \e[36m β†’ \e[96m (bright cyan)
  • Hint bar text changed from ${D} (dim on dark grey background, ~2.5:1) to ${cWHT} (explicit bright white, reliable across terminals)
  • Header subtitle ${D}${cPNK} on navy background dropped the D modifier β€” without dim, cPNK on BG_HDR is ~4.6:1 (AA pass); with dim it falls to ~2.8:1
  • ---

    [2.0.0] β€” 2026-05-24

    Added

  • System startup config menu ([X] in main menu, console mode only)
  • - Toggle auto-login on TTY1 via systemd getty override (/etc/systemd/system/getty@tty1.service.d/autologin.conf) - Toggle JukeGram auto-start on login via guarded block in ~/.bashrc - Both toggles are reversible from the same menu
  • Debian Sid / cross-distro package fallbacks β€” installer now accepts "pkg1|pkg2" entries and tries each alternative until one succeeds (e.g. pipx|python3-pipx)
  • pip3 fallback for yt-dlp β€” if neither pipx nor python3-pipx is available after apt, installer falls back to pip3 install --user yt-dlp
  • SCRIPT_PATH variable captures the real path of the script at launch for use by the autostart block
  • Changed

  • Installer loops over each package spec independently; a failed alternative is retried with the next name before counting as a failure
  • Main menu: [X] System startup config inserted at index 8; Install and Quit shift to 9 and 10
  • [X] menu entry is lime-green when console mode is on, dimmed with a note when off
  • ---

    [1.9.0] β€” 2026-05-23

    Added

  • Console mode toggle in Player Settings β€” disables all X11-requiring options (ffplay engine, default GPU video mode) when running on a headless system or bare TTY
  • Automatic display detection on startup: if DISPLAY / WAYLAND_DISPLAY are unset and console mode is off, JukeGram offers to enable console mode
  • Individual package installation β€” runinstall_steps installs each apt package separately so one failure does not abort the rest; shows βœ”/✘ per package with a summary
  • Console-mode installer skips ffmpeg / ffplay and shows a note explaining native format playback
  • Changed

  • _opt() helper marks X11-requiring engine and video-mode options as [X11 β€” blocked] in console mode
  • buildmpvcmd and launchplaylist both enforce console-mode substitutions (engine β†’ mpv, video mode β†’ novideo)
  • ---

    [1.8.0] β€” 2026-05-23

    Added

  • USB / Drive Manager ([U] in main menu)
  • - Lists all mountable partitions via lsblk -P (safe regex parsing, no eval) - Mount with udisksctl (no sudo) or fallback to sudo mount - Unmount with udisksctl or sudo umount - Browse music files on mounted drives; play directly or copy to current week's library folder - USB/hotplug devices highlighted with ⚑ icon - Refresh option re-scans connected drives ---

    [1.7.0] β€” 2026-05-23

    Fixed

  • Search results persistence β€” after taking any action on a search result (stream, download, or cancelling the action menu), the script returns to the same search results list instead of dropping back to the main menu
  • showsearchresults wrapped in an outer while true loop; all action branches fall through to re-display the list
  • ---

    [1.6.0] β€” 2026-05-23

    Added

  • Escape key as universal back β€” Esc behaves identically to q in every arrowmenu and multimenu, returning MENU_RESULT=-1
  • Unicode decorations throughout β€” replaced all ASCII dashes and symbols with Unicode equivalents:
  • - Separators: ── instead of -- - Icons: β–Ά ⬇ β—€ ✚ βœ— ⚠ ⟳ β™« β™ͺ ⏏ ⑃ ●
  • Separator detection in arrow_menu updated to match ──* prefix
  • ---

    [1.5.0] β€” 2026-05-23

    Added

  • Dependency installer menu ([I] in main menu)
  • - Shows per-dependency status (βœ” installed / ✘ missing) on entry - One-liner command shown for manual copy - Copy to clipboard via xclip or xsel - Uses pipx (not python3-pip) to install yt-dlp - pipx upgrade yt-dlp attempted if install reports already-installed
  • INSTALLCMDCONSOLE and INSTALLCMDFULL constants for the one-liners
  • Startup dependency check: if yt-dlp or mpv are missing, JukeGram prompts and opens the installer before proceeding; exits if still missing after install
  • ---

    [1.4.0] β€” 2026-05-23

    Added

  • Colorful TUI with ANSI 256-colour support
  • - Full colour palette: cRED cGRN cYLW cBLU cMAG cCYN cWHT cORG cPNK cTEAL cLIM - Background highlight colours: BGSEL (purple selection), BGHDR (navy header), BGNP (dark green now-playing), BGBAR, BG_HINT - Unicode box-drawing header with double-line borders (β•” ═ β•— β•‘ β•š ╝ β•  β•£) - Now-playing bar in header when music is active - Hint bar at the bottom of every menu

    Fixed

  • Color variables changed from '\e[Xm' (stores literal backslash-e) to $'\e[Xm' (stores actual ESC byte 0x1B) so they render correctly in printf "%s" and string interpolation without requiring echo -e
  • ---

    [1.3.0] β€” 2026-05-22

    Added

  • Renamed script and project from jukebox.sh to jukegram.sh / "JukeGram"
  • Visualizers
  • - cava β€” spectrum bars (launched alongside mpv; killed when mpv exits) - mpv_wave β€” waveform rendered via mpv showwaves lavfi filter - mpv_scope β€” vector scope via mpv avectorscope lavfi filter
  • ASCII / colour-ASCII video modes
  • - tty_ascii β€” mpv --vo=tty renders frames as ASCII in the terminal - cacaascii / cacavideo β€” mpv --vo=caca via libcaca ---

    [1.2.0] β€” 2026-05-22

    Added

  • Player engine selection β€” switch between mpv, mplayer, ffplay, vlc from Player Settings; choice persisted in config
  • Video / render mode selection β€” default (GPU window), novideo (audio only), ttyascii, caca_ascii
  • buildmpvcmd() helper constructs the correct command array per engine and mode
  • player_settings() submenu with console-mode guard labels on X11-requiring options
  • _opt() helper appends [X11 β€” blocked] annotation to unavailable options
  • Fixed

  • Playlist playback β€” --playlist and the file path were passed as two separate tokens through buildmpvcmd, causing mpv to treat --shuffle as the playlist filename. Fixed by building the playlist command directly in launch_playlist using --playlist=FILE as a single =-joined token
  • Playlist file deleted before mpv reads it β€” a background watcher process now waits for the mpv PID to exit before removing the temporary .m3u file
  • TUI corruption from background mpv β€” redirected all mpv output to /dev/null in non-visual modes; only tty_ascii/wave/scope modes retain stdout
  • ---

    [1.1.0] β€” 2026-05-22

    Added

  • WiFi manager ([W]) β€” launches nmtui; shows an error if NetworkManager is not installed
  • mpv IPC socket (--input-ipc-server) for future control commands
  • nowplayingscreen() β€” dedicated screen showing playback status with stop/back options; polls mpv PID with a 1-second timeout
  • player_controls() β€” always-accessible stop/status screen from the main menu entry
  • is_playing() helper; main menu entry shows [β™« PLAYING] when music is active
  • ---

    [1.0.0] β€” 2026-05-22

    Added

  • Initial release
  • YouTube search β€” yt-dlp ytsearch10: with --print for tab-separated metadata; results show title, duration, uploader
  • Download β€” MP3 (via -x --audio-format mp3) or low-quality MP4
  • Weekly library β€” tracks stored under ~/Music/JukeGram/YYYY/Week_NN/; library browser with year/week navigation
  • Shuffle all β€” mpv --playlist with --shuffle across the entire library
  • Custom playlists β€” create .m3u files; add tracks from library (multi-select), remove tracks, play or shuffle
  • Arrow key navigation β€” arrowmenu and multimenu with scrolling, Page Up/Down, Home/End
  • get_input() text prompt with cursor show/hide
  • confirm() dialog
  • Persistent config via ~/.jukegram_config (declare -A CFG serialized as key=value)
  • stopplayback(), launchplayer(), launch_playlist() playback primitives
  • Trap on EXIT INT TERM HUP to stop playback and restore cursor