{"id":13608223,"url":"https://github.com/jonniek/mpv-playlistmanager","last_synced_at":"2025-04-12T14:32:23.131Z","repository":{"id":41142614,"uuid":"61283480","full_name":"jonniek/mpv-playlistmanager","owner":"jonniek","description":"Mpv lua script to create and manage playlists","archived":false,"fork":false,"pushed_at":"2025-03-16T10:39:54.000Z","size":5948,"stargazers_count":589,"open_issues_count":7,"forks_count":42,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-16T11:29:48.572Z","etag":null,"topics":["lua","mpv","mpv-script","playlist","script"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonniek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-16T10:18:28.000Z","updated_at":"2025-03-16T10:39:57.000Z","dependencies_parsed_at":"2023-11-25T14:24:22.784Z","dependency_job_id":"5823b7ac-3a91-4241-90f0-f039b7077f56","html_url":"https://github.com/jonniek/mpv-playlistmanager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-playlistmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-playlistmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-playlistmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonniek%2Fmpv-playlistmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonniek","download_url":"https://codeload.github.com/jonniek/mpv-playlistmanager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248581304,"owners_count":21128145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","mpv","mpv-script","playlist","script"],"created_at":"2024-08-01T19:01:25.289Z","updated_at":"2025-04-12T14:32:23.125Z","avatar_url":"https://github.com/jonniek.png","language":"Lua","funding_links":[],"categories":["Lua","Playback"],"sub_categories":[],"readme":"# Mpv-Playlistmanager\nMpv lua script to create and manage playlists.\n\nThis script allows you to see and interact with your playlist in an intuitive way. The key features are removing, reordering and playing files. Additional features include resolving url titles, stripping filenames according to patterns and creating/saving/selecting/shuffling/sorting playlists.\n\nRequires mpv version 0.39.0, for a more compatible playlistmanager version see [this](https://github.com/jonniek/mpv-playlistmanager/tree/16e18949e3d604c2ffe43e95391f420227881139).\n\n![](playlistmanager.png)  \nDefault visual cues(might render differently on browsers):  \n○ default file  \n▷ playing file  \n● hovered file(for removing, playing and moving)  \n▶ playing and hovered file  \n➔ selected file(file is being moved)  \n➤ playing and selected file  \nIt will make sense once you try the script!\n\n## Installation\nCopy the `playlistmanager.lua` file to your mpv scripts directory which is usually `~/.config/mpv/scripts/` or `%APPDATA%/mpv/scripts/`. See [https://mpv.io/manual/master/#files](https://mpv.io/manual/master/#files) and [https://mpv.io/manual/master/#script-location](https://mpv.io/manual/master/#script-location) for more detailed information.\n\n## Settings\nYou can modify behaviour of the script in the settings variable in the lua file or a `playlistmanager.conf` lua-setting file in `script-opts` directory. \nNote: the conf file will override any changed setting in the lua file. There is a playlistmanager.conf file in this repo with the default values of the script for reference. \n\nYou can pass settings from the command line on startup such as `mpv --idle=once --script-opts=playlistmanager-loadfiles_on_start=yes`. \n\nYou can also change settings during runtime with a keybind or command like `KEY change-list script-opts append playlistmanager-showamount=10`. \n\nIf you are using [save-position-on-quit](https://mpv.io/manual/master/#options-save-position-on-quit) then the playlist will by default write watch later config when switching between files. There is a setting to disable this. \n\n#### Title resolving\nThis script is able to resolve titles for local files with ffprobe and urls with youtube-dl. See the `resolve_url_titles`, `resolve_local_titles`, `prefer_titles` and `youtube_dl_executable` settings for details.\n\n## Keybinds\n### Static keybindings\n- __showplaylist__(SHIFT+ENTER)\n  - Displays the current playlist and loads the dynamic keybinds for navigating  \n\n#### Functions without default keybindings\n- __openmenu__ \n  - One keybind to execute all playlistmanager functions. This is useful if you do not use the individual actions often and do not want to bind individual keys for every action.\n![](menu.png)  \n- __sortplaylist__ \n  - Sorts the current playlist with stripped values from filename(not media title, no paths, usercreated strips applied). To start playlist from start you can use a script message `KEY script-message playlistmanager sortplaylist startover`. Settings involving sort include alphanumeric sort(nonpadded numbers in order, case insensitivity), sort on mpv start and sort on file added to playlist. Sort algorithm credit [zsugabubus](https://github.com/zsugabubus/dotfiles/blob/master/.config/mpv/scripts/playlist-filtersort.lua)  \n- __shuffleplaylist__\n  - Shuffles the current playlist. Stops currently playing file and starts playlist from start of new playlist unlike native shuffle that doesn't shuffle current file.  \n- __reverseplaylist__\n  - Reverses the current playlist. Does not stop playing the current file.  \n- __loadfiles__\n  - Attempts to load all files from the currently playing files directory to the playlist keeping the order. Option to run at startup if 0 or 1 files are opened, with 0 opens files from working directory. On startup with no file requires `--idle=yes or --idle=once`.  \n- __saveplaylist__\n  - Saves the current playlist to m3u file. Saves to `mpv/playlists/` by default. Prompts for filename by default.\n- __selectplaylist__\n  - Opens a search prompt of saved playlists and loads the playlist on enter.\n\nThe above functions do not have default keybindings(except for showplaylist). There is a couple of ways to bind keys for them:\n - Edit the `playlistmanager.lua` settings\n   - Downside: you have to merge two versions if you want to update the script\n - Edit the `playlistmanager.conf` settings\n   - Upside: you can update the `playlistmanager.lua` file without losing your configurations\n - Edit `input.conf` with for example `KEY script-binding playlistmanager/showplaylist`\n   - in above example you might want to remove the default keybind of `showplaylist` or use `--no-input-default-bindings`\n\n\n### Dynamic keybindings for navigating the playlist\n- __moveup__(UP)\n- __movedown__(DOWN)\n- __movepageup__ (Page Up)\n- __movepagedown__ (Page Down)\n- __movebegin__ (Home)\n- __moveend__ (End)\n- __removefile__(Backspace)\n  - Removes the file currently selected with the cursor from the playlist\n- __playfile__(Enter)\n  - Opens the file currently selected with the cursor, if cursor on playing file, open the next file\n- __selectfile__(RIGHT or LEFT)\n  - Selects or unselects the file under the cursor\n  - When moving the cursor the selected file will follow, allowing reordering of the playlist\n- __unselectfile__(no default bind)\n  - Unselects the file under the cursor if it was selected\n- __closeplaylist__(ESC)\n\nDynamic keybinds will only work when playlist is visible. Dynamic binds cannot be defined in `input.conf`, only in `playlistmanager.lua` or `playlistmanager.conf`. There is a setting to change the binds to static ones, which allows you to define keybindings in `input.conf`.\n  \n## Script messages\n\nIn order to control the playlistmanager from other script it registers some script messages.\nThe script messages can also be invoked by keybinds `KEY script-message playlistmanager command value value2`.\n  \nList of commands, values and their effects:  \n  \nCommand | Value | Value2 | Effect\n--- | --- | --- | ---\nshow | playlist | - / duration / toggle | show for default duration, show for given seconds, toggle playlist visibility\nshow | playlist-nokeys | - / duration / toggle | same as above but don't bind dynamic keys to navigate playlist\nshow | filename | - / seconds | shows stripped filename for default or set seconds\nsort | startover | - | Sorts the playlist, any value will start playlist from start on sort\nshuffle | - | - | Shuffles the playlist\nreverse | - | - | Reverses the playlist\nloadfiles | - / path | - | Loads files from playing files dir(default), or specified path\nsave | - / filename | - | Saves the playlist\nsave-interactive  | - | - | Prompts for playlist name and saves on enter\nopen-menu  | - | - | Opens the playlistmanager menu\nselect-playlist  | - | - | Opens the saved playlist list\nplaylist-next | - | - | Plays next item in playlist (position of current file saved)\nplaylist-prev | - | - | Plays previous item in playlist (position of current file saved)\nplaylist-next-random | - | - | Jumps to a random file in the playlist\nclose | - | - | Hides the playlist if it's being rendered\n    \n    \nexamples:  \n`RIGHT playlist-next ; script-message playlistmanager show playlist` Shows the playlist after playlist-next. Note that the playlist-next is native mpv command, not the playlistmanager one.  \n`KEY show-text \"Shuffled playlist\" ; script-message playlistmanager shuffle` Text message on shuffle  \n  \n\n## My other mpv scripts\n[collection of scripts](https://github.com/jonniek/mpv-scripts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonniek%2Fmpv-playlistmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonniek%2Fmpv-playlistmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonniek%2Fmpv-playlistmanager/lists"}