{"action":"created","comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/24301061","id":24301061,"diff_hunk":"@@ -308,8 +310,22 @@ void AutoDJFeature::slotAddRandomTrack(bool) {\n         retriveAttempts += 1;\n     }\n \n-    if (retriveAttempts == kMaxRetiveAttempts)\n-        qDebug () << \"Could Not Load Random Tracks\";\n+    if (retriveAttempts == kMaxRetiveAttempts || iTrackId == -1) {\n+        qDebug () << \"Could Not Load Random Tracks From Crate.\"\n+    \t        \" Attempting to load from library\";\n+    \tiTrackId = m_autoDjCratesDao.getRandomTrackIdFromLibrary();","path":"src/library/autodj/autodjfeature.cpp","position":44,"original_position":44,"commit_id":"475211eda6c747af66dfa1d36bee42dc860b6223","original_commit_id":"475211eda6c747af66dfa1d36bee42dc860b6223","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":"You have implemented a backup path for the case when m_autoDjCratesDao.getRandomTrackId() fails. Why not ..\r\nThis will work for me as well and reduced the complexity a lot. \r\n ","created_at":"2015-02-08T18:52:39Z","updated_at":"2015-02-08T18:52:39Z","html_url":"https://github.com/mixxxdj/mixxx/pull/468#discussion_r24301061","pull_request_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468","_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/24301061"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/468#discussion_r24301061"},"pull_request":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468"}}},"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468","id":27900428,"html_url":"https://github.com/mixxxdj/mixxx/pull/468","diff_url":"https://github.com/mixxxdj/mixxx/pull/468.diff","patch_url":"https://github.com/mixxxdj/mixxx/pull/468.patch","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/468","number":468,"state":"open","locked":false,"title":"Auto-DJ Random Tracks From Library","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":"This commit attempts to enable autoDj to addRandom tracks from library incase the crates are empty . This is done by calling the   m_autoDjCratesDao.getRandomTrackFromLibrary() from within AutoDJFeature::slotAddRandomTrack(bool) .","created_at":"2015-01-23T04:19:16Z","updated_at":"2015-02-08T18:52:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6c74abecbb19bdf6991a31521e5d0a88fb3a2f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468/commits","review_comments_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468/comments","review_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/468/comments","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/475211eda6c747af66dfa1d36bee42dc860b6223","head":{"label":"metastableBarrett:ADjAddRandomFromLib","ref":"ADjAddRandomFromLib","sha":"475211eda6c747af66dfa1d36bee42dc860b6223","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":"2015-02-01T16:50:19Z","pushed_at":"2015-02-08T13:54:22Z","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":236921,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"5d4f9a7f0f6a96d584f97bd572e943c043ffde10","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-02-07T18:37:08Z","pushed_at":"2015-02-07T18:37:08Z","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":312307,"stargazers_count":233,"watchers_count":233,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":189,"mirror_url":null,"open_issues_count":39,"forks":189,"open_issues":39,"watchers":233,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/468"},"issue":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/468"},"comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/468/comments"},"review_comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468/comments"},"review_comment":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/468/commits"},"statuses":{"href":"https://api.github.com/repos/mixxxdj/mixxx/statuses/475211eda6c747af66dfa1d36bee42dc860b6223"}}}}