Reconstruction of .xml - do not keep my tags

I love to sort the albums in my library by artist, and then the date, and to display this way on my iPod.  To do this, I wrote a Python script that is supposed to add tags "make Album" in the file of exported xml iTunes Library, with the format "artist-Album of the YEAR.

It's a primitive script, but I can tell this should work at least.  But when I rebuild my iTunes library since the updated xml file, it rebuilt just as it was before, without my Album out new tags.

Here is an example of the updated xml file the:

< key > 1645 < / key >
< dict >
Track ID < key > < / key > < integer > 1645 < / integer >
< key > name < / key > < String > Tombstone Shadow < / string >
< key > artist < / key > < String > Creedence Clearwater Revival < / string >
< key > Album artist < / key > < String > Creedence Clearwater Revival < / string >
< key > composer < / key > < String > John Fogerty < / string >
< key > Album < / key > < String > Green River < / string >
< key > type < / key > < String > Rock < / string >
< key > type < / key > < channel audio file > MPEG < / string >
< key > size < / key > < integer > 7129216 < / integer >
< key > total duration < / key > < integer > 218644 < / integer >
< key > disc number < / key > < integer > 1 < / integer >
< key > disk count < / key > < integer > 1 < / integer >
< key > track number < / key > < integer > 3 < / integer >
< key > track count < / key > < integer > 14 < / integer >
< key > year < / key > < integer > 1969 < / integer >
< key > update < / key > < date > 2014-03-05T 02: 43:58Z < / date >
< key > Date added < / key > < date > 2016-06-11T 15: 35:16Z < / date >
< key > bitrate < / key > < integer > 256 < / integer >
< key > sampling rate < / key > < integer > 44100 < / integer >
< key > standards < / key > < integer > 5690 < / integer >
< key > County work < / key > < integer > 1 < / integer >
< key > Album sort < / key > < String > Green River Creedence Clearwater Revival 1969 < / string > < key > Persistent ID < / key > < String > 3962D1A1CF08D178 < / string >
< key > track Type < / key > < String > file < / string >
< key > location < / key > < channel er%20Revival/Green%20River/03%20Tombstone%20Shadow.mp3 > file://localhost/E:/Music/iTunes/Creedence%20Clearwat < / string >
< key > statement of case file < / key > < integer > 4 < / integer >
< key > folder County Library < / key > < integer > 1 < / integer >
< / dict >

As you can see, the Album and Persistent ID sort keys share a line.  I don't know if this is important; I think I could solve this problem if that's the problem.  However, I tried manually add a line break after the tag Album fate and then rebuild the library again, and he didn't keep the custom tags.  Indeed, when I check "XML part" in preferences, it exports the xml without any of the tags New Album out (which makes sense, since they do not appear on the securities themselves).

Can someone tell me what I am doing wrong?  I have found surprisingly little documentation in-depth on exactly how the iTunes library xml is parsed, so I really don't know how picky, it's command, line breaks, etc.

Reconstruction from the XML does not update the tags in the songs. As soon as iTunes reads the tag of the file in question any external change you make is rejected. A better approach would be a modified version of my script KeywordsToAlbum wrote in SortAlbum instead, which interprets < SortAlbum > to mean the current value of the Album of the sort. The following input string would be set the values you want:

-< SortAlbum > < artist > < year > < Album >

You can fix it yourself if you want. I'm just on my way, but I'll post a new script later in the day.

TT2

Tags: iTunes

