mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-15 19:35:07 +00:00
Stop playlist at end (with optional loop setting for multi-file playlists)
This commit is contained in:
parent
9a0ea78be3
commit
5016e9d102
@ -479,6 +479,9 @@ class SyncplayClient(object):
|
||||
def changeToPlaylistIndex(self, *args, **kwargs):
|
||||
self.playlist.changeToPlaylistIndex(*args, **kwargs)
|
||||
|
||||
def isPlaylistLoopingEnabled(self):
|
||||
return self._config["loopAtEndOfPlaylist"]
|
||||
|
||||
def __executePrivacySettings(self, filename, size):
|
||||
if self._config['filenamePrivacyMode'] == PRIVACY_SENDHASHED_MODE:
|
||||
filename = utils.hashFilename(filename)
|
||||
@ -1485,8 +1488,6 @@ class SyncplayPlaylist():
|
||||
return
|
||||
if self._thereIsNextPlaylistIndex():
|
||||
self.switchToNewPlaylistIndex(self._nextPlaylistIndex(), resetPosition=True)
|
||||
else:
|
||||
self._client.rewindFile()
|
||||
|
||||
def _updateUndoPlaylistBuffer(self, newPlaylist, newRoom):
|
||||
if self._playlistBufferIsFromOldRoom(newRoom):
|
||||
@ -1513,6 +1514,8 @@ class SyncplayPlaylist():
|
||||
return False
|
||||
elif len(self._playlist) == 1:
|
||||
return False
|
||||
elif self._playlistIsAtEnd():
|
||||
return self._client.isPlaylistLoopingEnabled()
|
||||
else:
|
||||
return True
|
||||
|
||||
|
@ -35,6 +35,7 @@ class ConfigurationGetter(object):
|
||||
"perPlayerArguments": None,
|
||||
"mediaSearchDirectories": None,
|
||||
"sharedPlaylistEnabled": True,
|
||||
"loopAtEndOfPlaylist": False,
|
||||
"file": None,
|
||||
"playerArgs": [],
|
||||
"playerClass": None,
|
||||
@ -105,7 +106,8 @@ class ConfigurationGetter(object):
|
||||
"showSameRoomOSD",
|
||||
"showNonControllerOSD",
|
||||
"showDurationNotification",
|
||||
"sharedPlaylistEnabled"
|
||||
"sharedPlaylistEnabled",
|
||||
"loopAtEndOfPlaylist"
|
||||
]
|
||||
self._tristate = [
|
||||
"checkForUpdatesAutomatically",
|
||||
@ -136,7 +138,8 @@ class ConfigurationGetter(object):
|
||||
"filesizePrivacyMode", "unpauseAction",
|
||||
"pauseOnLeave", "readyAtStart", "autoplayMinUsers",
|
||||
"autoplayInitialState", "mediaSearchDirectories",
|
||||
"sharedPlaylistEnabled", "playerCommandDelay"],
|
||||
"sharedPlaylistEnabled", "playerCommandDelay",
|
||||
"loopAtEndOfPlaylist"],
|
||||
"gui": ["showOSD", "showOSDWarnings", "showSlowdownOSD",
|
||||
"showDifferentRoomOSD", "showSameRoomOSD",
|
||||
"showNonControllerOSD", "showDurationNotification"],
|
||||
|
Loading…
Reference in New Issue
Block a user