{"action":"created","issue":{"url":"https://api.github.com/repos/sampsyo/beets/issues/1359","labels_url":"https://api.github.com/repos/sampsyo/beets/issues/1359/labels{/name}","comments_url":"https://api.github.com/repos/sampsyo/beets/issues/1359/comments","events_url":"https://api.github.com/repos/sampsyo/beets/issues/1359/events","html_url":"https://github.com/sampsyo/beets/pull/1359","id":62099959,"number":1359,"title":"Smartplaylist only updates playlists that may have changed","user":{"login":"brunal","id":921168,"avatar_url":"https://avatars.githubusercontent.com/u/921168?v=3","gravatar_id":"","url":"https://api.github.com/users/brunal","html_url":"https://github.com/brunal","followers_url":"https://api.github.com/users/brunal/followers","following_url":"https://api.github.com/users/brunal/following{/other_user}","gists_url":"https://api.github.com/users/brunal/gists{/gist_id}","starred_url":"https://api.github.com/users/brunal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunal/subscriptions","organizations_url":"https://api.github.com/users/brunal/orgs","repos_url":"https://api.github.com/users/brunal/repos","events_url":"https://api.github.com/users/brunal/events{/privacy}","received_events_url":"https://api.github.com/users/brunal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-16T14:36:20Z","updated_at":"2015-03-19T13:30:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sampsyo/beets/pulls/1359","html_url":"https://github.com/sampsyo/beets/pull/1359","diff_url":"https://github.com/sampsyo/beets/pull/1359.diff","patch_url":"https://github.com/sampsyo/beets/pull/1359.patch"},"body":"`database_changed` sends the model that changed (stored/deleted/updated) and the `smartplaylist` plugin uses that information to detect which playlists it should regenerate.\r\nQuery usage has also been improved: the plugin uses `OrQuery`, which is way faster that merging individual queries.\r\n\r\nThis is a work in progress:\r\n- [x] there seems to be problems on query building: Kings of Leon matches my French playlist according to smartplaylist, but `ls` disagrees.\r\n- [x] sort is not managed. There does not seem to be a right way to deal with it.\r\n- [x] there are only skeletons of tests\r\n- [x] the update to `database_changed` should be documented\r\n- [x] maybe a let's-find-what-this-function-needs approach in the function wrapper (beets/plugins.py:114) should be restored (@sampsyo I need your input there).\r\n\r\nedit: motivation for that change: playlist building can be really slow (1min+), even if I barely did anything. This solves it."},"comment":{"url":"https://api.github.com/repos/sampsyo/beets/issues/comments/83571946","html_url":"https://github.com/sampsyo/beets/pull/1359#issuecomment-83571946","issue_url":"https://api.github.com/repos/sampsyo/beets/issues/1359","id":83571946,"user":{"login":"brunal","id":921168,"avatar_url":"https://avatars.githubusercontent.com/u/921168?v=3","gravatar_id":"","url":"https://api.github.com/users/brunal","html_url":"https://github.com/brunal","followers_url":"https://api.github.com/users/brunal/followers","following_url":"https://api.github.com/users/brunal/following{/other_user}","gists_url":"https://api.github.com/users/brunal/gists{/gist_id}","starred_url":"https://api.github.com/users/brunal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunal/subscriptions","organizations_url":"https://api.github.com/users/brunal/orgs","repos_url":"https://api.github.com/users/brunal/repos","events_url":"https://api.github.com/users/brunal/events{/privacy}","received_events_url":"https://api.github.com/users/brunal/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T13:30:56Z","updated_at":"2015-03-19T13:30:56Z","body":"Here is backwards-compatibility on import stages and event listeners! I added tests as well.\r\n\r\nI think that this PR is now complete."}}