mirror of https://github.com/calzoneman/sync.git
hopefully fix #366 delete causing change media
This commit is contained in:
parent
4f7e4ad65e
commit
baa8af58bc
|
@ -1,6 +1,6 @@
|
||||||
var ChannelModule = require("./module");
|
var ChannelModule = require("./module");
|
||||||
var Config = require("../config");
|
var Config = require("../config");
|
||||||
var Utilities = require ("../utilities");
|
var Utilities = require("../utilities");
|
||||||
|
|
||||||
function OptionsModule(channel) {
|
function OptionsModule(channel) {
|
||||||
ChannelModule.apply(this, arguments);
|
ChannelModule.apply(this, arguments);
|
||||||
|
|
|
@ -493,7 +493,7 @@ PlaylistModule.prototype.handleDelete = function (user, data) {
|
||||||
self.channel.activeLock.lock();
|
self.channel.activeLock.lock();
|
||||||
this.semaphore.queue(function (lock) {
|
this.semaphore.queue(function (lock) {
|
||||||
if (self._delete(data)) {
|
if (self._delete(data)) {
|
||||||
self.channel.logger.log("[playlist] " + user.name + " deleted " +
|
self.channel.logger.log("[playlist] " + user.getName() + " deleted " +
|
||||||
plitem.media.title);
|
plitem.media.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ PlaylistModule.prototype._delete = function (uid) {
|
||||||
|
|
||||||
if (self.current === item && item === next) {
|
if (self.current === item && item === next) {
|
||||||
self.current = null;
|
self.current = null;
|
||||||
} else {
|
} else if (self.current === item) {
|
||||||
self.current = next;
|
self.current = next;
|
||||||
self.startPlayback();
|
self.startPlayback();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue