BytePhoenixCoding / SeratoToRekordboxConverter

Python script for converting serato library into rekordbox.
4 stars 1 forks source link

Generates Empty XML File #1

Open m88youngling opened 4 months ago

m88youngling commented 4 months ago

Windows 11, Surface Pro 8

Problem: running the script successfully produces an XML file, but this XML file has no entries.

Steps to reproduce(?) (for me at least):

  1. Follow all directions from ReadMe

  2. My paths were as follows,

serato_folder_path = "Serato/Subcrates" base_dir = "Users/m88youngling/Downloads/s2r/"

Since I was having this problem, I switched from using my OneDrive synced music folder to my local Downloads directory to test, which is what you see above. I copied my Serato folder to that 's2r' directory as well so the script would have access.

The script runs successfully, but results in the following XML sheet. It appears as if I have no crates, but I have plenty of crates in my Subcrates folder. I have capitalization correct in the paths as well. Any ideas?


<PRODUCT Name="rekordbox" Version="6.7.4" Company="AlphaTheta"/>
<COLLECTION Entries="0"/>
<PLAYLISTS>
<NODE Type="0" Name="ROOT" Count="0"/>
</PLAYLISTS>
</DJ_PLAYLISTS>```
m88youngling commented 4 months ago

I think I got it working. For the serato_folder_path I needed to use the absolute path and not the relative path.

Additionally, the XML output did not encode the URIs correctly. I needed to use another script to correct the Track part of the XML sheet to use the correct URI style, for example, here is the original output of the SeratoToRekordBoxConverter script,

<DJ_PLAYLISTS Version="1.0.0">
<PRODUCT Name="rekordbox" Version="6.7.4" Company="AlphaTheta"/>
<COLLECTION Entries="27">
<TRACK TrackID="1" Name="Chant" Artist="1991" Kind="MP3 File" TotalTime="225" Location="file://localhostC:\Users\m88youngling\Music\Grab May 2024\Drum and Bass Top 100\1991 - Chant.mp3"/>
<TRACK TrackID="2" Name="Back To Back (B2B)" Artist="A Little Sound" Kind="MP3 File" TotalTime="176" Location="file://localhostC:\Users\m88youngling\Music\Grab May 2024\Drum and Bass Top 100\A Little Sound - Back To Back (B2B).mp3"/>

...

</COLLECTION>

This is the correct format that it should be in. Note the %20 character replaces all the spaces in the URIs

<DJ_PLAYLISTS Version="1.0.0">
<PRODUCT Name="rekordbox" Version="6.7.4" Company="AlphaTheta"/>
<COLLECTION Entries="27">
<TRACK TrackID="1" Name="Chant" Artist="1991" Kind="MP3 File" TotalTime="225" Location="file:///localhost/C:/Users/m88youngling/Music/Grab%20May%202024/Drum%20and%20Bass%20Top%20100/1991%20-%20Chant.mp3"/>
<TRACK TrackID="2" Name="Back To Back (B2B)" Artist="A Little Sound" Kind="MP3 File" TotalTime="176" Location="file:///localhost/C:/Users/m88youngling/Music/Grab%20May%202024/Drum%20and%20Bass%20Top%20100/A%20Little%20Sound%20-%20Back%20To%20Back%20(B2B).mp3"/>

...

</COLLECTION>

I don't know how to use Python 💀 but if I did (maybe I should get off my ass and learn lol) then I would start by seeing if I could correct the output of the original script to use this URI structure