Author Topic: iTunes xml export - exclude playlists and/or playlist-folders  (Read 3291 times)

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Heya,
I use MB's iTunes xml feature heavily to push a lot of playlists to Serato/Traktor.
Since I also use playlists for chronological documentation/snapshot functionality and other organizational tidbits (which I would not like to see pushed over to iTunes xml) - atm I delete the playlists folders (which I occasionally need access to in MB) from the playlist folders in MB's prior to an an itunes xml export to achieve this - and once the xml has been generated, I then copy them back in.
So for me, having an option to mark playlists/playlist-folders inside the playlist tree to be excluded from itunes export, would be grand.
Just a thought from a very specific angle ;)
Cheers.
c.

Niklas

  • Newbie
  • *
  • Posts: 2
Hey guys,
I like to push this request and also have a question:
I'm trying to get away from iTunes and love MB. But there is one crucial thing which keeps me away from this:

The itunes-XML Export feature ist great, but MB does not export the folder-structure, so playlists in traktor appear all in one hierachic level and not in folders (curcial if you have a looot of playlists for organising your DJ-sets.
Some research brought me to this: iTunes handles folders as "special playlists" with a folder-tag in front of it:
Code
<key>Playlist ID</key><integer>1234567</integer>
<key>Parent Persistent ID</key><string>xyz</string>
<key>Playlist Persistent ID</key><string>xyz</string>
<key>All Items</key><true/>
<key>Folder</key><true/>
<key>Name</key><string>NameOfTestFolder</string>
[...followed by "normal" playlist description]

In the MB-XML the folder tag is not used.
Is it realistic for the future to implement this feature?

Greetings Niklas

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Hey Niklas,
I agree this would be great to have, and there has been an attempt to do this recently, see here:
https://getmusicbee.com/forum/index.php?topic=23776.msg139072#msg139072
and here (for some more info):
https://getmusicbee.com/forum/index.php?topic=15165.msg142034#msg142034

So fingers crossed Steven at some point gives this a try again.
Churs.
c.

Niklas

  • Newbie
  • *
  • Posts: 2
Thank you Alec!

Is there any way to push that feature request? For me it's the only reason not switching to MB right now, because I really need the folder structures for my DJ Sets

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9348
Is there any way to push that feature request?
No, not really. There are a number of factors that go into Steven's deciding to add/enhance a feature. One would be how difficult it is to implement. Another would be how many +1s the request gets.

And then there's this: https://getmusicbee.com/forum/index.php?topic=11395.0
Particularly the first and last posts.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
I still have the version from Steven that generates the folder inside the itunes xml (but it doesn't populate them correctly). If you can program/script & know your way around xmls I could pass on the patched version that did grouping - you could then write a little tool to parse over the resulting xml and populate the folder with the childrens' track IDs, and it *should* work.
The 1 big downside why I haven't done this for meself - I'd be forever stuck to this one MB 3.2 patched version... so not having folders is the lesser of 2 evils for me in that case...

Churs.
c.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34346
I am prepared to implement exporting the folder structure with the playlists in the folder and files in each playlist but not exporting an artificial playlist for the folder itself. If thats not clear what I mean then let me know and also let me know whether that is useful.

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Hey Steven,
thanks a lot for considering this!

Before requesting anything / having an opinion on this, and to fully understand as to what you are willing to implement - isn't what you are proposing exactly the same as we had on the patched version you posted on "Reply #6 on: 14-01-2018, 09:37:56" ( https://getmusicbee.com/forum/index.php?topic=23776.msg139052#msg139052 )  ?

I'm asking as that did show some quite erratic behaviour in software consuming said xml. Which, as I tried to show, based on how iTunes does populate it's own xml here:
https://getmusicbee.com/forum/index.php?topic=23776.msg139072#msg139072
would also require the parent folder (=playlist - as essentially itunes 'seems' to be built upon a concept of cascading playlist where each parent 'folder is essentially a playlist in itself and has to hold all trackIDs of each child playlist...) to be populated correctly.
Whereas that step is not something you are prepared to look into ?

If that is the case, this would need to be a 'hidden' option (?), as that would create unusable iTunes xml altogether if that were the default.
If I could access this as an option though, I could then look into writing a python script to repopulate the parent playlists in the xml with the children track IDs. But not sure how I would maintain that script and pass on to other people as it would rely on a similarly set up python env & execution of scripts, which might be a much to ask of the normal user...
Just thinking out aloud for now.
Churs.
c.

frankz

  • Sr. Member
  • ****
  • Posts: 3876
Side note, alec.tron - you can (probably) use something like this to turn python scripts into windows exe's that don't require a python  installation and then (probably) convert this exe to a dll like this. Never done it, but I've heard of it being done.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34346
http://musicbee.niblseed.com/V3_2/MusicBee32_Patched.zip

i think there was a bug with the older version that didnt export all folders as playlists.
This version should address that but as mentioned the actual contents of the folder playlist will be an empty array. I cant see why that would matter to any software importing the file.
You have noted in the past the large amount of time it takes MB when it exits - generating this xml file is the primary reason for that and playlist export is the main reason for that slowness

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Heya,
I have a working prototype that changes the Musicbee generated itunes xml syntax so organizational folders do show in Serato & Rekordbox. This will take me another few free evenings to tidy this up, wrap it into some qt gui, and test around with .exe generation for redistribution.

One bug/issue I came across though.
When writing out the xml, and if you have any nested folders in MB's playlist panel, MusicBee does not write <key>Parent Persistent ID</key> for nested folders into the itunes xml at all. It's 100% reproducable for me.

TO reproduce:
Create folder, then another folder inside, then a playlist, and the middle folder in thos example will not have a parent set in the xml.

See
<key>Name</key><string>Test_NestedFolder</string>
block in here:
Code
		<dict>
<key>Playlist ID</key><integer>35786</integer>
<key>Playlist Persistent ID</key><string>51D46ED300000000</string>
<key>All Items</key><true/>
<key>Name</key><string>Test_ParentFolder</string>
<array>
</array>
</dict>
<dict>
<key>Playlist ID</key><integer>35787</integer>
<key>Playlist Persistent ID</key><string>8EDD3A6300000000</string>
<key>All Items</key><true/>
<key>Name</key><string>Test_NestedFolder</string>
<array>
</array>
</dict>
<dict>
<key>Playlist ID</key><integer>35788</integer>
<key>Parent Persistent ID</key><string>8EDD3A6300000000</string>
<key>Playlist Persistent ID</key><string>8EDD3A63221E3F1C</string>
<key>All Items</key><true/>
<key>Name</key><string>Test_NestedPlaylist</string>
<array>
<dict>
<key>Track ID</key><integer>15016</integer>
</dict>

which should have this set:
         <key>Parent Persistent ID</key><string>51D46ED300000000</string>
Would be great if we could get that fixed.


Also - I would still think MB should have this 'writing folders to xml' behaviour as an additional option though, not the default - as the xml, as is with folders, does not behave correctly in Serato or Rekordbox due to hardcoded xml assumptions which are different for each and which I am now re-formatting the xml for specifically.

As a side note - The amount of ridiculously bad behaviours I've come across in Serrato as well as RB when importing slightly differently formatted xmls does really raise ones' neck hairs, but not in a good way... so I'm way surprised now that the previous folder less itunes xml from MB actually worked as well as it did...


Cheers.
c.
Last Edit: March 26, 2018, 12:47:18 PM by alec.tron

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34346
One bug/issue I came across though.
When writing out the xml, and if you have any nested folders in MB's playlist panel, MusicBee does not write <key>Parent Persistent ID</key> for nested folders into the itunes xml at all. It's 100% reproducable for me.
thats fixed for the next update


alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Heya,
just grabbed the latest version and had a look at the resulting xml.
The good news - looks like it's now injecting the
<key>Parent Persistent ID</key>
for all playlists now.

The bad news:
but it also looks like it's not populating the tracks <dict> anymore at all and my once 60+MB large xml is now 107kb in size, see:
Code
<dict>
<key>Major Version</key><integer>1</integer>
<key>Minor Version</key><integer>1</integer>
<key>Application Version</key><string>3.2.6659.39316</string>
<key>Music Folder</key><string>file://localhost/C:/programs/muziq/MusicBee/Library/</string>
<key>Library Persistent ID</key><string>42295079D79ABAC2</string>
<key>Tracks</key>
<dict>
</dict>
<key>Playlists</key>
<array>
<dict>
<key>Playlist ID</key><integer>1</integer>


Churs.
c.
Last Edit: March 27, 2018, 07:15:17 AM by alec.tron

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34346
redownload and it should be working if you delete the invalid itunes xml file