{"id":862,"date":"2010-10-22T13:30:44","date_gmt":"2010-10-22T18:30:44","guid":{"rendered":"http:\/\/ywwg.com\/wordpress\/?p=862"},"modified":"2010-10-22T14:50:53","modified_gmt":"2010-10-22T19:50:53","slug":"removing-duplicate-tracks-from-banshee","status":"publish","type":"post","link":"https:\/\/ywwg.com\/wordpress\/archives\/862","title":{"rendered":"Removing duplicate tracks from Banshee"},"content":{"rendered":"<p>Despite my existential angst that all modern music applications created since Winamp 2.8 suck, I have to play my music with <strong>something<\/strong>, so I&#8217;ve been using Banshee because it&#8217;s Good Enough.  But I put up with crap, like, recently I noticed that there were dozens of duplicate tracks listed in banshee&#8217;s database.  So if I queued up an album, I&#8217;d get songs repeated occasionally.  Very annoying.  There are <a href=\"http:\/\/www.google.com\/search?client=ubuntu&#038;channel=fs&#038;q=banshee+remove+duplicate+tracks&#038;ie=utf-8&#038;oe=utf-8\">other people out there with the same problem<\/a>, but the only listed solution is an out-of-date plugin.<\/p>\n<p>Luckily Banshee&#8217;s database is an open sqlite database ((I can&#8217;t even find a link to a description of the iTunes library format)), so I poked around a bit (the database is in ~\/.config\/banshee-1\/).  Sure enough, I found duplicate entries in the CoreTracks table.  Interestingly, though, there&#8217;s another table called Tracks that didn&#8217;t have the duplicated entries.  And the tables are related!<\/p>\n<p>So this is the command I used:<br \/>\n<code>DELETE FROM CoreTracks WHERE CoreTracks.TrackID NOT IN (SELECT TrackID FROM Tracks);<\/code><\/p>\n<p>This solved my duplicate tracks problem.  As always when messing around with databases and the &#8220;DELETE&#8221; command, use <strong>extreme caution<\/strong>.  I recommend a little gentle testing with SELECT commands first before you do anything stupid.  Or, smarter still, back up your database first.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Despite my existential angst that all modern music applications created since Winamp 2.8 suck, I have to play my music with something, so I&#8217;ve been using Banshee because it&#8217;s Good Enough. But I put up with crap, like, recently I noticed that there were dozens of duplicate tracks listed in banshee&#8217;s database. So if I &hellip; <a href=\"https:\/\/ywwg.com\/wordpress\/archives\/862\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Removing duplicate tracks from Banshee&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/862"}],"collection":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/comments?post=862"}],"version-history":[{"count":5,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/862\/revisions"}],"predecessor-version":[{"id":867,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/862\/revisions\/867"}],"wp:attachment":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/media?parent=862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/categories?post=862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/tags?post=862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}