Git Product home page Git Product logo

regorxxx / playlist-manager-smp Goto Github PK

View Code? Open in Web Editor NEW
51.0 2.0 5.0 1.52 GB

A playlist manager for foobar2000, using Spider Monkey, to save and load (auto)playlists on demand, synchronizing, ... along many more utilities.

Home Page: https://regorxxx.github.io/foobar2000-SMP.github.io/scripts/playlist-manager-smp/

License: GNU Affero General Public License v3.0

JavaScript 98.35% Batchfile 1.65%
foobar2000 foobar2000-component foobar2000-theme playlist-manager foobar2000-smp-script m3u8 m3u m3u8-playlist m3u-playlist pls-playlist-files

playlist-manager-smp's Introduction

Playlist-Manager-SMP

version CodeFactor CodacyBadge GitHub
A playlist manager for foobar2000 and Spider Monkey Panel to save and load (auto)playlists on demand, synchronizing, ... along many more utilities.

Features

plm2

  • Manages Playlist files and AutoPlaylists.
    • Playlist files are linked to physical files (.m3u8, .m3u, .pls, .xspf, .xsp or .fpl).
    • UI-only playlists can also be managed without a physical file.
    • AutoPlaylists are saved into json format.
    • Works with shareable playlists (.xspf) and Kodi-like smart playlists (.xsp).
    • All playlist are loaded in cache once, filtering just changes the "painted" playlist on the list.
    • Paths within the playlist may be absolute or relative to a folder (configurable).
    • Apply actions on batch to multiple playlists at once.
    • Merge the content of different playlists and load them all into one with a few clicks.
    • Remove duplicated tracks by TF and RegExp on loading.
  • AutoPlaylists: contains all functionality on Auto-playlist Manager by marc2003 plus more.
    • Create, rename, delete AutoPlaylists.
    • Edit query, sort pattern and sort forcing.
    • Adds tooltip info, UI features, filters, etc.
    • Number of tracks output is updated at foobar startup. (and/or 'at manual refresh')
    • Queries and sort patterns are checked for validity before using them, instead of crashing.
  • Smart Playlists: contains all functionality found on XBMC or Kodi:
    • Use XBMC or Kodi playlists within foobar seamlessly.
    • Multiple exporting options.
    • Allow to limit the number of tracks output by a query.
    • Allows to use other playlists as source (even AutoPlaylists) via queries.
    • Have the same advanced UI features than AutoPlaylists.

