Difference between revisions of "ISDBSongList::UpdateAll"

From MediaMonkey Wiki
Jump to: navigation, search
 
m
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
===Method description===
 
===Method description===
  
For all tracks in the list updates DB entries, i.e. writes any modifications back to DB. Also all tags are updated accordingly, but only if the option is turned on if Options dialog (by default it is).
+
Updates database entries for all tracks in the list, i.e. writes any modifications back to DB. Also all tags are updated accordingly, ''but only if the option is turned on in the Options dialog (by default it is)''.
 +
 
 +
This (using UpdateAll on a SDBSongList object), is prefered over using the UpdateDB and WriteTags methods on a SDBSongList object, because it takes into account the user's preferences.
 +
 
 +
===Example code===                   
 +
<source lang="vb">
 +
' Track refers to a SDBSongData Object for which you want to save changes to the database AND the file's tags (if set in the options)
 +
Dim SL : Set SL = SDB.NewSongList
 +
SL.Add Track
 +
SL.UpdateAll
 +
 
 +
' This is prefered over:
 +
'Track.UpdateDB
 +
'Track.WriteTags          ' The user might not always want this!
 +
</source>
 +
 
 +
=== Related Topics ===
 +
 
 +
*[[ISDBSongData::UpdateDB]]
 +
*[[ISDBSongData::WriteTags]]
  
 
[[Category:Scripting|{{PAGENAME}}]]
 
[[Category:Scripting|{{PAGENAME}}]]

Latest revision as of 21:04, 11 October 2011

CoClass SDBSongList, Interface ISDBSongList

Sub UpdateAll


Method description

Updates database entries for all tracks in the list, i.e. writes any modifications back to DB. Also all tags are updated accordingly, but only if the option is turned on in the Options dialog (by default it is).

This (using UpdateAll on a SDBSongList object), is prefered over using the UpdateDB and WriteTags methods on a SDBSongList object, because it takes into account the user's preferences.

Example code

' Track refers to a SDBSongData Object for which you want to save changes to the database AND the file's tags (if set in the options)
Dim SL : Set SL = SDB.NewSongList
SL.Add Track
SL.UpdateAll

' This is prefered over:
'Track.UpdateDB
'Track.WriteTags           ' The user might not always want this!

Related Topics