{"action":"created","issue":{"url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl/issues/12","repository_url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl","labels_url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl/issues/12/comments","events_url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl/issues/12/events","html_url":"https://github.com/codezjx/netease-cloud-music-dl/pull/12","id":253151189,"number":12,"title":"downloader: fix invalid chars in album/artist name","user":{"login":"weakish","id":114114,"avatar_url":"https://avatars1.githubusercontent.com/u/114114?v=4","gravatar_id":"","url":"https://api.github.com/users/weakish","html_url":"https://github.com/weakish","followers_url":"https://api.github.com/users/weakish/followers","following_url":"https://api.github.com/users/weakish/following{/other_user}","gists_url":"https://api.github.com/users/weakish/gists{/gist_id}","starred_url":"https://api.github.com/users/weakish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weakish/subscriptions","organizations_url":"https://api.github.com/users/weakish/orgs","repos_url":"https://api.github.com/users/weakish/repos","events_url":"https://api.github.com/users/weakish/events{/privacy}","received_events_url":"https://api.github.com/users/weakish/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-27T09:06:02Z","updated_at":"2017-08-28T03:49:45Z","closed_at":"2017-08-28T03:49:45Z","pull_request":{"url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl/pulls/12","html_url":"https://github.com/codezjx/netease-cloud-music-dl/pull/12","diff_url":"https://github.com/codezjx/netease-cloud-music-dl/pull/12.diff","patch_url":"https://github.com/codezjx/netease-cloud-music-dl/pull/12.patch"},"body":"If the name of an artist, an album\ncontains the forward slash character, a.k.a. `/`,\nncm will failed to create the directory to save the download file\nand will abort its execution with an exception.\n\nFor example, the album `雨のち晴れ / What's your name?`\ncontains `/`, which is forbidden in unix systems.\n\nhttps://music.163.com/#/album?id=2569036\n\nCommit `cd3d043` replaces some special characters with white space\nin track name,\nbut does not replace special characters in album and artist names.\n\nThis commit fix this issue by also replacing special characters\nin album and artist names.\n\nRelated issue: #7\n\n---\n ncm/downloader.py | 20 ++++++++++++++++----\n 1 file changed, 16 insertions(+), 4 deletions(-)"},"comment":{"url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl/issues/comments/325253765","html_url":"https://github.com/codezjx/netease-cloud-music-dl/pull/12#issuecomment-325253765","issue_url":"https://api.github.com/repos/codezjx/netease-cloud-music-dl/issues/12","id":325253765,"user":{"login":"weakish","id":114114,"avatar_url":"https://avatars1.githubusercontent.com/u/114114?v=4","gravatar_id":"","url":"https://api.github.com/users/weakish","html_url":"https://github.com/weakish","followers_url":"https://api.github.com/users/weakish/followers","following_url":"https://api.github.com/users/weakish/following{/other_user}","gists_url":"https://api.github.com/users/weakish/gists{/gist_id}","starred_url":"https://api.github.com/users/weakish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weakish/subscriptions","organizations_url":"https://api.github.com/users/weakish/orgs","repos_url":"https://api.github.com/users/weakish/repos","events_url":"https://api.github.com/users/weakish/events{/privacy}","received_events_url":"https://api.github.com/users/weakish/received_events","type":"User","site_admin":false},"created_at":"2017-08-28T03:49:45Z","updated_at":"2017-08-28T03:49:45Z","body":"> Why do not use the regular expression\r\n\r\nNo particular reason. `str.replace` is usually easier to understand and maintain, and faster.\r\nSo I tend to prefer `str.replace` when possible.\r\nRethinking for this function, I realized that\r\nthe regex is not complex, and the performance loss, if it exists, will be marginal.\r\nSo the original `re.sub` does not need to be refactored to `str.replace`.\r\n\r\n> `-hot/-a/-p` options.\r\n\r\nI forgot about them.\r\n\r\n> a commit to fix \r\n\r\nThe commit already includes the functions provided by this pull request.\r\nSo I will close it.\r\n\r\nThanks for your project.\r\nI have been listening a lot of NetEase Cloud music,\r\nand the official web/desktop client does not satisfies my requirements.\r\nThis project helps me a lot."}}
{"actor":{"display_login":"weakish"}}