Slyyxp / BugsPy

BugsPy is a tool for downloading streamable tracks from Bugs.co.kr
24 stars 8 forks source link

Date is wrongly tagged #18

Closed awsms closed 3 years ago

awsms commented 3 years ago

This is for the specific case "YEAR.X?.X?"

for example, date on bugs is "1991.10.01" or "1991.11(.00)", the files will be tagged "1991.01.01"

Slyyxp commented 3 years ago

Will look into this, sample url would be appreciated.

awsms commented 3 years ago

Here is an url sample: https://music.bugs.co.kr/album/8000601

Slyyxp commented 3 years ago

This is caused by datetime misinterpreting 201212 as 20120102. I have appended the first day of the month to dates without a day, this isn't done using the datetime module but rather just checking if the length is equal to 6 as that should be the length of all dayless timestamps.

Additional note: I am open to PR's solving this with the datetime module.

Closed with https://github.com/Slyyxp/BugsPy/commit/021dd6eb856eea68b93b7d3b00aee59f1d7d851b.