diff --git a/BuildMMIP.cmd b/BuildMMIP.cmd
index 01228da..7f212fc 100644
--- a/BuildMMIP.cmd
+++ b/BuildMMIP.cmd
@@ -1,6 +1,6 @@
del ExportITunesXML.mmip
zip ExportITunesXML.mmip App.ico Install.ini Uninstall.ini ExportITunesXML.vbs
-copy ExportITunesXML.mmip ExportITunesXML_v1.6.3.mmip
+copy ExportITunesXML.mmip ExportITunesXML_v1.6.4.mmip
diff --git a/ExportITunesXML.vbs b/ExportITunesXML.vbs
index b4a7391..025069f 100644
--- a/ExportITunesXML.vbs
+++ b/ExportITunesXML.vbs
@@ -20,12 +20,13 @@
' - correctly handle playlists with duplicate names
' - export using same sort order as MediaMonkey
' - export parent before children (as per iTunes behaviour)
-' 1.6.3 reorder xml fields to (better) match iTunes format
-' add Persistent ID for compatibility with Serato DJ
-' add Grouping in export
-' add dummy Library Persistent ID to the header for compatibility with Pioneer Recordbox DJ
-' mark playlists that have sub-playlists as 'folder' (for compatibility with Pioneer Recordbox DJ)
-' add "Play Date" (timestamp in numeric format) in addition to the "Play Date UTC"
+' 1.6.3 reorder xml fields to (better) match iTunes format
+' add Persistent ID for compatibility with Serato DJ
+' add Grouping in export
+' add dummy Library Persistent ID to the header for compatibility with Pioneer Recordbox DJ
+' mark playlists that have sub-playlists as 'folder' (for compatibility with Pioneer Recordbox DJ)
+' add "Play Date" (timestamp in numeric format) in addition to the "Play Date UTC"
+' 1.6.4 add feature/option to exclude the playlist section in the generated xml file
option explicit ' report undefined variables, ...
@@ -325,6 +326,45 @@ function cleanFilename(byVal myFilename)
End Function
+' Getter for the configured NoPlaylistExport boolean
+function getNoPlaylistExport()
+ dim myIni
+ dim myValue
+ dim myBool
+
+ set myIni = SDB.IniFile
+ myValue = cleanFilename(myIni.StringValue("ExportITunesXML","NoPlaylistExport"))
+
+ ' parse ini value to boolean; use default if not defined as 0/1
+ if myValue = "0" then
+ myBool = False
+ elseif myValue = "1" then
+ myBool = True
+ else
+ myBool = getDefaultNoPlaylistExport()
+ end if
+
+ getNoPlaylistExport = myBool
+end function
+'
+' Setter for the configured ExportAtShutdown boolean
+sub setNoPlaylistExport(byVal myBool)
+ dim myIni
+ set myIni = SDB.IniFile
+
+ if myBool then
+ myIni.StringValue("ExportITunesXML","NoPlaylistExport") = "1"
+ else
+ myIni.StringValue("ExportITunesXML","NoPlaylistExport") = "0"
+ end if
+end sub
+'
+function getDefaultNoPlaylistExport()
+ getDefaultNoPlaylistExport = False
+end function
+
+
+
' N must be numberic. Return value is N converted to a string, padded with
' a single "0" if N has only one digit.
function LdgZ(ByVal N)
@@ -636,7 +676,7 @@ sub Export
' are not converted into iTunes auto-playlists. A consequence of this is that
' e.g. randomized or size-limited playlists will contain a static snapshot taken
' at export time.
- if playlistCount > 0 and not Progress.Terminate and not Script.Terminate then
+ if playlistCount > 0 and getNoPlaylistExport() = False and not Progress.Terminate and not Script.Terminate then
fout.WriteLine " Playlists"
fout.WriteLine " "
@@ -828,6 +868,21 @@ Sub InitSheet(Sheet)
edt.common.Enabled = False ' not yet implemented >> deactivate this control
'
y = y + 25
+
+ Set edt = ui.NewCheckBox(GroupBox0)
+ edt.Common.SetRect 20, y-3, 20, 20
+ edt.Common.ControlName = "EITX_NoPlaylistExport"
+ edt.Checked = getNoPlaylistExport()
+ edt.common.Enabled = True
+ '
+ Set edt = ui.NewLabel(GroupBox0)
+ edt.Common.SetRect 40, y, 100, 20
+ edt.Caption = "Exclude export of Playlists"
+ edt.Autosize = False
+ edt.Common.Hint = "If option is set the iTunes library xml will only contain the tracks; the playlists will be excluded. " & _
+ "Default is off."
+ '
+ y = y + 25
End Sub
@@ -838,4 +893,6 @@ Sub SaveSheet(Sheet)
'
setFilename(Sheet.Common.ChildControl("EITX_Filename").Text)
setDirectory(Sheet.Common.ChildControl("EITX_Directory").Text)
+ '
+ setNoPlaylistExport(Sheet.Common.ChildControl("EITX_NoPlaylistExport").Checked)
End Sub
\ No newline at end of file
diff --git a/Install.ini b/Install.ini
index 08a7de4..23fb448 100644
--- a/Install.ini
+++ b/Install.ini
@@ -4,7 +4,7 @@ Title=ExportITunesXML
Description=Export playlists to iTunes Library XML format
VersionMajor=1
VersionMinor=6
-VersionRelease=3
+VersionRelease=4
VersionBuild=0
Type=script
UpdateURL=https://raw.githubusercontent.com/fvdpol/MM-ExportITunesLibraryXml/master/ExportITunesXML.xml
diff --git a/README.md b/README.md
index 9e6a763..e19ba63 100644
--- a/README.md
+++ b/README.md
@@ -45,12 +45,13 @@ A number of settings that were initially harcoded / configured in the script can
Navigate to Tools menu -> Options, and open the "Export to iTunes XML configuration dialog within the Library section.
-| Setting | Description |
-|---------|-------------|
+| Setting | Description |
+|--------------------|-------------|
| Export at Shutdown | If option is set the iTunes library xml will be exported when MediaMonkey is closed.
Default is off.|
-| Periodic Export | If option is set the iTunes library xml will be exported every 60 minutes.
Default is off.|
-| Filename | The file name for the exported iTunes Music Library XML file.
If blank/empty the default value of `iTunes Music Library.xml` will be used.|
-| Directory | The directory where the iTunes Music Library XML file will be stored.
If blank/empty this will be initialised to the default location. On Windows 10 this is typically the `%APPDATA%\MediaMonkey` directory. |
+| Periodic Export | If option is set the iTunes library xml will be exported every 60 minutes.
Default is off.|
+| Filename | The file name for the exported iTunes Music Library XML file.
If blank/empty the default value of `iTunes Music Library.xml` will be used.|
+| Directory | The directory where the iTunes Music Library XML file will be stored.
If blank/empty this will be initialised to the default location. On Windows 10 this is typically the `%APPDATA%\MediaMonkey` directory. |
+| Exclude export of Playlists | If option is set the iTunes library xml will only contain the tracks; the playlists will be excluded.
Default is off.|
Note: Serato expects the xml file to be available in the original location where iTunes stores the file, which is typically in `C: \Users\{user}\Music\iTunes`
@@ -86,6 +87,11 @@ Note that Native Instruments Traktor is known to ignore / filter-out playlists t
## Version History
+### Version 1.6.4
+_in progress_
+- add feature/option to exclude the playlist section in the generated xml file
+
+
### Version 1.6.3
_Released on November 16, 2018_
- reorder xml fields to (better) match iTunes format