{"issue":{"state":"closed","created_at":"2011-12-05T22:13:34Z","updated_at":"2011-12-05T22:20:33Z","user":{"gravatar_id":"98b5c948b2b37723b61d57a7cc70ec3a","id":7339,"url":"https://api.github.com/users/medwards","login":"medwards","avatar_url":"https://secure.gravatar.com/avatar/98b5c948b2b37723b61d57a7cc70ec3a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"...de pruning function for databases that have gotten messed up (or music libraries which have deleted files)\" and remove information output of what things weren't imported.\r\n\r\nThis reverts commit abbed94c20edb236c1d9d539f7ee1815d972f4db but also removes information output of what things weren't imported (from the original commit that was reverted).\r\n------------------------------\r\nSo, not mentioned in too much detail in the original branch -\r\nfs_getmetadata will raise an AudioInfoError if the file isn't of a parseable type (note that this list isn't extensive, I'm fairly sure my Homeworld 2 ripped AIFs aren't included). If this is caught and ignored in the fs_getmetadata call then import_song will still create an entry for it because it can work with nil values. So we rescue in import_song and because fs_getmetadata is a necessary call before the ActiveRecords are created we can assume that invalid files won't be imported as 'songs.'\r\n\r\nAdditionally the logic has been tweaked to find/create Artists/Albums separately from song record creation and to update a song if it already exists in the database. This should cause less pain to people who are in the process of cleaning up their library metadata.\r\n\r\nFinally prune_songs isn't called from anywhere, but I've used it periodically in irb and its handy if I screw up my library or we decide to pull music from the library.","assignee":null,"id":2455362,"labels":[],"number":54,"pull_request":{"patch_url":"https://github.com/holman/play/pull/54.patch","html_url":"https://github.com/holman/play/pull/54","diff_url":"https://github.com/holman/play/pull/54.diff"},"title":"Revert \"Revert \"Don't import things that AudioInfo can't parse and provi...","html_url":"https://github.com/holman/play/issues/54","closed_at":"2011-12-05T22:15:47Z","url":"https://api.github.com/repos/holman/play/issues/54","milestone":null},"action":"created","comment":{"created_at":"2011-12-05T22:20:33Z","updated_at":"2011-12-05T22:20:33Z","user":{"gravatar_id":"6f63cde8b16b035280ca615f621a6c8c","id":2723,"url":"https://api.github.com/users/holman","login":"holman","avatar_url":"https://secure.gravatar.com/avatar/6f63cde8b16b035280ca615f621a6c8c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"If you reference another commit in a commit — by long or short sha (ie, \"this something somethings `deadbeef`\") — then it'll pull in the commit references into the other commit.","id":3024459,"url":"https://api.github.com/repos/holman/play/issues/comments/3024459"}}