kkdai / youtube

Download Youtube Video in Golang
MIT License
3.3k stars 430 forks source link

fix 100mb download limit #301

Closed lidarbtc closed 1 year ago

lidarbtc commented 1 year ago

Description

Remove getmaxRoutines(and just return parameter)

func (c *Client) getMaxRoutines(limit int) int {
    routines := 10

    if c.MaxRoutines > 0 {
        routines = c.MaxRoutines
    }

    if limit > 0 && routines > limit {
        routines = limit
    }

    return routines
}

This function simply limits MaxRoutines to 10.

Since each chunk is 10MB, the maximum download size is limited to 100MB.

So I removed the download size limit by deleting the function.

Issues to fix

Please link issues this PR will fix:

298

Reminding

Something you can do before PR to reduce time to merge

corny commented 1 year ago

We should still respect the MaxRoutines setting to don't have more routines. Please try my branch fix-298