{"id":4350,"date":"2015-07-16T06:06:54","date_gmt":"2015-07-16T05:06:54","guid":{"rendered":"http:\/\/www.haydnwilliams.com\/blog\/?p=4350"},"modified":"2022-04-11T16:43:10","modified_gmt":"2022-04-11T15:43:10","slug":"transferring-itunes-ratings","status":"publish","type":"post","link":"https:\/\/www.haydnwilliams.com\/blog\/transferring-itunes-ratings\/","title":{"rendered":"Transferring iTunes Ratings"},"content":{"rendered":"<p>I recently got fed up with corruption in my iTunes library resulting in predictable behaviour and crashes. Drastic action was called for, so I deleted the whole thing and started a new one. This meant that I lost all of my play counts (not the end of the world) and my star ratings (<em>definitely<\/em> a big problem!).<\/p>\n<p>There didn&#8217;t seem to be anything out there which could take this information from the old .xml library file and transfer it into the new one. It&#8217;s the same mp3 files in each library, so surely it shouldn&#8217;t be too hard?<\/p>\n<p>I eventually stumbled across <a href=\"http:\/\/reinout.vanrees.org\/weblog\/2012\/12\/30\/restore-itunes-ratings.html\" target=\"_blank\" rel=\"noopener\">an old post by Reinout van Rees<\/a>, who had written <a href=\"https:\/\/gist.github.com\/reinout\/4410653\" target=\"_blank\" rel=\"noopener\">a Python script<\/a> to deal with the same situation. It didn&#8217;t quite do what I needed, but I played around a bit and have now <a href=\"https:\/\/github.com\/haydnw\/itunes-ratings-transfer\" target=\"_blank\" rel=\"noopener\">put it on GitHub<\/a> if anyone&#8217;s interested. The final XML output does need some tweaking, as iTunes doesn&#8217;t seem to like the plist format written out by the Python library, but it really is just a copy and paste job &#8211; see the <a href=\"https:\/\/github.com\/haydnw\/itunes-ratings-transfer\/blob\/master\/README.md\" target=\"_blank\" rel=\"noopener\">Readme<\/a> for more details.<\/p>\n<div id=\"attachment_4351\" style=\"width: 607px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4351\" class=\"size-full wp-image-4351\" src=\"http:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2015\/07\/2015-07-16.png\" alt=\"Running the iTunes Ratings Transfer script in Terminal. \u00a9 Haydn Williams 2015\" width=\"597\" height=\"338\" srcset=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2015\/07\/2015-07-16.png 597w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2015\/07\/2015-07-16-220x126.png 220w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2015\/07\/2015-07-16-460x260.png 460w\" sizes=\"auto, (max-width: 597px) 100vw, 597px\" \/><p id=\"caption-attachment-4351\" class=\"wp-caption-text\">Running the iTunes Ratings Transfer script in Terminal. \u00a9 Haydn Williams 2015<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There must be an easy way to transfer star ratings from an old iTunes library to a new one&#8230; right?<\/p>\n","protected":false},"author":2,"featured_media":4351,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[547,1099,1096,1097,1098],"class_list":["post-4350","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it","tag-itunes","tag-library","tag-ratings","tag-stars","tag-transfer"],"_links":{"self":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/4350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/comments?post=4350"}],"version-history":[{"count":0,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/4350\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/media\/4351"}],"wp:attachment":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/media?parent=4350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/categories?post=4350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/tags?post=4350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}