commit/StationPlaylist: 2 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Wed, 05 Aug 2015 17:40:36 -0000

2 new commits in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/2286b4219a53/
Changeset: 2286b4219a53
Branch: None
User: josephsl
Date: 2015-08-05 17:20:48+00:00
Summary: Encoder hive (6.0-dev): Move set* functions to the new set_flags
function in SAM Encoders.

Now that flags function is here, functions such as _set_FocusToStudio is now
deprecated. The functions themselves are retained for backward compatibility
and will be removed later except for background monitor function which will
continue to return the monitor thread pool. Same will be done for SPL Encoders
later.

Affected #: 1 file

diff --git a/addon/globalPlugins/SPLStudioUtils/encoders.py
b/addon/globalPlugins/SPLStudioUtils/encoders.py
index be2addd..efaa1f1 100755
--- a/addon/globalPlugins/SPLStudioUtils/encoders.py
+++ b/addon/globalPlugins/SPLStudioUtils/encoders.py
@@ -381,29 +381,13 @@ class SAMEncoder(Encoder):
# These will be kept in 6.0 for backwards compatibility.

def _set_FocusToStudio(self):
- #self._set_Flags(self.getEncoderId(), self.focusToStudio,
SPLFocusToStudio, "FocusToStudio")
- SAMIdentifier = " ".join([self.encoderType,
str(self.IAccessibleChildID)])
- if self.focusToStudio and not SAMIdentifier in SPLFocusToStudio:
- SPLFocusToStudio.add(SAMIdentifier)
- elif not self.focusToStudio and SAMIdentifier in
SPLFocusToStudio:
- SPLFocusToStudio.remove(SAMIdentifier)
- streamLabels["FocusToStudio"] = list(SPLFocusToStudio)
+ self._set_Flags(self.getEncoderId(), self.focusToStudio,
SPLFocusToStudio, "FocusToStudio")

def setPlayAfterConnecting(self):
- #self._set_Flags(self.getEncoderId(), self.playAfterConnecting,
SPLPlayAfterConnecting, "PlayAfterConnecting")
- SAMIdentifier = " ".join([self.encoderType,
str(self.IAccessibleChildID)])
- if self.playAfterConnecting and not SAMIdentifier in
SPLPlayAfterConnecting:
- SPLPlayAfterConnecting.add(SAMIdentifier)
- elif not self.playAfterConnecting and SAMIdentifier in
SPLPlayAfterConnecting:
- SPLPlayAfterConnecting.remove(SAMIdentifier)
+ self._set_Flags(self.getEncoderId(), self.playAfterConnecting,
SPLPlayAfterConnecting, "PlayAfterConnecting")

def setBackgroundMonitor(self):
- #self._set_Flags(self.getEncoderId(), self.backgroundMonitor,
SPLBackgroundMonitor, "BackgroundMonitor")
- SAMIdentifier = " ".join([self.encoderType,
str(self.IAccessibleChildID)])
- if self.backgroundMonitor and not SAMIdentifier in
SPLBackgroundMonitor:
- SPLBackgroundMonitor.add(SAMIdentifier)
- elif not self.backgroundMonitor and SAMIdentifier in
SPLBackgroundMonitor:
- SPLBackgroundMonitor.remove(SAMIdentifier)
+ self._set_Flags(self.getEncoderId(), self.backgroundMonitor,
SPLBackgroundMonitor, "BackgroundMonitor")
return SAMMonitorThreads




https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/0c0b2035e5a4/
Changeset: 0c0b2035e5a4
Branch: 6.0/encoderHive
User: josephsl
Date: 2015-08-05 17:40:09+00:00
Summary: Encoder hive (6.0-dev): Encoder settings are now saved across
sessions.

Now that flags function is working, save the flags to the stream labels file
(at some point, rename this file). Also, before saving settings, make sure the
flag set isn't empty, and if it is, just forget about it.
This will be available in 6.0 and completes work on encoder hive, a suggestion
from a broadcaster.

Affected #: 1 file

diff --git a/addon/globalPlugins/SPLStudioUtils/encoders.py
b/addon/globalPlugins/SPLStudioUtils/encoders.py
index efaa1f1..166f245 100755
--- a/addon/globalPlugins/SPLStudioUtils/encoders.py
+++ b/addon/globalPlugins/SPLStudioUtils/encoders.py
@@ -146,7 +146,10 @@ class Encoder(IAccessible):
flagMap.add(encoderId)
elif not flag and encoderId in flagMap:
flagMap.remove(encoderId)
- streamLabels[flagKey] = list(flagMap)
+ # No need to store an empty flag map.
+ if len(flagMap): streamLabels[flagKey] = list(flagMap)
+ else: del streamLabels[flagKey]
+ streamLabels.write()

# Now the flag configuration scripts.
# Project Rainbow: a new way to configure these will be created.

Repository URL: https://bitbucket.org/nvdaaddonteam/stationplaylist/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

Other related posts: