[SOLVED] How to set Played #

Get answers about using the current release of MediaMonkey for Windows.

Moderator: Gurus

dtsig
Posts: 3035
Joined: Mon Jan 24, 2011 6:34 pm

[SOLVED] How to set Played #

Post by dtsig » Thu Jul 11, 2019 1:37 pm

Is there a way to set the column Played without playing
Where's the db and ini stored
Reporting Bugs
Where tags are stored

Not affiliated with MediaMonkey ... just a RABID user/lover
DTSig

Peke
Posts: 12472
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: How to set Played

Post by Peke » Thu Jul 11, 2019 4:15 pm

Hi,
By Script.

Do you want one?
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

dtsig
Posts: 3035
Joined: Mon Jan 24, 2011 6:34 pm

Re: How to set Played

Post by dtsig » Thu Jul 11, 2019 6:06 pm

if you have a script that would do it i would greatly appreciate it
Where's the db and ini stored
Reporting Bugs
Where tags are stored

Not affiliated with MediaMonkey ... just a RABID user/lover
DTSig

Peke
Posts: 12472
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: How to set Played

Post by Peke » Thu Jul 11, 2019 9:23 pm

Hi,
I think I can make you one, where you will have button to Set Played to current time and increase played count by 1?
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

dtsig
Posts: 3035
Joined: Mon Jan 24, 2011 6:34 pm

Re: How to set Played

Post by dtsig » Fri Jul 12, 2019 9:55 am

that would be great
Where's the db and ini stored
Reporting Bugs
Where tags are stored

Not affiliated with MediaMonkey ... just a RABID user/lover
DTSig

PeterK

Re: How to set Played

Post by PeterK » Sat Jul 13, 2019 4:09 am

Script already exists. Check this out.
https://www.mediamonkey.com/addons/brow ... -playstat/

Peke
Posts: 12472
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: How to set Played

Post by Peke » Sun Jul 14, 2019 7:04 am

Hi,
THX, I missed that one :)

Code: Select all

'==========================================================================
'
' NAME: PlayCountScript.vbs
'
' DATE  : 14.07.2019.
'
' COMMENT: Set Desired Playcount, Save PlayCountScript.vbs to Scripts\Auto folder and restart MMW
'
'==========================================================================
Script.Reload(Script.ScriptPath)

Sub OnStartup
  Dim SPLayCount
  Set SPLayCount = SDB.UI.AddMenuItem(SDB.UI.Menu_TbAdvanced,0,0)
  SPLayCount.Caption = "Increase Play Count"
  SPLayCount.OnClickFunc = "ChangePlayCounter"
  SPLayCount.UseScript = Script.ScriptPath
  SPLayCount.IconIndex = 63
End Sub

Sub ChangePlayCounter(arg)

  Dim list, itm, i, newPlayCounter, mb, progress
  newPlayCounter = InputBox("Enter the new value for the Played field", "Modify Play Counter")
  If  newPlayCounter = "" Then
  	Exit Sub
  End If
  
  If Not IsNumeric(newPlayCounter) Then
  	mb = SDB.MessageBox("You did not enter a number. Please try again.",0,"Error")
  	Exit Sub
  ElseIf newPlayCounter < 0 Then
  	mb = SDB.MessageBox("Only positive numbers or 0 are allowed. Please try again.",0,"Error")
  	Exit Sub
    End If

  If list.count = 0 Then
  	mb = SDB.MessageBox("No songs were selected. Please select some songs and try again",0,"Error")
  	Exit Sub
  End If
  
  Set Progress = SDB.Progress
  Progress.Text = "Changing Play Counters..."
  Progress.MaxValue = list.count

  For i=0 To list.count-1
    Set itm = list.Item(i)
    'Set the Play Counter
    itm.PlayCounter = newPlayCounter
    itm.UpdateDB
    Progress.value = i+1
    If Progress.terminate Then
    	Exit For
    End if	
  Next
  
  Set Progress =  Nothing
  
End Sub
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

dtsig
Posts: 3035
Joined: Mon Jan 24, 2011 6:34 pm

Re: How to set Played

Post by dtsig » Sun Jul 14, 2019 12:41 pm

thank guys
Where's the db and ini stored
Reporting Bugs
Where tags are stored

Not affiliated with MediaMonkey ... just a RABID user/lover
DTSig

Post Reply