plm4

  • Input search box with RegExp and track searching support. Also quick-searching by chars (like album list).
  • ListenBrainz integration: sync user's playlists, import by playlist's MBID; track content resolution by Title, Recording MBID, ...
  • Spotify integration: sync user's playlists to ListenBrainz and Spotify at the same time.
  • Loads .m3u8, .m3u and .pls playlists x100 times faster than standard foobar (if all items are on library). i.e. "As fast as the native format".
  • Auto-saves changes within foobar to bound playlists files. (configurable)
  • Automatically updates changes within the tracked folder. (configurable)
  • New updates are delayed when performing internal updates/processing to avoid conflicts.
  • Multiple exporting options: directly compatible with Foobar2000 mobile, Kodi and XBMC systems, etc.
    • Copy playlist file to location.
    • Export playlist file along its tracks.
    • Export playlist file and convert its tracks to another format (using Foobar2000 converter presets).
    • Also work on multiple selected playlists on batch.
  • Bind playlist to physical files:
    • Tracks playlists for changes and update bound files.
    • Auto-saving (configurable).
    • Deleting the file also ask to delete the bound playlist.
    • Renaming the files also renames the bound playlist.
    • Show bound playlist (becomes active playlist).
  • Lock/unlock playlists (so they are read-only).
    • Automatically locking of native foobar playlists files (.fpl). (configurable)
    • When locked, playlists can not be updated nor edited. They can be deleted.
    • Filename can be changed, but not playlist name (inside the file). This allows to set different playlist and file names if required.
  • Playlist unique IDs. You can have multiple playlists with same name on the UI and bound to different files. (configurable)
    • Changing UUIDs config while having playlists already loaded, will defer UUID refresh until next update.
    • New UUID can also be forced just by renaming the files.
  • Show playlist size on the panel. (some limits apply for .fpl playlist files 1) (configurable)
    • All (refresh AutoPlaylists queries)
    • Only standard playlist
    • No size
  • If you choose not to refresh AutoPlaylists sizes, then the first calculated size gets used: when imported from json or creating the AutoPlaylist.
  • Playlist Tags and actions:
    • Playlists may be tagged with 'bAutoLoad', 'bAutoLock' or a custom set of tags (for arbitrary purposes).
    • Auto-Functions: automatically applies some actions whenever a playlist is loaded on the panel according to the tags present on it.
      • 'bAutoLoad' makes the playlist to be loaded within foobar automatically (on the UI). Meant to be used on remote servers with online controllers.
      • 'bAutoLock' locks the playlist as soon as it's loaded on the panel.
  • Track Auto-tagging: add tag values automatically to any track added on playlist.
    • Can be configured separately for standard playlists, Autoplaylists, locked playlists and individual playlists.
    • Standard playlists may be used to easily tag your library just by sending them to the right playlist (which don't need to be loaded at all).
    • Autoplaylists Auto-tagging allows to automatically (and periodically) apply some tagging logic to the current library following some condition.
    • Multiple playlists may be used as pools, using a final Autoplaylist which checks for an specific added tag (by other playlists -aka pools-).
    • Allows multiple inputs:
      • TF expressions (or %tags%).
      • JavaScript functions (defined at 'helpers_xxx_utils.js').
      • Value (string or number).
  • Tooltips show different playlist info:
    • Header with filters, categories and total number of playlists.
    • Gives a warning when tracks from current selection are already on the playlist file (duplicates).
    • Playlists:
      • Name plus UUID.
      • Playlist size (tracks). Also for AutoPlaylists (the number of tracks output by the query).
      • Category / Tag(s).
      • Track Tag(s).
      • Status (lock).
      • Query. Sort Pattern. (AutoPlaylists) Output limit. (Smart Playlists)
  • Filters:
    • Show All | Only Autoplaylists & Smart Playlists | Only standard Playlists
    • Show All | Not locked | Only locked
    • Upladed | Not uploaded to ListenBrainz
    • By extension
    • By tag
    • By category
  • Sorting:
    • Manually
    • Pinned Playlists (to be used with the other sorting modes)
    • Name: Az | Za
    • Size: Ascd. | Desc.
    • Category: Az | Za
    • Tags (first one): Az | Za
    • Creation Date: Ascd. | Desc.
    • Last Modified Date: Az | Za
  • UUIDs: added to the name, so they are separated from non tracked playlist by name when loaded in foobar. Some also allow some level of names duplication.
    • Invisible Unicode chars plus (*)
    • (a-f)
    • (*)
    • Or none
  • Category filters: playlist may be filtered by category (like virtual folders), multiple selection allowed in a menu.
    • When lists are being filtered by category, an indicator is shown in the header text.
  • Additional tools for playlists:
    • Check -on demand- for dead items on playlists files (without having to load them on foobar!). 2
    • Check -on demand- for duplicate items on playlists files (without having to load them on foobar!). 3
      • Before adding new tracks to a playlist file, duplicates may be filtered from selected tracks on real time.
    • Check -on demand- for playlists with mixed relative and absolute paths.
    • Check -on demand- for playlists with items not present on library. 4
    • Check -on demand- for playlists with blank lines.
  • 4 different writable formats. (some limits apply for .pls playlist files 5) (configurable)
  • Filter (configurable) and sorting gets saved between reloads.
  • RecycleBin: deleting and restoring.
    • Uses timestamps to uniquely identify files: no collisions with other files within the RecycleBin.
  • A backup of the previous playlist json file is created every time the panel is loaded. Old backups are sent to recycle bin.
  • Properties descriptions change according to things set on the panel, not just the values. i.e. if you change the sort method, then the description reflects the associated states dynamically.
  • UI:
    • UI resizable on the fly.
    • UI elements can be selectivel enabled or disabled.
    • Customizable columns with playlist's metadata (for size, etc)
    • Fully configurable mouse shortcuts.
    • Selection indicators.
    • Now playing and loaded playlist indicators.
    • Empty / not empty playlist indicators. To be used as fallback when size is not shown.
    • Font Size (configurable).
    • Separators between different names/categories (configurable).
    • Ready to use presets. Also specific ones for Color Blindness (deuteranopia) and Grey Scale
    • Scrollbar and drag n' drop.
    • Icons for different playlists types (configurable). Can also be hidden.
    • Colors for different playlists types, status, text, background and selection (configurable).
  • Shortcuts: modifiers allow to directly apply different actions on playlists. See manual.
  • Wine - Unix - non IE SOs compatible: all the UI, tools, popups, configuration and external helpers have been carefully designed to work in all systems without requiring IE installation, HTML popups or editing the panel properties. Scripts are expected to work 100% the same in any SO.
  • Other scripts integration:
    • Playlist-Tools-SMP: Pools may use tracks from playlists files tracked by the manager, not requiring to have playlists loaded within foobar. i.e. Random Pools component-like playlist creation, using not only queries as sources, but also other playlists or playlists files.
    • ajquery-xxx: Online controller fully compatible with the manager, allows to browse playlist files, load, edit them, etc.
    • SMP Dynamic menus: playlist actions are also available as main menu entries -if enabled-, which allows to bind them to keyboard shortcuts, toolbar buttons or executing them using command line.

plm3

Current limitations

.fpl playlists (native format) are read only and can not be auto-saved since the format is closed source and there are no methods on Spider Monkey Panel to save them on a path (without showing the 'save as' window), neither load them as handle lists (without loading on playlist tabs, for example to update the track count).
Whenever that changes, I will add full support for .fpl, and end pre-release state.

Tracking playlists within a network drive requires additional steps to make use of the Recycle Bin. See Readme (pdf).

Also integrates

  1. Menu-Framework-SMP: Helper which allows to easily create customizable and dynamic menus.

Requirements

  1. Spider Monkey Panel: Component required to install this javaScript addon.

Installation

See Readme (pdf), _TIPS and INSTALLATION (txt) and the Wiki. Not properly following the installation instructions will result in scripts not working as intended. Please don't report errors before checking this.

Documentation

Full documentation notes can be found at the PDF Manual.

Nightly releases

Automatic package built from GitHub (using the latest commit).

Footnotes

  1. .fpl playlists are non writable, but size and other data (UUID, category, lock status or tags) may be cached between sessions as soon as it's set for the first time.

  2. also recognizes streams (http and https) and skips them.

  3. also recognizes subsongs from a same physical file (for example iso files).

  4. also recognizes relative paths on playlists (with or without .) when trying to match files against the library.

  5. .pls playlists format doesn't allow extra data like UUID, category, lock status or tags, ... use .m3u or .m3u8 for full data support.

playlist-manager-smp's People

Contributors

regorxxx avatar sonofevil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

playlist-manager-smp's Issues

Filter bar at top

Mimic library viewer filter bar, and replace the current header with that.

Playlist folder button, configuration button #34 and a state button (which should show the current header tooltip) must be rearranged.

Support relative paths from playlist file to media files

I use fb2k to manage a music collection on my NAS. The library is mounted as a network drive (Z:\) on the machine. Consequently, playlists created by SMP contain that letter in their %path%. As my Playlist folder is in the same folder as my music library, I would prefer them to be relative to the playlist file location. For example:

Playlist file: 
   Z:\Music\Playlists\example-playlist.m3u8

Containing the following absolute path:
   Z:\Music\Albums\Rock\Artist - Album\01. Track.mp3

Desired relative path
   ..\Albums\Rock\Artist - Album\01. Track.mp3

A simple way would be to make the TitleFormat strings used in savePlaylist available as a configuration parameter. That way, they can be used e.g. in VLC on Android to play back their contents on many different devices.

Currently, I have simply modified the following line in helpers_xxx.js, function savePlaylist to the same effect:

let tfo = fb.TitleFormat('#EXTINF:%_length_seconds%,%artist% - %title%$crlf()' + '$replace(%path%,Z:\\Music,..)');

capitalizeFirstLetter is not defined

After updating to the latest release there and it gives this error.

Error: Spider Monkey Panel v1.4.1 (Playlist Generation Menu: Playlist Generation Menu by xxx)
capitalizeFirstLetter is not defined

File: playlist_tools_menu.js
Line: 244, Column: 9
Stack trace:
  condFunc/</<@playlist_tools_menu.js:244:9
  condFunc/<@playlist_tools_menu.js:242:42
  condFunc@playlist_tools_menu.js:233:17
  _menu/this.btn_up/<@menu_xxx.js:159:11
  _menu/this.btn_up@menu_xxx.js:157:12
  newButtons.menuButton<@<main>:56:8
  SimpleButton/this.onClick@buttons_xxx.js:134:31
  on_mouse_lbtn_up@buttons_xxx.js:211:17

UI for settings

I've just installed this and finding it impossible to set this up without a UI.

The menu just disappears and you have to start all over again to go through the menu.

Probably a huge undertaking to do.

Drag n drop: tracks

Add selected tracks to selected playlist file using drag n drop (instead of keyboard modifiers).

Requires new SMP version.

[BUG] "Playlist generation failed" when removing all tracks from playlist

Describe the bug
Today I synced the scripts with Github, and now whenever I remove all tracks from a playlist, a few seconds later it throws the "playlist generation failed" error (see screenshot).

Otherwise everything works as expected. The file is in reality updated just fine.

Might be related to my other issue, not sure. But UUIDs for playlist names is disabled. It's reproducible on a new SMP panel. Bug probably was introduced between June 6 and now.

To Reproduce
Steps to reproduce the behavior:

  1. Create an empty playlist called "test".
  2. Add some tracks to it.
  3. Remove all the tracks from it.
  4. Wait for error.

Expected behavior
No error.

Screenshots
Screenshot_20230617_182022

Desktop (please complete the following information):

  • OS: EndeavourOS & Wine 8.9-1
  • Browser: Wine browser
  • Version: Latest Github clone

[FEATURE] Manual sorting

Is your feature request related to a problem? Please describe.
Current sorting options are fully automatized and don't allow user customization.

Describe the solution you'd like
Manual sorting of playlist files with drag n drop support. New playlists should be added to the bottom.

Describe alternatives you've considered
Playlist pinning.

Additional context
manual

[FEATURE] Pinned playlists

Is your feature request related to a problem? Please describe.
Manual sorting is not yet possible.

Describe the solution you'd like
A simple way to make managing a large number of playlists easier might be to allow pinning selected playlists to the top of the list. This could make operations like frequent moving of files from temporary to permanent (i.e. how long a playlist is used before it is deleted) playlists easier. Implementation seems straightforward for physical playlists. I don't know if there is a good way to implement this for UI-only playlists. But as a physical-only feature it could still be quite helpful.

Describe alternatives you've considered
Creating a category for playlists one might otherwise want to pin, and then switching categories (or filtering) as needed. However, this is very inconvenient for the use case described above.

Another alternative would be to utilize tags. Create a "_pinned" tag and then select sorting by tags. Problem: This currently makes it impossible to use other sorting schemes at the same time. Same goes for using name prefixes and then sorting by name. By contrast, a pinning feature could take priority over the selected sorting scheme, such that pinned and unpinned playlists are first separated in the UI and then sorted separately.

[BUG] Shortcuts don't seem to work in Wine

Describe the bug
Perhaps I do not understand how shortcuts are supposed to work, but none of the shortcuts seem to do anything. In particular I am trying to assign cycling through categories to shift+left click on header. But if I shift-click on the header buttons, they just behave as if I had clicked normally.

To Reproduce
Steps to reproduce the behavior:

  1. Have at least 2 categories assigned to different playlists.
  2. Go to UI -> Shortcuts -> Left click (header) -> Shift
  3. Click on "Cycle categories"
  4. Shift+left click on any part of the header.
  5. The result is the same as without shift.

Expected behavior
The playlist manager cycles through the categories.

Desktop (please complete the following information):

  • OS: EndeavourOS
  • Browser: IE8 (in Wine)
  • Version: v0.5.0-beta.20

Additional context
EndeavourOS is Arch-Linux-based. I am using Foobar2000 v2.0 installed from AUR with Wine 8.7-1 and SMP v1.6.1.

Multiple selection

Multiple playlist selection to apply left click actions: export, set tags, etc.

Design idea:

  • Middle click.
  • Click on icon (when shown).

Playlist highlighting behaving erratically

Sometimes UI does not not jump properly to highlighted playlist on quicksearch, show current/active playlist, etc.

Replace mouse wheel simulation with a single jump.

[BUG] Folder names with regex characters like `[` cause issues

Describe the bug
Folder names aren't escaped before using them in a regular expression in getRelPath() in helpers_xxx_playlists_files.js, leading to obvious issues when folders contain special regex-like characters such as [.

The resulting behavior differs depending on how the folder is parsed in the reg exp. For me, the file paths in the produced playlist M3U files were broken.

Suggested fix
Just a quick fix for this:

function getRelPath(itemPath, relPathSplit) {
	let cache = '';
	relPathSplit.forEach((folder) => {
		const folderEscaped = escapeRegExp(folder);
		const level = new RegExp(folderEscaped + '\\\\', 'i');
		cache = itemPath.replace(level, '');
		if (itemPath === cache) {itemPath = '..\\' + cache;}
		else {itemPath = cache;}
	});
	if (!itemPath.startsWith('..\\')) {itemPath = '.\\' + itemPath;}
	return itemPath;
}

function escapeRegExp(string) {
    return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}

Accessibility: playlist icons

Change playlist icons with different icons according to playlist type. It should allow playlist identification even without color codes or tooltip info.

[BUG] Playlists from selection are empty - "Index out of bounds"

Describe the bug
Any new playlist created from selected tracks via drag & drop or menu is empty and accompanied by console errors like this:

[10:23:56 PM] Playlist Manager: Error adding tracks to playlist. Index (118) out of bounds. (sendSelectionToPlaylist)

118 seems to be the number of playlists I have. Looks like it's too many for the script to handle, though it doesn't prevent me from creating playlists, they are just empty for some reason. I can still subsequently add tracks manually.

I know that's a lot of playlists, and that may make it a somewhat rare use case, but it's not just unused junk, they are actually all part of how I manage my music library. But I'm considering ways to reduce the number.

To Reproduce
Steps to reproduce the behavior:

  1. Have 118 playlists.
  2. Select some tracks.
  3. In the playlist menu click "Create new playlist from selection..."
  4. Observe new playlist being empty and error in console.log.

Expected behavior
New playlist contains the selected tracks.

Desktop (please complete the following information):

  • OS: EndeavourOS & Wine 8.9-1
  • Browser: Wine browser
  • Version: Latest Github clone

helpers_xxx_flags.js is gone

Hi, I think a file was lost after update to the lastest..

Error: Spider Monkey Panel v1.6.0 (Playlist Manager: Playlist Manager v0.5.0 by XXX)
include failed:
include failed:
Path does not point to a valid file: helpers_xxx_flags.js

File: buttons_panel_xxx.js
Line: 6, Column: 1
Stack trace:
@buttons_panel_xxx.js:6:1
@playlist_manager.js:13:1

after update to the latest plm

regards :-)

This lock is owned by a different component

I tried to unlock a selection of playlists after figuring that bit out and entered RenamePlaylist but I got this error below.

I thought when it imported them from foo_plorg it would create its own db.

My profile\playlist_manager folder is empty, and only zip files reside in the backup folder. Should the profile\playlist_manager folder not contain something. I tried to move the contents of the zip folder in there but I can't unlock them even though I set the playlist folder to yours after copying the files into that folder.

SetPlaylistLockedActions failed:
This lock is owned by a different component

File: playlist_manager_menu.js
Line: 881, Column: 50
Stack trace:
  func/<@playlist_manager_menu.js:881:50
  func@playlist_manager_menu.js:874:17
  _menu/this.btn_up/<@menu_xxx.js:408:15
  _menu/this.btn_up@menu_xxx.js:398:24
  _list/this.playlistMenu@playlist_manager_list.js:1831:37
  _list/this.executeAction@playlist_manager_list.js:1943:94
  _list/this.rbtn_up@playlist_manager_list.js:1273:11
  @main.js:546:23
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30

'''

Multi-selection merge load

reupen/columns_ui#176

The way I imagine it, selecting a folder would show all of its sub-playlists appended. Or I could ctrl+click, shift+click to select multiple playlists/folders to show their merged content.

YouTube Support

Describe the feature
Implement YouTube links for tracks not found on library for the different playlists retrieved from ListenBrainz user playlists.

Additional context
Finally managed to scrape youtube without API, so it should be pretty easy. Optional setting.

[BUG] Unable to create new playlists, fails with error

Describe the bug
Earlier today I didn't have this issue, but after syncing with Github, attempting to create new playlists (whether by drag & drop or by "New playlist file" option), I always get this error on my existing PM-SMPanel:

Playlist generation failed while writing file:
Z:\home\lutra\.foobar2000\profile\playlist_manager\ddd.m3u8

Trace:
add(bEmpty: true, name: Selection from Facet sele…, bShowPopups: true, bInputName: true)

savePlaylist(playlistIndex: -1, playlistPath: Z:\home\lutra\.foobar2000\profile\playlist_manager\ddd.m3u8, ext: .m3u8, playlistName: ddd, useUUID: null, category: Current, tags: , relPath: , bBom: false)

When I try to reproduce this on a fresh SMPanel, it actually crashes the whole panel with this error:

Error: Spider Monkey Panel v1.6.1 ({CEA9F5C1-831A-4B90-9C21-26F9C1892D53}: Playlist Manager v0.5.0-beta21 by XXX)
entry[1] is undefined

File: helpers_xxx_prototypes.js
Line: 111, Column: 1
Stack trace:
  toStr/<@helpers_xxx_prototypes.js:111:1
  toStr@helpers_xxx_prototypes.js:103:55
  _list/this.init/this.add@playlist_manager_list.js:3634:330
  func@playlist_manager_menu.js:905:71
  _menu/this.btn_up/<@menu_xxx.js:399:15
  _menu/this.btn_up@menu_xxx.js:389:24
  func@playlist_manager_list.js:4524:122
  _list/this.lbtn_up@playlist_manager_list.js:1179:14
  @playlist_manager.js:443:9
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30

Other playlist operations are working normally. Permissions on the playlist folder are unchanged.

To Reproduce
Steps to reproduce the behavior:

  1. Click the "+" button and select "New playlist file...".
  2. Enter any name for the playlist into the popup & click OK.
  3. Observe error and absence of new playlist.

Expected behavior
A new playlist with the selected tracks is created.

Desktop (please complete the following information):

  • OS: EndeavourOS & Wine 8.9-1
  • Browser: Wine browser
  • Version: Latest Github clone

Additional context
Console log:

[4:33:48 PM] savePlaylist(): invalid sources (-1, false)
[4:33:48 PM] Playlist generation failed while writing file:
[4:33:48 PM] Z:\home\lutra\.foobar2000\profile\playlist_manager\www.m3u8
[4:33:48 PM] Trace:
[4:33:48 PM] add(bEmpty: true, name: , bShowPopups: true, bInputName: true)
[4:33:48 PM] savePlaylist(playlistIndex: -1, playlistPath: Z:\home\lutra\.foobar2000\profile\playlist_manager\www.m3u8, ext: .m3u8, playlistName: www, useUUID: null, category: Current, tags: , relPath: , bBom: false)
[4:34:29 PM] savePlaylist(): invalid sources (-1, false)
[4:34:29 PM] Playlist generation failed while writing file:
[4:34:29 PM] Z:\home\lutra\.foobar2000\profile\playlist_manager\25g.m3u8
[4:34:29 PM] Trace:
[4:34:29 PM] add(bEmpty: true, name: , bShowPopups: true, bInputName: true)
[4:34:29 PM] savePlaylist(playlistIndex: -1, playlistPath: Z:\home\lutra\.foobar2000\profile\playlist_manager\25g.m3u8, ext: .m3u8, playlistName: 25g, useUUID: null, category: Current, tags: , relPath: , bBom: false)
[4:36:15 PM] savePlaylist(): invalid sources (-1, false)
[4:36:15 PM] Playlist generation failed while writing file:
[4:36:15 PM] Z:\home\lutra\.foobar2000\profile\playlist_manager\ttt.m3u8
[4:36:15 PM] Trace:
[4:36:15 PM] add(bEmpty: true, name: Selection from GZA, Genius, bShowPopups: true, bInputName: true)
[4:36:15 PM] savePlaylist(playlistIndex: -1, playlistPath: Z:\home\lutra\.foobar2000\profile\playlist_manager\ttt.m3u8, ext: .m3u8, playlistName: ttt, useUUID: null, category: Current, tags: , relPath: , bBom: false)

And for the new panel:

[4:52:16 PM] Playlist manager: reading files from "Z:\home\lutra\.foobar2000\profile\playlist_manager\"
[4:52:16 PM] Spider Monkey Panel v1.6.1: profiler ({CEA9F5C1-831A-4B90-9C21-26F9C1892D53}: loadPlaylistsFromFolder): 250ms
[4:52:16 PM] precacheLibraryPaths: using paths from another instance. {CEA9F5C1-831A-4B90-9C21-26F9C1892D53}
[4:52:38 PM] savePlaylist(): invalid sources (-1, false)
[4:52:38 PM] Playlist generation failed while writing file:
[4:52:38 PM] Z:\home\lutra\.foobar2000\profile\playlist_manager\req.m3u8
[4:52:38 PM] Trace:
[4:52:38 PM] add(bEmpty: true, name: , bShowPopups: true, bInputName: true)
[4:52:38 PM] savePlaylist(playlistIndex: -1, playlistPath: Z:\home\lutra\.foobar2000\profile\playlist_manager\req.m3u8, ext: .m3u8, playlistName: req, useUUID: null, category: Current, tags: , relPath: , bBom: false)

[FEATURE] New playlist from selection

Is your feature request related to a problem? Please describe.
I honestly thought this feature was previously present, but maybe my memory is playing tricks on me. Anyway, I frequently create new playlists from selected tracks. In the default playlist manager, this can easily be done by dragging the tracks into the playlist manager. A new playlist will be created according to a default title formatting scheme that can be customized in the settings. PM-SMP doesn't have this.

Describe the solution you'd like
I don't necessarily need the drag-drop functionality. But it would be very useful to have an option in the list menu that acts like this. Just add the selected tracks to a new playlist and automatically generate the title (personally I'd be happy with "%album-artist% - %album%", but customization would ofc be great).

Describe alternatives you've considered
"Create new playlist file from active playlist..." takes the whole playlist and just copies its title. A "Move selection to playlist" shortcut requires that a named playlist already exists.

DrawRoundRect failed:

Completely fresh install of this. Followed the install instructions and get this error.

Is that Spider Monkey Panel v1.6.1-mod that was in SMP the cause of this?

Error: Spider Monkey Panel v1.6.1-mod ({20859B0C-D746-41AB-8B6C-65E679637FBE}: Playlist Manager v0.5.0-beta21 by XXX)
DrawRoundRect failed:
Arc argument has invalid value

File: buttons_panel_xxx.js
Line: 183, Column: 10
Stack trace:
  themedButton/this.draw@buttons_panel_xxx.js:183:10
  drawAllButtons/<@buttons_panel_xxx.js:292:30
  drawAllButtons@buttons_panel_xxx.js:290:7
  on_paint_buttn@buttons_panel_xxx.js:328:2
  @main.js:1049:3
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30

Nope, reverted back to the original and get this message now.

Error: Spider Monkey Panel v1.6.1 ({20859B0C-D746-41AB-8B6C-65E679637FBE}: Playlist Manager v0.5.0-beta21 by XXX)
DrawRoundRect failed:
Arc argument has invalid value

File: buttons_panel_xxx.js
Line: 183, Column: 10
Stack trace:
  themedButton/this.draw@buttons_panel_xxx.js:183:10
  drawAllButtons/<@buttons_panel_xxx.js:292:30
  drawAllButtons@buttons_panel_xxx.js:290:7
  on_paint_buttn@buttons_panel_xxx.js:328:2
  @main.js:1049:3
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30

Toolbar buttons are initially invisible on a dark panel theme

If background is set to black and text to white in Foobar2000's default UI settings, and a new SMP panel with Playlist Manager is created, the toolbar buttons at the bottom are initially invisible. This is affected by the "UI" -> "Button Toolbar..." setting:

Okay, I created a new panel to check the behavior, and they actually start invisible (presumably black on black). But then when I change the setting, and afterwards return it to default, they remain visible. So the problem is permanently resolved for a given panel after changing the setting once.

Originally posted by @sonofevil in #40 (comment)

This behavior was observed on Linux with Wine 8.7-1

[BUG] Playlist generation failed, playlist file disappeared

Describe the bug
I've been getting this error when adding or removing tracks from a playlist:

Playlist generation failed while writing file 'Z:\home\lutra.foobar2000\profile\playlist_manager[Q] Queue.m3u8'.

When I check the playlist folder, the file is inexplicably gone. This has happened multiple times with two different playlists. Both playlists have the [ ] characters in the name, so maybe that's a cause, but maybe it's just coincidence cos those are the only playlists I edit a lot.

When I select "update playlist file" it unsurprisingly tells me

Playlist file does not exist: [Q] Queue
Path: Z:\home\lutra.foobar2000\profile\playlist_manager[Q] Queue.m3u8

"Clone as..." and "Copy playlist file to..." options do nothing, so they can't be used to restore the file.

When I restart Foobar, the playlist is gone from the UI as well.

To Reproduce
Steps to reproduce the behavior:

  1. Add or remove tracks from a playlist with [ ] in the name.
  2. Wait for auto-saving or select "Update playlist file"

Expected behavior
Playlist file is updated according to the UI playlist.

Desktop (please complete the following information):

  • Operating System: EndeavourOS & Wine 8.7-1
  • Kernel Version: 6.1.30-1-lts (64-bit)
  • Browser: IE8 Wine
  • Version: git clone about 8 hrs ago

Left click activate / Right click menu on selected

Can this be possible to allow a left click to load the playlist?

Currently, the double left click is buggy and doesn't load the playlist most of the time. As far as I can see the RMB does nothing so can it be mapped to show the menu? Pretty sure this is better UIX.

Missing font: wingdings 2

Hi, this repeat several times in console log. I think, playlist manager is the url.
I resettet my font-cache, restarded and reinstalled wingdings 2 from resource-directory, but it still persits.

Console.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.