{"action":"created","comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/23893357","id":23893357,"diff_hunk":"@@ -505,6 +505,17 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes,\n TrackPointer AutoDJProcessor::getNextTrackFromQueue() {\n     // Get the track at the top of the playlist.\n     while (true) {\n+        // Incase we start off with < minimum tracks\n+        bool randomQueueEnabled = (((m_pConfig->getValueString(\n+                    ConfigKey(\"[Auto DJ]\", \"EnableRandomQueue\")).toInt())) == 1);\n+        int minAutoDJCrateTracks = m_pConfig->getValueString(\n+                    ConfigKey(kConfigKey, \"RandomQueueMinimumAllowed\")).toInt();\n+        int tracksToAdd = minAutoDJCrateTracks - m_pAutoDJTableModel->rowCount();\n+        while (randomQueueEnabled && (tracksToAdd > 0)) {","path":"src/library/autodj/autodjprocessor.cpp","position":10,"original_position":10,"commit_id":"5089f54dda3a29cdd6138ffbe7694b4069cb2d82","original_commit_id":"5089f54dda3a29cdd6138ffbe7694b4069cb2d82","user":{"login":"daschuer","id":1777442,"avatar_url":"https://avatars.githubusercontent.com/u/1777442?v=3","gravatar_id":"","url":"https://api.github.com/users/daschuer","html_url":"https://github.com/daschuer","followers_url":"https://api.github.com/users/daschuer/followers","following_url":"https://api.github.com/users/daschuer/following{/other_user}","gists_url":"https://api.github.com/users/daschuer/gists{/gist_id}","starred_url":"https://api.github.com/users/daschuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daschuer/subscriptions","organizations_url":"https://api.github.com/users/daschuer/orgs","repos_url":"https://api.github.com/users/daschuer/repos","events_url":"https://api.github.com/users/daschuer/events{/privacy}","received_events_url":"https://api.github.com/users/daschuer/received_events","type":"User","site_admin":false},"body":"I think it is a good idea to just transmit the requested track number by the signal and then the limit in \r\nAutoDJFeature::slotAddRandomTrack() can take care of it. ","created_at":"2015-01-31T23:45:37Z","updated_at":"2015-01-31T23:45:37Z","html_url":"https://github.com/mixxxdj/mixxx/pull/451#discussion_r23893357","pull_request_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451","_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/23893357"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/451#discussion_r23893357"},"pull_request":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451"}}},"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451","id":26794021,"html_url":"https://github.com/mixxxdj/mixxx/pull/451","diff_url":"https://github.com/mixxxdj/mixxx/pull/451.diff","patch_url":"https://github.com/mixxxdj/mixxx/pull/451.patch","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/451","number":451,"state":"open","locked":false,"title":"Bug #971429 : Automatic track additions to AutoDJ source","user":{"login":"metastableBarrett","id":8988231,"avatar_url":"https://avatars.githubusercontent.com/u/8988231?v=3","gravatar_id":"","url":"https://api.github.com/users/metastableBarrett","html_url":"https://github.com/metastableBarrett","followers_url":"https://api.github.com/users/metastableBarrett/followers","following_url":"https://api.github.com/users/metastableBarrett/following{/other_user}","gists_url":"https://api.github.com/users/metastableBarrett/gists{/gist_id}","starred_url":"https://api.github.com/users/metastableBarrett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metastableBarrett/subscriptions","organizations_url":"https://api.github.com/users/metastableBarrett/orgs","repos_url":"https://api.github.com/users/metastableBarrett/repos","events_url":"https://api.github.com/users/metastableBarrett/events{/privacy}","received_events_url":"https://api.github.com/users/metastableBarrett/received_events","type":"User","site_admin":false},"body":"Adding randomly selected tracks to AutoDJ Playlist after a specific minimum of tracks have been reached. \r\nThis feature adds an option to randomly add tracks to the autoDj playlist from the track source as soon as a specified minumum number of tracks are reached. The feature can be turned on from the AutoDJ preferences , where you can also specify the minimum number tracks to reach for the auto addition to work.The feature will become much more efficient after bug #1394928 (related to adding tracks from the libray if the source is empty )has been fixed (working on it).\r\n","created_at":"2015-01-04T11:24:39Z","updated_at":"2015-01-31T23:45:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e725dbef65883fc0587d44203c825cbd2669bafc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451/commits","review_comments_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451/comments","review_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/451/comments","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/5089f54dda3a29cdd6138ffbe7694b4069cb2d82","head":{"label":"metastableBarrett:b971429_addRand","ref":"b971429_addRand","sha":"5089f54dda3a29cdd6138ffbe7694b4069cb2d82","user":{"login":"metastableBarrett","id":8988231,"avatar_url":"https://avatars.githubusercontent.com/u/8988231?v=3","gravatar_id":"","url":"https://api.github.com/users/metastableBarrett","html_url":"https://github.com/metastableBarrett","followers_url":"https://api.github.com/users/metastableBarrett/followers","following_url":"https://api.github.com/users/metastableBarrett/following{/other_user}","gists_url":"https://api.github.com/users/metastableBarrett/gists{/gist_id}","starred_url":"https://api.github.com/users/metastableBarrett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metastableBarrett/subscriptions","organizations_url":"https://api.github.com/users/metastableBarrett/orgs","repos_url":"https://api.github.com/users/metastableBarrett/repos","events_url":"https://api.github.com/users/metastableBarrett/events{/privacy}","received_events_url":"https://api.github.com/users/metastableBarrett/received_events","type":"User","site_admin":false},"repo":{"id":27740321,"name":"mixxx","full_name":"metastableBarrett/mixxx","owner":{"login":"metastableBarrett","id":8988231,"avatar_url":"https://avatars.githubusercontent.com/u/8988231?v=3","gravatar_id":"","url":"https://api.github.com/users/metastableBarrett","html_url":"https://github.com/metastableBarrett","followers_url":"https://api.github.com/users/metastableBarrett/followers","following_url":"https://api.github.com/users/metastableBarrett/following{/other_user}","gists_url":"https://api.github.com/users/metastableBarrett/gists{/gist_id}","starred_url":"https://api.github.com/users/metastableBarrett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metastableBarrett/subscriptions","organizations_url":"https://api.github.com/users/metastableBarrett/orgs","repos_url":"https://api.github.com/users/metastableBarrett/repos","events_url":"https://api.github.com/users/metastableBarrett/events{/privacy}","received_events_url":"https://api.github.com/users/metastableBarrett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/metastableBarrett/mixxx","description":"Mixxx is Free DJ software that gives you everything you need to perform live mixes.","fork":true,"url":"https://api.github.com/repos/metastableBarrett/mixxx","forks_url":"https://api.github.com/repos/metastableBarrett/mixxx/forks","keys_url":"https://api.github.com/repos/metastableBarrett/mixxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metastableBarrett/mixxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metastableBarrett/mixxx/teams","hooks_url":"https://api.github.com/repos/metastableBarrett/mixxx/hooks","issue_events_url":"https://api.github.com/repos/metastableBarrett/mixxx/issues/events{/number}","events_url":"https://api.github.com/repos/metastableBarrett/mixxx/events","assignees_url":"https://api.github.com/repos/metastableBarrett/mixxx/assignees{/user}","branches_url":"https://api.github.com/repos/metastableBarrett/mixxx/branches{/branch}","tags_url":"https://api.github.com/repos/metastableBarrett/mixxx/tags","blobs_url":"https://api.github.com/repos/metastableBarrett/mixxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metastableBarrett/mixxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metastableBarrett/mixxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/metastableBarrett/mixxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metastableBarrett/mixxx/statuses/{sha}","languages_url":"https://api.github.com/repos/metastableBarrett/mixxx/languages","stargazers_url":"https://api.github.com/repos/metastableBarrett/mixxx/stargazers","contributors_url":"https://api.github.com/repos/metastableBarrett/mixxx/contributors","subscribers_url":"https://api.github.com/repos/metastableBarrett/mixxx/subscribers","subscription_url":"https://api.github.com/repos/metastableBarrett/mixxx/subscription","commits_url":"https://api.github.com/repos/metastableBarrett/mixxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/metastableBarrett/mixxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/metastableBarrett/mixxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/metastableBarrett/mixxx/issues/comments/{number}","contents_url":"https://api.github.com/repos/metastableBarrett/mixxx/contents/{+path}","compare_url":"https://api.github.com/repos/metastableBarrett/mixxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metastableBarrett/mixxx/merges","archive_url":"https://api.github.com/repos/metastableBarrett/mixxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metastableBarrett/mixxx/downloads","issues_url":"https://api.github.com/repos/metastableBarrett/mixxx/issues{/number}","pulls_url":"https://api.github.com/repos/metastableBarrett/mixxx/pulls{/number}","milestones_url":"https://api.github.com/repos/metastableBarrett/mixxx/milestones{/number}","notifications_url":"https://api.github.com/repos/metastableBarrett/mixxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metastableBarrett/mixxx/labels{/name}","releases_url":"https://api.github.com/repos/metastableBarrett/mixxx/releases{/id}","created_at":"2014-12-08T23:27:48Z","updated_at":"2014-12-08T23:27:56Z","pushed_at":"2015-01-31T17:47:04Z","git_url":"git://github.com/metastableBarrett/mixxx.git","ssh_url":"git@github.com:metastableBarrett/mixxx.git","clone_url":"https://github.com/metastableBarrett/mixxx.git","svn_url":"https://github.com/metastableBarrett/mixxx","homepage":"http://mixxx.org","size":233013,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mixxxdj:master","ref":"master","sha":"1927ac2472710d5be2d75f6d42bf3c3caedebc4a","user":{"login":"mixxxdj","id":1743769,"avatar_url":"https://avatars.githubusercontent.com/u/1743769?v=3","gravatar_id":"","url":"https://api.github.com/users/mixxxdj","html_url":"https://github.com/mixxxdj","followers_url":"https://api.github.com/users/mixxxdj/followers","following_url":"https://api.github.com/users/mixxxdj/following{/other_user}","gists_url":"https://api.github.com/users/mixxxdj/gists{/gist_id}","starred_url":"https://api.github.com/users/mixxxdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixxxdj/subscriptions","organizations_url":"https://api.github.com/users/mixxxdj/orgs","repos_url":"https://api.github.com/users/mixxxdj/repos","events_url":"https://api.github.com/users/mixxxdj/events{/privacy}","received_events_url":"https://api.github.com/users/mixxxdj/received_events","type":"Organization","site_admin":false},"repo":{"id":10126031,"name":"mixxx","full_name":"mixxxdj/mixxx","owner":{"login":"mixxxdj","id":1743769,"avatar_url":"https://avatars.githubusercontent.com/u/1743769?v=3","gravatar_id":"","url":"https://api.github.com/users/mixxxdj","html_url":"https://github.com/mixxxdj","followers_url":"https://api.github.com/users/mixxxdj/followers","following_url":"https://api.github.com/users/mixxxdj/following{/other_user}","gists_url":"https://api.github.com/users/mixxxdj/gists{/gist_id}","starred_url":"https://api.github.com/users/mixxxdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixxxdj/subscriptions","organizations_url":"https://api.github.com/users/mixxxdj/orgs","repos_url":"https://api.github.com/users/mixxxdj/repos","events_url":"https://api.github.com/users/mixxxdj/events{/privacy}","received_events_url":"https://api.github.com/users/mixxxdj/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mixxxdj/mixxx","description":"Mixxx is Free DJ software that gives you everything you need to perform live mixes.","fork":false,"url":"https://api.github.com/repos/mixxxdj/mixxx","forks_url":"https://api.github.com/repos/mixxxdj/mixxx/forks","keys_url":"https://api.github.com/repos/mixxxdj/mixxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mixxxdj/mixxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mixxxdj/mixxx/teams","hooks_url":"https://api.github.com/repos/mixxxdj/mixxx/hooks","issue_events_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/events{/number}","events_url":"https://api.github.com/repos/mixxxdj/mixxx/events","assignees_url":"https://api.github.com/repos/mixxxdj/mixxx/assignees{/user}","branches_url":"https://api.github.com/repos/mixxxdj/mixxx/branches{/branch}","tags_url":"https://api.github.com/repos/mixxxdj/mixxx/tags","blobs_url":"https://api.github.com/repos/mixxxdj/mixxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mixxxdj/mixxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mixxxdj/mixxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mixxxdj/mixxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/{sha}","languages_url":"https://api.github.com/repos/mixxxdj/mixxx/languages","stargazers_url":"https://api.github.com/repos/mixxxdj/mixxx/stargazers","contributors_url":"https://api.github.com/repos/mixxxdj/mixxx/contributors","subscribers_url":"https://api.github.com/repos/mixxxdj/mixxx/subscribers","subscription_url":"https://api.github.com/repos/mixxxdj/mixxx/subscription","commits_url":"https://api.github.com/repos/mixxxdj/mixxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mixxxdj/mixxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/comments/{number}","contents_url":"https://api.github.com/repos/mixxxdj/mixxx/contents/{+path}","compare_url":"https://api.github.com/repos/mixxxdj/mixxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mixxxdj/mixxx/merges","archive_url":"https://api.github.com/repos/mixxxdj/mixxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mixxxdj/mixxx/downloads","issues_url":"https://api.github.com/repos/mixxxdj/mixxx/issues{/number}","pulls_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls{/number}","milestones_url":"https://api.github.com/repos/mixxxdj/mixxx/milestones{/number}","notifications_url":"https://api.github.com/repos/mixxxdj/mixxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mixxxdj/mixxx/labels{/name}","releases_url":"https://api.github.com/repos/mixxxdj/mixxx/releases{/id}","created_at":"2013-05-17T15:14:38Z","updated_at":"2015-01-31T08:37:38Z","pushed_at":"2015-01-31T08:37:38Z","git_url":"git://github.com/mixxxdj/mixxx.git","ssh_url":"git@github.com:mixxxdj/mixxx.git","clone_url":"https://github.com/mixxxdj/mixxx.git","svn_url":"https://github.com/mixxxdj/mixxx","homepage":"http://mixxx.org","size":310855,"stargazers_count":227,"watchers_count":227,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":189,"mirror_url":null,"open_issues_count":37,"forks":189,"open_issues":37,"watchers":227,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/451"},"issue":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/451"},"comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/451/comments"},"review_comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451/comments"},"review_comment":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/451/commits"},"statuses":{"href":"https://api.github.com/repos/mixxxdj/mixxx/statuses/5089f54dda3a29cdd6138ffbe7694b4069cb2d82"}}}}