regorxxx / Playlist-Manager-SMP

A playlist manager for foobar2000, using Spider Monkey, to save and load (auto)playlists on demand, synchronizing, ... along many more utilities.
https://regorxxx.github.io/foobar2000-SMP.github.io/scripts/playlist-manager-smp/
GNU Affero General Public License v3.0
56 stars 5 forks source link

This lock is owned by a different component #52

Closed stephen147 closed 1 year ago

stephen147 commented 1 year ago

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\playlistmanager folder is empty, and only zip files reside in the backup folder. Should the _profile\playlistmanager 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

'''
regorxxx commented 1 year ago

As I said, forget the old component. This has nothing to do with it.

I don't understand what you are doing. There is no way to unlock a playlist via SMP or this script if the playlist is locked by another component.

I tried to unlock a selection of playlists after figuring that bit out and entered RenamePlaylist

Entered this? How? There is no input to change locks on this script.

regorxxx commented 1 year ago

plm

There is simply no way to edit a lock not owned by SMP, so I don't understand your steps.

regorxxx commented 1 year ago

Ok, got it. You meant the multiple selection menu. I forgot to update that one to be like the contextual menu for single playlists. So now fixed and improved.

stephen147 commented 1 year ago

So by locked. It's locked by foobar as its an auto play list?

I assumed it had something to do with the old playlist organiser seeing as all my playlists auto populated.

I tried to add them to categories but that isn't working. I take it there's no folders, just categories?

regorxxx commented 1 year ago

Playlists may be locked by foobar itself or other components, in such case nothing can edit that lock. Foobar can not edit a lock by a component, a component can not edit a lock by another component, etc.

Now how you got a playlist locked by something, that's on your side to fix. (obviously you have to unlock it using the same component)

About your other question, please read the pdf.

stephen147 commented 1 year ago

The pdf file is now opening from the toolbar button on the latest release. Thanks.

BTW, that document is impressive!! Hats off.

So, categories it is then? Unless I'm missing something?

I can't seem to add the locked folders to a category. 2023 06 30 (20-58-06)

Oh, when I right-click on a playlist, shouldn't it get selected also like how you right-click on a directory in Windows?

image

regorxxx commented 1 year ago

So, categories it is then? Unless I'm missing something? Yes. You add a category, then you can filter current view by it. It's a virtual folder. plm cat

plm cat2

Oh, when I right-click on a playlist, shouldn't it get selected also like how you right-click on a directory in Windows? There is no selection here. What you call selection is multiple selection of playlists. A single R. click on a single playlists opens a totally different menu than "selecting" it first.

I suppose you are asking to append the new playlist to the previous selection. Will check it, since that makes sense. But then the multiple selection context menu would only work -without adding new pls- when r. clicking over the current selection.

I can't seem to add the locked folders to a category.

image

They are locked xd obviously you can't edit a locked playlist file. Please read the docs... that thing is answered there and my time is limited. If there is something not explained properly, I'm fine spending time clarifying the docs or fixing it; but don't keep making questions for things I already put at the docs.

plmlock

stephen147 commented 1 year ago

Thanks. I have looked at that section. These are playlists shown, auto playlists from foo_plorg but it doesn't say in the pdf how these can be converted to work within your manager. This is basically my end goal.

regorxxx commented 1 year ago

I don't really understand your question. Foo_plorg doesn't have any type of playlist creation feature.

Also as I said, if they are locked by that component, they can not be edited by anything.

stephen147 commented 1 year ago

It does have the ability to create any type of playlist and organise them into folders, ctrl+f and put in your query and add as auto or not. That's how I've created them before.

Just really confused as to how your component has populated the old playlists into it.

Am I right in saying that any imported auto playlists from that component aren't auto playlists anymore?

regorxxx commented 1 year ago

It does have the ability to create any type of playlist and organise them into folders, ctrl+f and put in your query and add as auto or not. That's how I've created them before.

No. The playlist is NOT created by foo_plorg, that's native foobar. Other thing is the component offering you a shortcut to that native feature. It's not the same. foo_plorg does not store any type of playlist.

Just really confused as to how your component has populated the old playlists into it.

Because foo_plorg is just an organizer, not a playlist manager with capabilities to store playlists as files. The playlists have been on native foobar all the time, and any organizer can see them. They are just standard autoplaylists.

Am I right in saying that any imported auto playlists from that component aren't auto playlists anymore?

Again, those are standard auto-playlists, they are not from a component. They should work with anything. Another thing is if they are locked by foo_plorg, in such case ask for help on their thread. I don't support it. If they are locked by foobar itself, that's normal.

regorxxx commented 1 year ago

image Native foobar. As said, foo_plorg doesn't create anything.

image Any autoplaylist not created by the manager is just an standard UI playlist.

stephen147 commented 1 year ago

Thank you, I'm just dreading having to recreate 300-odd autoplaylists.

regorxxx commented 1 year ago

That's just how foobar works... anyway, I don't think the purpose of autoplaylists is creating a playlist per artist. Obviously you would face this problem at some point with that usage. If you know how to code by yourself, you could automatize it somewhat (but I'm not going to spend my time with that), just saying.

As noted here: https://hydrogenaud.io/index.php/topic,80705.msg1029648.html#msg1029648

You may ask Peter or @TheQwertiest about exposing the query of autoplaylists. That may change the situation.