{"action":"created","issue":{"url":"https://api.github.com/repos/sampsyo/beets/issues/1476","labels_url":"https://api.github.com/repos/sampsyo/beets/issues/1476/labels{/name}","comments_url":"https://api.github.com/repos/sampsyo/beets/issues/1476/comments","events_url":"https://api.github.com/repos/sampsyo/beets/issues/1476/events","html_url":"https://github.com/sampsyo/beets/issues/1476","id":80355412,"number":1476,"title":"Incremental mode doesn't work with group_albums","user":{"login":"jamesob","id":73197,"avatar_url":"https://avatars.githubusercontent.com/u/73197?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesob","html_url":"https://github.com/jamesob","followers_url":"https://api.github.com/users/jamesob/followers","following_url":"https://api.github.com/users/jamesob/following{/other_user}","gists_url":"https://api.github.com/users/jamesob/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesob/subscriptions","organizations_url":"https://api.github.com/users/jamesob/orgs","repos_url":"https://api.github.com/users/jamesob/repos","events_url":"https://api.github.com/users/jamesob/events{/privacy}","received_events_url":"https://api.github.com/users/jamesob/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sampsyo/beets/labels/bug","name":"bug","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-25T02:46:53Z","updated_at":"2015-05-25T20:06:00Z","closed_at":null,"body":"On `master:HEAD`, aborting an import (even with the incremental option set to `yes` in config) seems to disregard any progress, as the next time I run `import` it starts from the beginning.\r\n\r\n```sh\r\n ⇨  beet config\r\n\r\ndirectory: ~/Dropbox/music/collection\r\n\r\nimport:\r\n    write: yes\r\n    copy: yes\r\n    move: no\r\n    incremental: yes\r\n    group_albums: yes\r\n    log: ~/Dropbox/music/beets/beets.log\r\nthreaded: yes\r\n\r\nui:\r\n    color: yes\r\nlibrary: ~/Dropbox/music/beets/library.db\r\n\r\n \r\n ⇨  beet import ~/Music/collection\r\n\r\nNone (1 items)\r\nFinding tags for album \"MF DOOM - MM..FOOD\".\r\nCandidates:\r\n1. MF DOOM - MM..FOOD (58.1%) (missing tracks) (CD, 2007, US, Rhymesayers Entertainment)\r\n2. MF DOOM - MM..FOOD (40.2%) (missing tracks, id, year, ...) (CD, 2004, US, Rhymesayers Entertainment)\r\n3. MF DOOM - MM..More Food (35.5%) (missing tracks, id, tracks, ...) (CD, 2004, US)\r\n4. MF DOOM - MM..Leftovers (29.7%) (missing tracks, id, album, ...) (CD, 2004, US)\r\n5. MF DOOM - MM..FOOD (23.8%) (missing tracks, id, tracks, ...) (2004)\r\n# selection (default 1), Skip, Use as-is, as Tracks, Group albums,\r\nEnter search, enter Id, aBort? \r\nTagging:\r\n    MF DOOM - MM..FOOD\r\nURL:\r\n    http://musicbrainz.org/release/2e57e853-97c4-3137-9206-8b712671a4d6\r\n(Similarity: 58.1%) (missing tracks) (CD, 2007, US, Rhymesayers Entertainment)\r\nMissing tracks (14/15 - 93.3%):\r\n ! Beef Rapp (#1) (4:39)\r\n ! Hoe Cakes (#2) (3:54)\r\n ! Potholderz (#3) (3:20)\r\n ! One Beer (#4) (4:18)\r\n ! Deep Fried Frenz (#5) (4:59)\r\n ! Poo-Putt Platter (#6) (1:13)\r\n ! Fillet-O-Rapper (#7) (1:03)\r\n ! Gumbo (#8) (0:49)\r\n ! Fig Leaf Bi-Carbonate (#9) (3:19)\r\n ! Kon Karne (#10) (2:51)\r\n ! Kon Queso (#12) (4:00)\r\n ! Rapp Snitch Knishes (#13) (2:52)\r\n ! Vomitspit (#14) (2:48)\r\n ! Kookies (#15) (4:01)\r\nApply, More candidates, Skip, Use as-is, as Tracks, Group albums,\r\nEnter search, enter Id, aBort? A\r\nThis album is already in the library!\r\nOld: 1 items, MP3, 192kbps, 4:41, 6.5 MB\r\nNew: 1 items, MP3, 192kbps, 4:41, 6.5 MB\r\n[S]kip new, Keep both, Remove old? R\r\nNone (1 items)\r\nFinding tags for album \"6th Borough Project - One Night in the Borough\".\r\nCandidates:\r\n1. 6th Borough Project - One Night in the Borough (58.1%) (missing tracks) (Digital Media, 2011, XW, Delusions of Grandeur)\r\n2. 6th Borough Project - One Night In The Borough (Part Two) (47.5%) (id, missing tracks, tracks, ...) (Digital Media, Delusions of Grandeur)\r\n3. 6th Borough Project - One Night in the Borough (41.2%) (missing tracks, id, catalognum) (Digital Media, 2011, XW, Delusions of Grandeur)\r\n4. 6th Borough Project - One Night in the Borough (40.5%) (missing tracks, id) (Digital Media, 2015, XW, Delusions of Grandeur, iTunes release)\r\n5. 6th Borough Project - One Night in the Borough (37.8%) (missing tracks, id, media, ...) (CD, 2011, Delusions of Grandeur)\r\n# selection (default 1), Skip, Use as-is, as Tracks, Group albums,\r\nEnter search, enter Id, aBort? b\r\n\r\n ⇨  beet import ~/Music/collection\r\n\r\nNone (1 items)\r\nFinding tags for album \"MF DOOM - MM..FOOD\".\r\nCandidates:\r\n1. MF DOOM - MM..FOOD (58.1%) (missing tracks) (CD, 2007, US, Rhymesayers Entertainment)\r\n2. MF DOOM - MM..FOOD (40.2%) (missing tracks, id, year, ...) (CD, 2004, US, Rhymesayers Entertainment)\r\n3. MF DOOM - MM..More Food (35.5%) (missing tracks, id, tracks, ...) (CD, 2004, US)\r\n4. MF DOOM - MM..Leftovers (29.7%) (missing tracks, id, album, ...) (CD, 2004, US)\r\n5. MF DOOM - MM..FOOD (23.8%) (missing tracks, id, tracks, ...) (2004)\r\n# selection (default 1), Skip, Use as-is, as Tracks, Group albums,\r\nEnter search, enter Id, aBort?\r\n```"},"comment":{"url":"https://api.github.com/repos/sampsyo/beets/issues/comments/105302718","html_url":"https://github.com/sampsyo/beets/issues/1476#issuecomment-105302718","issue_url":"https://api.github.com/repos/sampsyo/beets/issues/1476","id":105302718,"user":{"login":"sampsyo","id":188033,"avatar_url":"https://avatars.githubusercontent.com/u/188033?v=3","gravatar_id":"","url":"https://api.github.com/users/sampsyo","html_url":"https://github.com/sampsyo","followers_url":"https://api.github.com/users/sampsyo/followers","following_url":"https://api.github.com/users/sampsyo/following{/other_user}","gists_url":"https://api.github.com/users/sampsyo/gists{/gist_id}","starred_url":"https://api.github.com/users/sampsyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sampsyo/subscriptions","organizations_url":"https://api.github.com/users/sampsyo/orgs","repos_url":"https://api.github.com/users/sampsyo/repos","events_url":"https://api.github.com/users/sampsyo/events{/privacy}","received_events_url":"https://api.github.com/users/sampsyo/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T20:06:00Z","updated_at":"2015-05-25T20:06:00Z","body":"The issue seems to be a conflict with `group_albums`. The trouble (now with the fix inspired by @jamesob's #1475) is that, in that mode, we work at the granularity of individual tracks. But the incremental check (see `already_imported` in `beets.importer`) occurs when we're reading full directories, before the grouping occurs—so the check never gets triggered.\r\n\r\nI can see two possible fixes for this:\r\n\r\n* Change the album-grouping logic to add entire directories to the incremental history when they're finished.\r\n* Change the incremental-skip check to look for sets of tracks instead of (or in addition to) whole directories.\r\n\r\nI'm guessing the first option will be cleaner, if anyone would like to take a stab at it."}}