or Connect
Head-Fi.org › Forums › Head-Fi Special Forums › Premier Sponsor Forums and Sponsor Forums › Premier Sponsor Forums › FiiO › X3 Library Hack! Super fast library update, proper tag (ID3 v2) & playlist support!
New Posts  All Forums:Forum Nav:

X3 Library Hack! Super fast library update, proper tag (ID3 v2) & playlist support!

post #1 of 15
Thread Starter 

As a previous iPod Classic owner, I have a very well maintained iTunes library.

 

When I considered the X3, I knew there would be a few problems:

1. No official tool to sync the X3 on my Mac (easy work around with rsync and USB mass storage)

2. Library support is built into X3 instead of the host computer (I assume I could just update the library on the X3)

3. No playlist support (I didn't feel it was that) important

 

But once I got the X3, there were more problems than anticipated:

1. iTunes maintains ID3 v2.4 tags and leaves the ID3 v1 tags untouched, v1 tags are either broken due to encoding or outdated

2. X3 only reads ID3 v1 tags with GB18030 encoding

3. Library updates on X3 takes forever... 

4. Playlist support is quite important, esp when the UI on X3 is not as easy to navigate as on the iPod

 

I tried fixing the problem by copying the ID3 v2 info to ID3 v1, which causes loss of info (UTF-8 vs GB18030, 15-character field width etc).

X3 also had issue reading info like genre, etc, from M4A files.

 

So I set off to make my own tools in fixing the above issues, with the following targets and assumptions:

1. Unicode library support for MP3 (ID3 v2.4), M4A (AAC & ALAC)

2. Much faster library refresh using CPU on Mac / PC (6000 songs update in less than 2 min)

3. Piggyback M3U playlist support into Library/Album section

4. Runs on Mac (maybe Linux & other Unix-like system too, not tested)

5. Correct track ordering when viewed in album mode

–. Currently no plan to support FLAC & cue sheet in library as they are not supported by iTunes and thus does not exists in my library

 

https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-prn1/t1.0-9/10258086_10152319469225758_7343830039475598923_n.jpg

*Above: The first 3 items, preceded by a "." in their name in this view are playlists imported from M3U files.

 

I have most of the functions written (in Python) and right now mostly bug free (as far as it works on my iTunes library).

But it's still work in progress and requires quite some polish for your grandma to use:

1. No GUI, CLI only

2. Requires manual configuration (needs to install an extra program and Python packages)

3. Bugs? Maybe

 

It will probably work on other folder structures besides iTunes.

If there are people who are interested, I may just release the code.

 

Anyone?


Edited by angelosc - 4/19/14 at 10:17pm
post #2 of 15

cool!

post #3 of 15
Quote:

...

Anyone?

I'd be interested. So is the program creating the database file on the Mac and then you copy it over to the X3 manually?

post #4 of 15
Thread Starter 
Quote:
Originally Posted by tjw321 View Post
 

I'd be interested. So is the program creating the database file on the Mac and then you copy it over to the X3 manually?

That's right.

 

tjw321, are you comfortable with programming?

post #5 of 15
Quote:
Originally Posted by angelosc View Post
 

That's right.

 

tjw321, are you comfortable with programming?

Yes I am. I've done a fair bit of programming in my time.

post #6 of 15

im very interested in using it for my self/testing since my knolege of programing is almost none

post #7 of 15
Thread Starter 

Sorry, I was too occupied by work and being sick for the last 2 days.

 

tjw321 & fburgos01, thank you very much for your interest, I have just posted the code to GitHub:

https://github.com/angelos-se/X3LibTool

 

You may download the code either using the GitHub application or use the "Download ZIP" button on the right.

There are 2 more tools needed before the code will run:

AtomicParsley http://sourceforge.net/projects/atomicparsley/

eyeD3 http://eyed3.nicfit.net

 

Usage:

In Terminal, change directory to the folder where your files are stored (eg: I copy (rsync) my whole iTunes music folder to my Fiio, so I just do cd ~/Music/iTunes/iTunes Music/Music) and run the code (I save my code at ~/X3LibTool/CreateDB.py, so I execute ~/X3LibTool/CreateDB.py)

 

Once the code finishes running, it will place the usrlocal_media.db file on your desktop, and you'll just need to copy that file onto the internal storage of your Fiio X3.

 

If you encounter error on line 175, it probably means that you are running the script from the working directory and the script cannot find any of your music files.

* The code running happily.

post #8 of 15

What will it take for this to get ported or to work on windows? Would some tweaking of the python code let it run?

post #9 of 15
Thread Starter 
Both dependencies are available for Windows, but I don't have a Windows PC to test. You are welcomed to try it out. (I'm guessing some of the path needs to be changed.)
If you can tell me what breaks, or better yet send in patches, I'm more than happy to integrated them into the code.
post #10 of 15
Thread Starter 

Just an update for some Win32 porting efforts.

 

Somehow it looks like the CMD shell or something else in Windows is not handling Unicode file names properly.

http://stackoverflow.com/questions/3789924/python-os-walk-and-japanese-filename-crash

 

I can run the script after patching a few lines here and there but it only works with English file names...

 

 

Aghhhhhh... Windblow always...


Edited by angelosc - 4/25/14 at 8:58am
post #11 of 15
Im in ubuntu but i think im doing something wrong

I put the createdb.py on the directory of the music and type CreateDB.py and the output is command missing


Sent from my GT-I9192 using Tapatalk
post #12 of 15
Quote:
Originally Posted by fburgos01 View Post

Im in ubuntu but i think im doing something wrong

Instaled the eyeD3-0.7.4 as instructed by the webpage

Then downloaded atomicparsley and put the binary in /usr/bin

On terminal

I put the createdb.py on the directory of the music and type CreateDB.py and the output is command missing


Sent from my GT-I9192 using Tapatalk

Can't edit ill quote myself

Sent from my GT-I9192 using Tapatalk
post #13 of 15

Hi,

 

i forked your github repo and added FLAC and AIFF support. Please review my pull-request.

 

https://github.com/angelos-se/X3LibTool/pull/1

 

Are there any ideas what we should add next to the tool?

 

Regards,

Andi

post #14 of 15

The command not found in ubuntu is die to the fact, that the current directory is not in the search path. Use './script.py' (if the script is equipped with a first line giving the path to python) or 'python script.py'.

Another possible cause: your location of python is different than that given in the script. In this case simply correct the path.

- notdarkyet

post #15 of 15

I am looking to try to get this up and running on windows since my X3 library does not seem to update very well using 2.1 firmware.  If anyone has this up and running, please let me know if there are any issues.  I am going to install the two python apps and python for windows.  Anything else?

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: FiiO
Head-Fi.org › Forums › Head-Fi Special Forums › Premier Sponsor Forums and Sponsor Forums › Premier Sponsor Forums › FiiO › X3 Library Hack! Super fast library update, proper tag (ID3 v2) & playlist support!