commit/StationPlaylist: josephsl: SPL Assistant (6.0-dev): Removed support for older builds of Studio 5.10, plus added a command to announce name of the currently playing track.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Tue, 04 Aug 2015 23:38:34 -0000

1 new commit in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/53c063915a35/
Changeset: 53c063915a35
Branch: master
User: josephsl
Date: 2015-08-04 23:38:28+00:00
Summary: SPL Assistant (6.0-dev): Removed support for older builds of
Studio 5.10, plus added a command to announce name of the currently playing
track.

From this time forward, latest build of Stuido 5.10 wil be required. This
reduces SPL Assistant complexity.
Also added a command to announce title of the currently playing track (C). The
command is also unassigned.

Affected #: 2 files

diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index 395d7f9..af89878 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -1111,13 +1111,10 @@ class AppModule(appModuleHandler.AppModule):
return
# To prevent entering wrong gesture while the layer is
active.
self.clearGestureBindings()
+ # Project Rainbow: choose the required compatibility
layer.
self.bindGestures(self.__SPLAssistantGestures)
self.SPLAssistant = True
tones.beep(512, 10)
- # Because different builds of 5.10 have different
object placement...
- if self.SPLCurVersion >= "5.10" and not self.spl510used:
- if fg.children[5].role !=
controlTypes.ROLE_STATUSBAR:
- self.spl510used = True
except WindowsError:
return
# Translators: Input help mode message for a layer command in Station
Playlist Studio.
@@ -1129,6 +1126,7 @@ class AppModule(appModuleHandler.AppModule):
SPLSystemStatus = 1
SPLHourSelectedDuration = 3
SPLNextTrackTitle = 4
+ SPLCurrentTrackTitle = 5
SPLTemperature = 6
SPLScheduled = 7

@@ -1141,6 +1139,7 @@ class AppModule(appModuleHandler.AppModule):
SPLHourSelectedDuration:[18, 19], # In case the user selects
one or more tracks in a given hour.
SPLScheduled:[19, 20], # Time when the selected track will
begin.
SPLNextTrackTitle:[7, 8], # Name and duration of the next track
if any.
+ SPLCurrentTrackTitle:[8, 9], # Name of the currently playing
track.
SPLTemperature:[6, 7], # Temperature for the current city.
}

@@ -1153,10 +1152,7 @@ class AppModule(appModuleHandler.AppModule):
fg = api.getForegroundObject()
if not fg.windowClassName == "TStudioForm":
raise RuntimeError("Not focused in playlist
viewer")
- # Only evaluated when SPL Assistant is not invoked
first.
- if fg.children[5].role != controlTypes.ROLE_STATUSBAR:
- self.spl510used = True
- if not self.spl510used: statusObj =
self.statusObjs[infoIndex][0]
+ if not self.productVersion >= "5.10": statusObj =
self.statusObjs[infoIndex][0]
else: statusObj = self.statusObjs[infoIndex][1]
self._cachedStatusObjs[infoIndex] =
fg.children[statusObj]
return self._cachedStatusObjs[infoIndex]
@@ -1221,6 +1217,19 @@ class AppModule(appModuleHandler.AppModule):
# Translators: Input help mode message for a command in Station
Playlist Studio.
script_sayNextTrackTitle.__doc__=_("Announces title of the next track
if any")

+ def script_sayCurrentTrackTitle(self, gesture):
+ try:
+ obj = self.status(self.SPLCurrentTrackTitle).firstChild
+ # Translators: Presented when there is no information
for the current track.
+ ui.message(_("Cannot locate current track information
or no track is playing")) if obj.name is None else ui.message(obj.name)
+ except RuntimeError:
+ # Translators: Presented when current track information
is unavailable.
+ ui.message(_("Cannot find current track information"))
+ finally:
+ self.finish()
+ # Translators: Input help mode message for a command in Station
Playlist Studio.
+ script_sayCurrentTrackTitle.__doc__=_("Announces title of the next
track if any")
+
def script_sayTemperature(self, gesture):
try:
obj = self.status(self.SPLTemperature).firstChild
@@ -1344,6 +1353,7 @@ class AppModule(appModuleHandler.AppModule):
"kb:y":"sayPlaylistModified",
"kb:u":"sayUpTime",
"kb:n":"sayNextTrackTitle",
+ "kb:c":"sayCurrentTrackTitle",
"kb:w":"sayTemperature",
"kb:i":"sayListenerCount",
"kb:s":"sayScheduledTime",

diff --git a/readme.md b/readme.md
index 70a5849..4b49641 100755
--- a/readme.md
+++ b/readme.md
@@ -36,6 +36,7 @@ The following commands are not assigned by default; if you
wish to assign it, us
* Toggling track dial on or off (works properly while a track is focused; to
assign a command to this, select a track, then open NVDA's input gestures
dialog.).
* Announcing temperature.
* Announcing title of next track if scheduled.
+* Announcing title of the currently playing track.
* Marking current track for start of track time analysis.
* Performing track time analysis.
* Switch profiles.
@@ -63,6 +64,7 @@ This layer command set allows you to obtain various status on
SPL Studio, such a
The available status information are:

* A: Automation.
+* C: Title for the currently playing track.
* D: Remaining duration for the playlist.
* H: Duration of music for the current hour slot.
* Shift+H: Total duration of selected tracks for this hour slot (from the
track list, press SPACE to select or uncheck the track to play).
@@ -143,6 +145,7 @@ If you are using Studio on a touchscreen computer running
Windows 8 or later and

## Changes for 6.0-dev

+* New SPL Assistant commands, including announcing title of the currently
playing track (C).
* Ability to package favorite settings as broadcast profiles to be used during
a show and to switch to a predefined profile. See the add-on guide for details
on broadcast profiles.
* You can now ask NVDA to report total length of a range of tracks via track
time analysis feature. Press SPL Assistant, F9 to mark current track as start
marker, move to end of track range and press SPL Assistant, F10. These commands
can be reassigned so one doesn't have to invoke SPL Assistant layer to perform
track time analysis.
* Added a column search dialog (command unassigned) to find text in specific
columns such as artist or part of file name.

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:

  • » commit/StationPlaylist: josephsl: SPL Assistant (6.0-dev): Removed support for older builds of Studio 5.10, plus added a command to announce name of the currently playing track. - commits-noreply