Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playlist-Manager-SMP (Read 5766 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Playlist-Manager-SMP

Reply #75
Hi Regor,
I bypassed the relative paths error just replacing them with absolute paths (as suggested by this user), but it still fails to load, this time displaying this message:

Code: [Select]
Error: Spider Monkey Panel v1.6.1-dev+757cb073 (Playlist Manager: Playlist Manager v0.2 by XXX)
this.properties.bBOM is undefined

File: playlist_manager_list.js
Line: 1831, Column: 2
Stack trace:
  _list@playlist_manager_list.js:1831:2
  @:79:12

I tried some digging here but couldn't find anyone with the same error. Any guess?
Are you using the latest version? (from commits) Have you installed it at the right path (see installation txt file)?

Your error happens at the beginning of panel loading about a missing property on the panel, so that points to an installation problem. Try re-downloading the files.

Also SMP 1.6.0 is a broken release and I'm not supporting dev releases like 1.6.1 until it has been fixed, the SMP repository recommends to use 1.5.2 and that's what I support. Maybe that's your problem.

EDIT:  btw the user's comment you pointed to has a wrong installation path... so maybe that was also his problem. Please take a look at the installation file.

Re: Playlist-Manager-SMP

Reply #76
Ok, I downgraded SMP to 1.5.2, and I re-installed the latest version* in the -I think- right path (C:\Users\andre\AppData\Roaming\foobar2000\scripts\SMP\xxx-scripts), but the problem is still there, and nothing loads.

*Be patient, I don't really know what "from commits" means... I just downloaded the zip from here (https://github.com/regorxxx/Playlist-Manager-SMP), green button "code", "Download ZIP"

Re: Playlist-Manager-SMP

Reply #77
Ok, I downgraded SMP to 1.5.2, and I re-installed the latest version* in the -I think- right path (C:\Users\andre\AppData\Roaming\foobar2000\scripts\SMP\xxx-scripts), but the problem is still there, and nothing loads.

*Be patient, I don't really know what "from commits" means... I just downloaded the zip from here (https://github.com/regorxxx/Playlist-Manager-SMP), green button "code", "Download ZIP"
Yep the last path is right if you are using a non portable install, and that's the zip you needed. Then, did you pointed to the new path at the panel? Seems obvious, but maybe you still had the panel trying to load the previous path and thus crashing.

Is the log the same now? I'm testing it on a portable fresh install directly from github and loads fine. Also try clearing the properties at the panel in case you got someting wrong there.

Re: Playlist-Manager-SMP

Reply #78
Ok, I downgraded SMP to 1.5.2, and I re-installed the latest version* in the -I think- right path (C:\Users\andre\AppData\Roaming\foobar2000\scripts\SMP\xxx-scripts), but the problem is still there, and nothing loads.

Hi. I also waited a couple of months that the problem with relative ways is resolved with the new SMP release, but this did not happen (Win10 x64, 1607, SMP 1.5.2). For the scripts to work you will have to manually replace in each script the section that meets at the very top, from this:

Code: [Select]
include('
to this:
Code: [Select]
include(fb.ProfilePath + 'scripts\\SMP\\xxx-scripts\\
I didn't test all scripts functions yet, but i think this works.


Hi. Can you please add colour customization for buttons - for dark themes and styles? I use a high-contrast dark style in Windows, and in a Foobar the buttons in your scripts are displayed as "black font on a dark background". Or if i turn off the style, i have "white buttons on dark Foobar theme background". ::)

Re: Playlist-Manager-SMP

Reply #79
Quote
include(fb.ProfilePath + 'scripts\\SMP\\xxx-scripts\\
Yep that's the good one. Thanks
I will create a batch file to do it... since I can't continue with half the people manually changing all files on every update.

Quote
Hi. Can you please add colour customization for buttons - for dark themes and styles? I use a high-contrast dark style in Windows, and in a Foobar the buttons in your scripts are displayed as "black font on a dark background". Or if i turn off the style, i have "white buttons on dark Foobar theme background".
The buttons background are managed by windows themes, so they can not be customized within foobar but follow what you set as you note. The problem is the font color, which is harcoded to black. That's what I have to change, to use the inverted color instead of always black.

Btw, until I do so you can change it at buttons_xxx.js & buttons_panel_xxx.js
Quote
         gr.GdiDrawText(iconCalculated, this.g_font_icon, RGB(0, 0, 0), x_calc - iconWidthCalculated / 5 - textWidthCalculated / 2, y_calc, w_calc, h_calc, DT_CENTER | DT_VCENTER | DT_CALCRECT | DT_NOPREFIX); // Icon
         gr.GdiDrawText(textCalculated, this.g_font, RGB(0, 0, 0), x_calc + iconWidthCalculated, y_calc, w_calc, h_calc, DT_CENTER | DT_VCENTER | DT_CALCRECT | DT_NOPREFIX); // Text
      } else {
         let textCalculated = _isFunction(this.text) ? this.text() : this.text;
         gr.GdiDrawText(textCalculated, this.g_font, RGB(0, 0, 0), x_calc, y_calc, w_calc, h_calc, DT_CENTER | DT_VCENTER | DT_CALCRECT | DT_NOPREFIX); // Text
Change the RGB(0, 0, 0) to any other like RGB(239, 239, 239)

Re: Playlist-Manager-SMP

Reply #80
Ok. done. Decompress the entire zip into 'xxx-scripts', read instructions and run the bat file. Will work on any of my scripts and process the entire folder. Should work on future releases too.

Anyway this is a patch, as soon as you update the files it will have to be run again...

Re: Playlist-Manager-SMP

Reply #81
Hi. Can you please add colour customization for buttons - for dark themes and styles? I use a high-contrast dark style in Windows, and in a Foobar the buttons in your scripts are displayed as "black font on a dark background". Or if i turn off the style, i have "white buttons on dark Foobar theme background". ::)

Done, check latest update ;)
Readme updated (with full installation instructions). Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.
Quote
### Added
- UI: buttons' text color can now be customized via menus.

Check previous reply's script to convert relative paths to absolute paths if Spider Monkey fails loading the scripts.
https://hydrogenaud.io/index.php?topic=120979.msg1003329#msg1003329

Re: Playlist-Manager-SMP

Reply #82
Readme updated with known problems (like the SMP bug). Also added the cmd batch file (to switch paths) to the repository as workaround; no further changes. Updated not needed at all for already working installations. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Re: Playlist-Manager-SMP

Reply #83
Just pushed a new update. Optimization of remove duplicates code. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Quote
   ### Added
   ### Changed
   - Remove duplicates: optimized the code, now runs at least x2 times faster. Updated all instances where the functions were being used to call the new version (currently on AutoPlaylist cloning).
   ### Removed
   ### Fixed

Re: Playlist-Manager-SMP

Reply #84
Just pushed a new update. Added support for a new playlist format (for media servers compatibility like Kodi). Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Quote
   ### Added
   - Playlist formats: added read-only support for .strm format. Since format only allows one URL per playlist, M3U formats are preferred to create new playlists for the same purpose (which can also be read by streaming players).
   ### Changed
   - Selected playlist menu: Renamed 'Open playlist folder' to 'Show playlist file' on explorer.
   - Properties: added extensive checks to most properties.
   ### Removed
   ### Fixed
   - Autosave & Autoupdate: changing the properties via menus or properties panel could lead to values being formatted as strings instead of numbers, now disallowed at input (menus) and loading (value checking).

(*)  XSPF support will be added on next releases.

Re: Playlist-Manager-SMP

Reply #85
Just pushed a new update. Permanent console log to bypass foobar limitation of 'saving log to file' getting reset on every startup. obviously limited to the script output. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.
Quote
   ### Added
   - Helpers: added full script console logging to file at foobar profile folder ('console.log'). File is reset when reaching 5 MB. Logging is also sent to foobar2000's console (along other components logging).
   ### Changed
   ### Removed
   ### Fixed

Spoiler (click to show/hide)

Re: Playlist-Manager-SMP

Reply #86
Just pushed a new update. Fixed missing file on the previous update. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Thanks to the user who reported it!

Re: Playlist-Manager-SMP

Reply #87
Just pushed a new update. Added even more options to clone autoplaylists and for exporting playlists. Also created some presets ready to be used for foobar2000 mobile or kodi systems (see readme for usage, it has been updated), this along the ability to set format for the output playlist should allow to easily export playlists+files in one step to any device out there. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Quote
   ### Added
   - Menus: new entry to 'Clone AutoPlaylist and edit query'. Creates a clone of the selected AutoPlaylist and allows to edit the query afterwards; for easy AutoPlaylist creation using a generic query as base (instead of copying/pasting queries).
   - Export and convert: new default presets for multiple use-cases (Kodi devices, etc.). Use 'Restore defaults' at header menu to reload presets if updating from a previous version.
   ### Changed
   - Export and convert: '.\' is only added to paths when a preset is set to do so, playlist still use as paths whatever TF expression is used considering the file is along the playlist by default (relative path). Rationale: a preset can be set to either use relative paths (with or without '.\' at start) by default or edited to prepend an absolute path via Title Formatting. For ex: '.\%title%.mp3' and '%title%.mp3' are equivalent in practice. While 'MusicHDD:\music\%artist%\%album%\%track% - %title%.mp3' will use absolute path on playlist file (and tracks will have to be copied to such device and path for later use). This greatly simplifies exporting playlist to devices like Kodi in one step (without further manual path editing), since playlists require absolute paths and are usually stored in a different folder and disk than the music files.
   - Export and convert: presets can have their own playlist extension, selected playlist will be converted to that format -if required- on exporting. Note converting from M3U to PLS format involves discarding part of their metadata (tags, etc.).
   - Export and convert: presets can have a name instead of showing the TF expression. Name is set at header menu. This is only cosmetic, to easily identify them.
   - Helpers: additional checks at json loading on all scripts. Warnings via popup when a corrupted file is found.
   ### Removed
   ### Fixed

Re: Playlist-Manager-SMP

Reply #88
Pushed a new update. Added full .xspf playlist support (*) along some general file reading improvements to max compatibility with other software and SO's. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Quote
   ### Added
   - Playlist formats: .xspf format full compatibility (read, edit and create). Follows the complete specification: items not found don't break playlist loading (it continues with next item). If  an item is not found at the set the path, it also tries to find matches on library by query using fuzzy matching according to the playlist metadata (Title + Artist + Album + Track number or a combination of those). By default, if lock flag is not set on file, it's loaded as a locked file. Note fuzzy matching by queries may take a great amount of time on large libraries or when a lot of items are missing.
   - Blank lines: new entry to check for blank lines on playlists, although they may be allowed in some formats, some players may behave incorrectly with such playlists (for ex. with .strm files)
   ### Changed
   - When retrieving paths from M3U files, lines are trimmed (blank spaces). In other words, blank lines are simply skipped for any purpose. Other formats don't allow these "errors".
   - Editing metadata on playlists not created by the manager no longer fails neither warns about requiring loading/saving to update the format; now the playlist header is automatically rewritten and then the new metadata added. This change allows to edit metadata for almost any format while not having to rewrite playlists to the currently default format (i.e. allowing .xspf playlists to remain in their format even if the default one is .m3u8).
   ### Removed
   ### Fixed

   - While reading Playlist files, they are now split by lines using any of the possible escape sequence combinations and not only windows ones (\r\n). This should allow to correctly read any playlist file created in any SO (no longer limited to Windows ecosystem).
   - Crash after manual refreshing a playlist with less items than the number of rows.

.xspf (XML Shareable Playlist Format ):  https://en.wikipedia.org/wiki/XML_Shareable_Playlist_Format
Quote
Traditionally playlists have been composed of file paths that pointed to individual titles. This allowed a playlist to be played locally on one machine or shared if the listed file paths were URLs accessible to more than one machine (e.g., on the Web). XSPF's meta-data rich open format has permitted a new kind of playlist sharing called content resolution.

A simple form of content resolution is the localisation of a playlist based on metadata. An XSPF-compliant content resolver will open XSPF playlists and search a catalog for every title with <creator>, <album> and <title> tags, then localise the playlist to reference the available matching tracks
In other words, query matching... so playlists may be shared as is among different users and libraries and still find matches (no matter the physical media structure). Note this is different to autoplaylists, since the latter looks for any track satisfying an arbitrary condition (GENRE IS ROCK), while the former specifically looks for tracks (U2 - One) which may be present or not on the library. An XSPF playlist will never output more tracks than those written on the playlist (contrary to an autoplaylist which allows duplicates and has no fixed size). (*)

There is an example playlist on the repo, attached here too. Put it on the playlist tracked folder and load it, it will try to find matches on your library. It's a collection of 800 tracks from the 90s so it should easily find at least some of them.

(*) Someone may notice I have explicitly disabled XSPF to be used as 'saving' format, such playlists need to be created manually first with a text editor or another player. Then items can be added with SHIFT+L. Button, metatada edited, etc.. I will change this after enough testing.
(**) This is obviosly similar to 'Import track list' tool at Playlist-Tools-SMP, but XSPF being an XML playlist also allows metadata and paths to work as an standard playlist too. It's also universally supported by other players (mostly Unix).

 
SimplePortal 1.0.0 RC1 © 2008-2021