Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetPlaylistLockedActions blocks playback #198

Open
regorxxx opened this issue Jan 17, 2023 · 1 comment
Open

SetPlaylistLockedActions blocks playback #198

regorxxx opened this issue Jan 17, 2023 · 1 comment

Comments

@regorxxx
Copy link

regorxxx commented Jan 17, 2023

Using this method, whenever you lock a playlists (with any lock type), you can not play any of the tracks from it.


"use strict";

const lockedActions = ['AddItems','RemoveItems','ReorderItems','ReplaceItems','RenamePlaylist','RemovePlaylist','ExecuteDefaultAction',''];
function on_mouse_lbtn_up(x, y) {
    console.log(lockedActions[0] ? lockedActions[0] : 'no lock');
	plman.SetPlaylistLockedActions(plman.ActivePlaylist, lockedActions[0] ? [lockedActions[0]] : []);
    lockedActions.rotate(1);
}

Array.prototype.rotate = (function() {
	const unshift = Array.prototype.unshift, splice = Array.prototype.splice;
	return function(count) {
		const len = this.length >>> 0;
		count = count >> 0;
		unshift.apply(this, splice.call(this, count % len, len));
		return this;
	};
})();

Try it yourself, playback doesn't work except when the playlist is locked 'ExecuteDefaultAction' or no lock is used.

@regorxxx
Copy link
Author

bug3

regorxxx added a commit to regorxxx/Playlist-Manager-SMP that referenced this issue Apr 15, 2024
…nkey_panel#198) related to playback on locked playlists. It should now work fine, but the 'default action' lock can not be switched anymore. Issue #82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant