Optimized the function to download albums