{"action":"created","comment":{"url":"https://api.github.com/repos/lhc70000/iina/pulls/comments/187953446","pull_request_review_id":119833160,"id":187953446,"diff_hunk":"@@ -443,6 +443,16 @@ class PlayerCore: NSObject {\n     sendOSD(.abLoop(info.abLoopStatus))\n   }\n \n+  func clearAbLoop() {\n+    if let resetOption = mpv.getString(MPVOption.ProgramBehavior.resetOnNextFile) {\n+        if resetOption.contains(MPVOption.PlaybackControl.abLoopA) &&\n+                   resetOption.contains(MPVOption.PlaybackControl.abLoopB) {","path":"iina/PlayerCore.swift","position":7,"original_position":7,"commit_id":"7bf4312be0cce89146a05289a7aadabb1d1ab724","original_commit_id":"7bf4312be0cce89146a05289a7aadabb1d1ab724","user":{"login":"lhc70000","id":8478049,"avatar_url":"https://avatars3.githubusercontent.com/u/8478049?v=4","gravatar_id":"","url":"https://api.github.com/users/lhc70000","html_url":"https://github.com/lhc70000","followers_url":"https://api.github.com/users/lhc70000/followers","following_url":"https://api.github.com/users/lhc70000/following{/other_user}","gists_url":"https://api.github.com/users/lhc70000/gists{/gist_id}","starred_url":"https://api.github.com/users/lhc70000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhc70000/subscriptions","organizations_url":"https://api.github.com/users/lhc70000/orgs","repos_url":"https://api.github.com/users/lhc70000/repos","events_url":"https://api.github.com/users/lhc70000/events{/privacy}","received_events_url":"https://api.github.com/users/lhc70000/received_events","type":"User","site_admin":false},"body":"There's no problem with this approach, but I still prefer checking whether the two loop points are set (and set info.abLoopStatus to 0, 1, or 2 accordingly), because it also handles the case where A-B loop status is loaded from watch_later file by mpv.","created_at":"2018-05-14T13:32:52Z","updated_at":"2018-05-14T13:32:55Z","html_url":"https://github.com/lhc70000/iina/pull/1604#discussion_r187953446","pull_request_url":"https://api.github.com/repos/lhc70000/iina/pulls/1604","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/lhc70000/iina/pulls/comments/187953446"},"html":{"href":"https://github.com/lhc70000/iina/pull/1604#discussion_r187953446"},"pull_request":{"href":"https://api.github.com/repos/lhc70000/iina/pulls/1604"}}},"pull_request":{"url":"https://api.github.com/repos/lhc70000/iina/pulls/1604","id":178716291,"html_url":"https://github.com/lhc70000/iina/pull/1604","diff_url":"https://github.com/lhc70000/iina/pull/1604.diff","patch_url":"https://github.com/lhc70000/iina/pull/1604.patch","issue_url":"https://api.github.com/repos/lhc70000/iina/issues/1604","number":1604,"state":"open","locked":false,"title":"Fix ab loop stays even when switching media files","user":{"login":"braineo","id":3591338,"avatar_url":"https://avatars1.githubusercontent.com/u/3591338?v=4","gravatar_id":"","url":"https://api.github.com/users/braineo","html_url":"https://github.com/braineo","followers_url":"https://api.github.com/users/braineo/followers","following_url":"https://api.github.com/users/braineo/following{/other_user}","gists_url":"https://api.github.com/users/braineo/gists{/gist_id}","starred_url":"https://api.github.com/users/braineo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braineo/subscriptions","organizations_url":"https://api.github.com/users/braineo/orgs","repos_url":"https://api.github.com/users/braineo/repos","events_url":"https://api.github.com/users/braineo/events{/privacy}","received_events_url":"https://api.github.com/users/braineo/received_events","type":"User","site_admin":false},"body":"- [ ] This change has been discussed with the author.\r\n- [x] It implements / fixes issue #917 .\r\n\r\n---\r\n\r\n**Description:**\r\n\r\nIt seems that mpv retains the status of ab loop even when switching files in playlist or play next/prev. Added clearing ab loop when a new files is loaded.","created_at":"2018-04-01T06:45:35Z","updated_at":"2018-05-14T13:32:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf623bdda557fd56649533fabd140df7b332b2b6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lhc70000/iina/pulls/1604/commits","review_comments_url":"https://api.github.com/repos/lhc70000/iina/pulls/1604/comments","review_comment_url":"https://api.github.com/repos/lhc70000/iina/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lhc70000/iina/issues/1604/comments","statuses_url":"https://api.github.com/repos/lhc70000/iina/statuses/7bf4312be0cce89146a05289a7aadabb1d1ab724","head":{"label":"braineo:fix_abloop","ref":"fix_abloop","sha":"7bf4312be0cce89146a05289a7aadabb1d1ab724","user":{"login":"braineo","id":3591338,"avatar_url":"https://avatars1.githubusercontent.com/u/3591338?v=4","gravatar_id":"","url":"https://api.github.com/users/braineo","html_url":"https://github.com/braineo","followers_url":"https://api.github.com/users/braineo/followers","following_url":"https://api.github.com/users/braineo/following{/other_user}","gists_url":"https://api.github.com/users/braineo/gists{/gist_id}","starred_url":"https://api.github.com/users/braineo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braineo/subscriptions","organizations_url":"https://api.github.com/users/braineo/orgs","repos_url":"https://api.github.com/users/braineo/repos","events_url":"https://api.github.com/users/braineo/events{/privacy}","received_events_url":"https://api.github.com/users/braineo/received_events","type":"User","site_admin":false},"repo":{"id":78350158,"name":"iina","full_name":"braineo/iina","owner":{"login":"braineo","id":3591338,"avatar_url":"https://avatars1.githubusercontent.com/u/3591338?v=4","gravatar_id":"","url":"https://api.github.com/users/braineo","html_url":"https://github.com/braineo","followers_url":"https://api.github.com/users/braineo/followers","following_url":"https://api.github.com/users/braineo/following{/other_user}","gists_url":"https://api.github.com/users/braineo/gists{/gist_id}","starred_url":"https://api.github.com/users/braineo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braineo/subscriptions","organizations_url":"https://api.github.com/users/braineo/orgs","repos_url":"https://api.github.com/users/braineo/repos","events_url":"https://api.github.com/users/braineo/events{/privacy}","received_events_url":"https://api.github.com/users/braineo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/braineo/iina","description":"The modern video player for macOS.","fork":true,"url":"https://api.github.com/repos/braineo/iina","forks_url":"https://api.github.com/repos/braineo/iina/forks","keys_url":"https://api.github.com/repos/braineo/iina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/braineo/iina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/braineo/iina/teams","hooks_url":"https://api.github.com/repos/braineo/iina/hooks","issue_events_url":"https://api.github.com/repos/braineo/iina/issues/events{/number}","events_url":"https://api.github.com/repos/braineo/iina/events","assignees_url":"https://api.github.com/repos/braineo/iina/assignees{/user}","branches_url":"https://api.github.com/repos/braineo/iina/branches{/branch}","tags_url":"https://api.github.com/repos/braineo/iina/tags","blobs_url":"https://api.github.com/repos/braineo/iina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/braineo/iina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/braineo/iina/git/refs{/sha}","trees_url":"https://api.github.com/repos/braineo/iina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/braineo/iina/statuses/{sha}","languages_url":"https://api.github.com/repos/braineo/iina/languages","stargazers_url":"https://api.github.com/repos/braineo/iina/stargazers","contributors_url":"https://api.github.com/repos/braineo/iina/contributors","subscribers_url":"https://api.github.com/repos/braineo/iina/subscribers","subscription_url":"https://api.github.com/repos/braineo/iina/subscription","commits_url":"https://api.github.com/repos/braineo/iina/commits{/sha}","git_commits_url":"https://api.github.com/repos/braineo/iina/git/commits{/sha}","comments_url":"https://api.github.com/repos/braineo/iina/comments{/number}","issue_comment_url":"https://api.github.com/repos/braineo/iina/issues/comments{/number}","contents_url":"https://api.github.com/repos/braineo/iina/contents/{+path}","compare_url":"https://api.github.com/repos/braineo/iina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/braineo/iina/merges","archive_url":"https://api.github.com/repos/braineo/iina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/braineo/iina/downloads","issues_url":"https://api.github.com/repos/braineo/iina/issues{/number}","pulls_url":"https://api.github.com/repos/braineo/iina/pulls{/number}","milestones_url":"https://api.github.com/repos/braineo/iina/milestones{/number}","notifications_url":"https://api.github.com/repos/braineo/iina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/braineo/iina/labels{/name}","releases_url":"https://api.github.com/repos/braineo/iina/releases{/id}","deployments_url":"https://api.github.com/repos/braineo/iina/deployments","created_at":"2017-01-08T15:03:13Z","updated_at":"2017-01-08T15:03:14Z","pushed_at":"2018-05-13T14:28:54Z","git_url":"git://github.com/braineo/iina.git","ssh_url":"git@github.com:braineo/iina.git","clone_url":"https://github.com/braineo/iina.git","svn_url":"https://github.com/braineo/iina","homepage":"https://lhc70000.github.io/iina/","size":131098,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lhc70000:develop","ref":"develop","sha":"248a1f23ec19f6a2166c443d626521ad193d7510","user":{"login":"lhc70000","id":8478049,"avatar_url":"https://avatars3.githubusercontent.com/u/8478049?v=4","gravatar_id":"","url":"https://api.github.com/users/lhc70000","html_url":"https://github.com/lhc70000","followers_url":"https://api.github.com/users/lhc70000/followers","following_url":"https://api.github.com/users/lhc70000/following{/other_user}","gists_url":"https://api.github.com/users/lhc70000/gists{/gist_id}","starred_url":"https://api.github.com/users/lhc70000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhc70000/subscriptions","organizations_url":"https://api.github.com/users/lhc70000/orgs","repos_url":"https://api.github.com/users/lhc70000/repos","events_url":"https://api.github.com/users/lhc70000/events{/privacy}","received_events_url":"https://api.github.com/users/lhc70000/received_events","type":"User","site_admin":false},"repo":{"id":76838017,"name":"iina","full_name":"lhc70000/iina","owner":{"login":"lhc70000","id":8478049,"avatar_url":"https://avatars3.githubusercontent.com/u/8478049?v=4","gravatar_id":"","url":"https://api.github.com/users/lhc70000","html_url":"https://github.com/lhc70000","followers_url":"https://api.github.com/users/lhc70000/followers","following_url":"https://api.github.com/users/lhc70000/following{/other_user}","gists_url":"https://api.github.com/users/lhc70000/gists{/gist_id}","starred_url":"https://api.github.com/users/lhc70000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhc70000/subscriptions","organizations_url":"https://api.github.com/users/lhc70000/orgs","repos_url":"https://api.github.com/users/lhc70000/repos","events_url":"https://api.github.com/users/lhc70000/events{/privacy}","received_events_url":"https://api.github.com/users/lhc70000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lhc70000/iina","description":"The modern video player for macOS.","fork":false,"url":"https://api.github.com/repos/lhc70000/iina","forks_url":"https://api.github.com/repos/lhc70000/iina/forks","keys_url":"https://api.github.com/repos/lhc70000/iina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lhc70000/iina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lhc70000/iina/teams","hooks_url":"https://api.github.com/repos/lhc70000/iina/hooks","issue_events_url":"https://api.github.com/repos/lhc70000/iina/issues/events{/number}","events_url":"https://api.github.com/repos/lhc70000/iina/events","assignees_url":"https://api.github.com/repos/lhc70000/iina/assignees{/user}","branches_url":"https://api.github.com/repos/lhc70000/iina/branches{/branch}","tags_url":"https://api.github.com/repos/lhc70000/iina/tags","blobs_url":"https://api.github.com/repos/lhc70000/iina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lhc70000/iina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lhc70000/iina/git/refs{/sha}","trees_url":"https://api.github.com/repos/lhc70000/iina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lhc70000/iina/statuses/{sha}","languages_url":"https://api.github.com/repos/lhc70000/iina/languages","stargazers_url":"https://api.github.com/repos/lhc70000/iina/stargazers","contributors_url":"https://api.github.com/repos/lhc70000/iina/contributors","subscribers_url":"https://api.github.com/repos/lhc70000/iina/subscribers","subscription_url":"https://api.github.com/repos/lhc70000/iina/subscription","commits_url":"https://api.github.com/repos/lhc70000/iina/commits{/sha}","git_commits_url":"https://api.github.com/repos/lhc70000/iina/git/commits{/sha}","comments_url":"https://api.github.com/repos/lhc70000/iina/comments{/number}","issue_comment_url":"https://api.github.com/repos/lhc70000/iina/issues/comments{/number}","contents_url":"https://api.github.com/repos/lhc70000/iina/contents/{+path}","compare_url":"https://api.github.com/repos/lhc70000/iina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lhc70000/iina/merges","archive_url":"https://api.github.com/repos/lhc70000/iina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lhc70000/iina/downloads","issues_url":"https://api.github.com/repos/lhc70000/iina/issues{/number}","pulls_url":"https://api.github.com/repos/lhc70000/iina/pulls{/number}","milestones_url":"https://api.github.com/repos/lhc70000/iina/milestones{/number}","notifications_url":"https://api.github.com/repos/lhc70000/iina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lhc70000/iina/labels{/name}","releases_url":"https://api.github.com/repos/lhc70000/iina/releases{/id}","deployments_url":"https://api.github.com/repos/lhc70000/iina/deployments","created_at":"2016-12-19T07:18:45Z","updated_at":"2018-05-14T13:13:05Z","pushed_at":"2018-05-14T10:58:10Z","git_url":"git://github.com/lhc70000/iina.git","ssh_url":"git@github.com:lhc70000/iina.git","clone_url":"https://github.com/lhc70000/iina.git","svn_url":"https://github.com/lhc70000/iina","homepage":"https://lhc70000.github.io/iina/","size":160469,"stargazers_count":11890,"watchers_count":11890,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":919,"mirror_url":null,"archived":false,"open_issues_count":516,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":919,"open_issues":516,"watchers":11890,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/lhc70000/iina/pulls/1604"},"html":{"href":"https://github.com/lhc70000/iina/pull/1604"},"issue":{"href":"https://api.github.com/repos/lhc70000/iina/issues/1604"},"comments":{"href":"https://api.github.com/repos/lhc70000/iina/issues/1604/comments"},"review_comments":{"href":"https://api.github.com/repos/lhc70000/iina/pulls/1604/comments"},"review_comment":{"href":"https://api.github.com/repos/lhc70000/iina/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lhc70000/iina/pulls/1604/commits"},"statuses":{"href":"https://api.github.com/repos/lhc70000/iina/statuses/7bf4312be0cce89146a05289a7aadabb1d1ab724"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lhc70000"}}