View Issue Details

IDProjectCategoryView StatusLast Update
0006016MMW v4Framework: Scripts/Extensionspublic2010-11-10 22:50
Reporterpeke Assigned To 
PriorityhighSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Target Version3.2.3Fixed in Version3.2.3 
Summary0006016: Player.StopAfterCurrent Property GET/LET is missing
DescriptionHotkey is available but it can't be read by scripts.

It would be nice to have isStopAfterCurrent Property GET/LET is Boolean available in http://www.mediamonkey.com/wiki/index.php/SDBPlayer
TagsNo tags attached.
Fixed in build1301

Relationships

related to 0002964 closedpetr Add 'Stop after current' command 

Activities

Ludek

2009-10-05 11:28

developer   ~0019056

I would rather call it just Player.StopAfterCurrent GET/LET property?

Ludek

2009-10-06 13:53

developer   ~0019087

Last edited: 2009-10-06 14:43

Added in build 1272.

peke

2009-10-21 01:59

developer   ~0019257

Verified 1276

zvezdan

2010-07-26 18:57

updater   ~0020379

I think this doesn't work, I just tried with 3.2.0.1294. Playback continues after the current track when I set it to True and even more with:
SDB.Player.StopAfterCurrent = True
MsgBox SDB.Player.StopAfterCurrent

I got message box saying False.

Ludek

2010-07-27 12:17

developer   ~0020381

Zvezdan, could this be only a test error?

I have just tested 3.2.0.1294 by using following script and works fine for me:
------------------------------------------------------------
Option Explicit
 
Dim UI : Set UI = SDB.UI
 
Sub OnStartUp()
    Dim mnuTest
 
    Set mnuTest = SDB.UI.AddMenuItem(SDB.UI.Menu_Play, 0, 0)
    mnuTest.Caption = SDB.Localize("Stop After Current2")
    mnuTest.OnClickFunc = "SDBOnClick"
    mnuTest.UseScript = Script.ScriptPath
End Sub
 
Sub SDBOnClick(Item)
  if SDB.Player.StopAfterCurrent = False Then
    MsgBox( "Disabled")
  End If
  SDB.Player.StopAfterCurrent = True
  if SDB.Player.StopAfterCurrent = True Then
    MsgBox( "Enabled")
  End If
End Sub

zvezdan

2010-07-27 19:13

updater   ~0020387

Sorry, I suppose it is my fault since I had something like this:
SDB.Player.Play
SDB.Player.StopAfterCurrent = True

It seems fine if I use:
SDB.Player.Play
SDB.ProcessMessages
SDB.Tools.Sleep 10
SDB.Player.StopAfterCurrent = True

peke

2010-07-27 20:07

developer   ~0020388

Just to clarify SDB.Player.StopAfterCurrent value is reset to false each time when playback state is changed (except after Pause/UnPause) on current track.

Example:
'true
SDB.Player.Play
SDB.Player.StopAfterCurrent = True
MsgBox( "Enabled")

'false
SDB.Player.Stop
SDB.Player.StopAfterCurrent = True
SDB.Player.Play
MsgBox( "Disabled")

peke

2010-10-13 23:04

developer   ~0020756

Verified 1315

I also updated Wiki with example.

zvezdan

2010-10-14 08:23

updater   ~0020762

Well, I don't know about 1315 build, but with 1294 your example is not working correctly - you need to use some delay between Play and StopAfterCurrent as I explained:

Option Explicit
 
Sub OnStartUp()
    Dim mnuTest
 
    Set mnuTest = SDB.UI.AddMenuItem(SDB.UI.Menu_Play, 0, 0)
    mnuTest.Caption = SDB.Localize("Play and Stop After Current without Delay")
    mnuTest.OnClickFunc = "SDBOnClick1"
    mnuTest.UseScript = Script.ScriptPath

    Set mnuTest = SDB.UI.AddMenuItem(SDB.UI.Menu_Play, 0, 0)
    mnuTest.Caption = SDB.Localize("Play and Stop After Current with Delay")
    mnuTest.OnClickFunc = "SDBOnClick2"
    mnuTest.UseScript = Script.ScriptPath
End Sub
 
Sub SDBOnClick1(Item)
    SDB.Player.Play
    SDB.Player.StopAfterCurrent = True
End Sub

Sub SDBOnClick2(Item)
    SDB.Player.Play
    SDB.ProcessMessages
    SDB.Tools.Sleep 10
    SDB.Player.StopAfterCurrent = True
End Sub

With the first option the next track will play after the current one, but with the second option the playback will stop after the current track.

Ludek

2010-10-14 11:20

developer   ~0020765

Last edited: 2010-10-14 12:27

Zvezdan, you are right, I can reproduce with your script on both 3.2 and 4.0 versions.

Fixed in version 3.2.3 and 4.0.0.1317

peke

2010-11-10 22:50

developer   ~0021299

Verified 3.2.3.1301