Similar Questions

  • Flatten XML does not record the names of the ListBox element to the XML file.

    On my front, I have a ListBox indicator that has strings that the user can select. Also, the user can edit items in the drop-down list to add new items. After that the user selects one and pushes my "Save" button, I use the flatten XML function to save the selection in an XML file. But Flatten XML saves only the value (the index of the selected items to the XML file and not the names of items in ListBox.) This is enough information to reconstruct from the string of data that the user has selected.

    A ListBox where a user is to select from a list of strings, flatten function XML should not also store the strings that have been selected?


  • then read error content xml is not allowed in prolog

    while reading xml that I content error is not allowed in prolog.
    I tried to remove any white space, save the doc in the utf-8 encoding.
    What is this encoding?
    I use XMLParse() to read the document. Is there another way, I can read the xml file and access its elements of coldfusion code or what could be wrong with my xml file. Becuause, it displays correctly in Internet Explorer. This means that there not sure missed tags or simple mistakes.

    Thank you for your response.

    I came across an article saying if
    XML tag definition &
    I think that one who has worked for me.

  • All new Iphone 6s do not keep the load.

    I bought the new IPhone 6 s today two weeks ago. I'll have to charge at least twice per day, within a period of 10 hours. I was told when buying I could get 17 to 24 hours autonomy. I'm not running several apps and do not keep a bright screen.  How can this be repaired?

    Before he can be 'fixed', the question must be identified. Go to settings > farm and see which application uses the highest percentage of your battery. You will also need to look at this other parameters you turned on and determine how you use the device.

  • I've updated to Firefox 8, now, it will not keep Me connected to all the sites!

    Everything was beautiful and brilliant. Then I updated to Firefox 8. Now any website I want to (Amazon, Facebook, Twitter, etc.) will not keep me connected when I check the box to do so. As soon as I close Firefox and reopen it, I have to log in again, even if on some sites it's to remember my username and password (just do not keep me logged).

    I tried to delete all cookies and history and still nothing.

    Does anyone else have this problem?

    In the privacy section of the Firefox options, make sure that Firefox is configured to accept cookies and that it is not set to clear history of Firefox closing.

    (If you use the default "Remember history" then it should work fine. If you use the "customized for the history settings" setting, and then make sure that "Accept cookies" is checked and "clear history of Firefox closing is not checked.)

  • With multi tabs open I'm going to close Firefox 5.0 and it will not keep the tabs closes all tabs

    With multi tabs open I'm going to close Firefox 5.0 and it will not keep the tabs it closes all tabs so when I restart I have to reopen the tabs. I was using firefox 3.6 and had the opportunity to close, but keep the tabs so they would open when I restarted firefox.

    upgrade your browser Firefox 8 and check

  • After a firefox update, last week he will not keep me logged on my home page and also ebay

    I have windows XP and firefox installed an update for computing
    keeps asking me to connect to my home page even though I checked the box to keep me signed in. also he continues to change home address. It does not keep as I logged into my ebay account

    Compensation of the "Site Preferences" clears all cookies, images, pop-ups, installing the software and password exceptions.

    See also:

  • When I insert a compatible game must be installed and the alert arrives to allow another comes in and says "the file 'Localization.xml' could not be loaded."

    When I insert a compatible game must be installed and the alert arrives to allow another comes in and says "the file 'Localization.xml' could not be loaded."

    Hi Scarface0721,

    Welcome to Microsoft Answers Forums.

    We would like to get a better understanding of this issue, so we can better help not only you but other users with similar problems.

    (a) game in which you try to read?

    (b) have you been able to install and play the game before?

    (c) you are trying to install the game to your computer from the disk or directly trying to play from the disc?

    Method 1:
    Try to install and play the game in a different computer.

    Method 2:
    Try another disc and verify if you are able to install the game.

    Method 3:
    You can also post your request in the following forums site.

    http://forums.gamesforwindows.com/

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • When I check the box to me connected, when I sign keep, it does not keep me logged on Windows Live.

    Original title: keep me connected

    When I check the box to keep me connected, when I sign, it dose not keep me connected. What can I do?

    Hello

    You can ask your questions on the links of the following forums.

    http://answers.Microsoft.com/en-us/windowslive/Forum/LIVEmail

  • Server 2008 rdp client does not keep by default local printer

    Question: Windows XP workstation connects to the client terminal server 2008 for an application. The local workstation XP has a based LPT printer. The local printer is selected to be used through the RDP client and can be seen on the Terminal Server session. The central issue is that the RDP session will not keep the local printer the default XP workstation. It can be chosen and works, but never stays after the end of the session and reconnect or even log out of the session and you reconnect. It never remains the default printer, instead, it takes the default value of the server administrator. 1 of 7 other network printers.

    Points: The XP workstation has a printer LPT laserjet 4000 series as is the local default LPT. I followed a Tech Note "http://support.microsoft.com/default.aspx?scid=kb;en-us;302361" which seems to have nothing to do with this topic.

    Note: The server is standard with clients more Terminal server 2008. All the network printers according to works, and other customers to keep printers default network without problem.

    Annex Note: http://social.technet.microsoft.com/Forums/en/winserverTS/thread/2a6944a1-d1cb-492c-b413-75dcbe7dad9b is linked. I have this strategy enabled for all other customers. I guess what would be necessary, would be a work around.

    Hello Brian Weiser.

    Thanks for visiting the site of the community of Microsoft Windows XP. The question you have posted is related to Windows Server 2008 and would be better suited to the TechNet community. Please click HERE to find a community that will provide the support you want.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • hp7410 does not keep the wireless connection

    hp7410 all-in-one does not keep the wireless connection. It requires to install a new driwer. so far, I have at least 16 versions of the driver. neither maintains the status of line long enough fo more than a few hours.

    Please provide the following information if anyone can help including:

    The printer model - done

    Detailed problem description-

    Operating system on the computer (including the revision of the service pack)-

    Method - USB, LAN, Wireless cable connection? -

    Brand and model of router and modem? -

    Error messages - on the screen of the printer or computer, no matter what flashing light patterns.

    If wireless, status of the blue wireless light on the printer, active, disabled or flashing? -

  • Why does dell support does not, keep popping up

    Why does dell support does not, keep popping up

    Hello

    you will have to ask Dell Suport this question, because it is their software that you have problems with

    Dell suport

    http://support.Dell.com/

    or ask in the Forums of Dell Support

    http://en.community.Dell.com/support-forums/default.aspx

  • How to get files from a deleted user where I chose "do not keep files.

    OK, so I have all my files have recently moved to a different user account and when I deleted this user account, I chose "do not keep files" because the reason why I was moving was because it was not a lot of space. Then, I realized that I didn't transfer about three of my files and I really need them back =]

    You can try a utility for retrieving file as a last resort: http://pcsupport.about.com/od/filerecovery/tp/free-file-recovery-programs.htm

    J W Stuart: http://www.pagestart.com

  • Smartphones blackBerry how can I fix this error: "The XML is not well-formed."

    What is this error?  "The XML is not well-formed."

    I was always able to access the site of ringing in the AT & T Mall until today.   All of a sudden, I get the error XML, as shown above.

    What is it?  How should I do?

    You change the option in the configuration of the browser for something other than blackberry.  You can change it to Internet Explorer or Firefox.  I've noticed this problem when I try to access my Bank Web site and the web address think that it is accessed from a blackberry browser and not a general public.  Now when you download things like themes that you get from a site of third party... where they send you a txt message to click on a link you must replace blackberry.  Here are the instructions for how to do this:

    Open the browser

    Click the button (Menu) Blackberry

    Scroll down to Options

    Click on the browser Configuration

    Under the browser Indentifcation change to Internet Explorer or Firefox

    Then try again ringtone site.

    Let me know if it works

    Thank you

    PBKolsun

  • Windows does not keep appearing

    Everything takes forever to appear, and then crashes (Explorer does more or windows does not) keeps coming back.  It happens on any site that I'm on also on hotmail.  I downloaded the latest windows updates and do a virus check (I have Norton 360) but nothing seems to make any difference. Can someone advise please because I'm not very good with any technical problems.  I looked at how to solve windows problems, but they all do a scan and then want to remove money problems! Thank you

    Everything takes forever to appear, and then crashes (Explorer does more or windows does not) keeps coming back.  It happens on any site that I'm on also on hotmail.  I downloaded the latest windows updates and do a virus check (I have Norton 360) but nothing seems to make any difference. Can someone advise please because I'm not very good with any technical problems.  I looked at how to solve windows problems, but they all do a scan and then want to remove money problems! Thank you

    Hello

    First of all, make sure that your system is clean:

    using the analysis

    http://www.Malwarebytes.org/ (recommended)

    If you have anti antivirus program update it and run full scan or if you do not get this one:
    AVG Free http://www.avg.com/gb-en/download-free-anti-virus

    Note that anti virus as Noroton and Mcafee tend to slow down your pc at startup and to work with your pc so if other steps has not helped your case, consider switching to other anti virus.

    Do using the analysis:

    http://www.emsisoft.com/en/software/EEK/ recommended

    You can run it from memory stick too.

    "It is recommended to perform all analysis in safe mode.

    Make sure your system is clean first. use ccleaner to get rid of junkfiles http://www.piriform.com/ccleaner/download

    Make sure your windows is uptodate and drivers work correctly and that they are as uptodate.

    Try to clean boot to see which program is causing your pc run slow or unresponsive

    Statement here:

    http://support.Microsoft.com/kb/310353

    Basically, it must disable all startup items and services of NONE-Windows through msconfig, and then restart your pc and then put it in standby or idle mode and see if the problem is resolved?

    Try to run less program in your startup, minimize your startup program. You can do this either by using the msconfig tool / ccleaner.

    Make sure you drive for errors. Perform disk clean up and Defrag using windows tools.

    Test your windows files

    http://support.Microsoft.com/kb/929833

    Uninstall programs you do not use!

    Please visit my blog for more tips and tricks
    http://safewordwidewebsurfing.blogspot.co.UK/

Maybe you are looking for

  • Need speaker for portable computer A30 satellite

    Hi I recently had a virus and had to reinstall Xp and I had lost the Toshiba reinstall CD so I used a whole simply windows Xp reinstall so I called I have to please the pilots.

  • Frustration with the e-mail software

    Hello First of all, I think that I am posting this in the wrong place because it does not only refer to the Mavericks, as far as I know (and the last years of different operating systems). But I've been staring at the screen for 5 minutes trying to f

  • Multiplying the issue tables

    Hey guys I searched and searched and searched the forums, on google, and tried youtubing but I'm having problems creating a VI. What I have to do is to create two tables 1 d that must be multiplied together and divided by 100 to create a 2D array. I

  • By dividing the time base clock sample by N, we're the first sample on pulse 1 or pulse N?

    I use an external source for the time base a task of analog input sample clock. I'm dividing down by 100 to get my sample clock. Is could someone please tell me if my first sample clock pulse will be generated on the first impulse of the source of th

  • NEITHER 9205 always returns the noise from rail to rail.

    Hi all I'm completely stumped on this one. I went through the procedure of implementation of the NI 9205 module in my project. Setting the channel to the appropriate type. Placed the node IO in my FPGA code, read and all I get is noise from rail to r