Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. 1) Consider a directory structure like
  2. dir/playlists/main/*.m3u
  3. /modules/*.m3u
  4. /(mp3s/subplaylists)/name/{*.mp3}
  5.  
  6. in order to have a cleaner walk of
  7. for (root, subdir, files) in dir/subplaylists/:
  8. glob mp3's (no if needed?, consider just iterating instead of doing a full walk as now you dont have to with this structure)
  9. all the other work.
  10.  
  11. 2) Open the main m3u's prior to the walk, keep them open until you finish the walk (cheddar, main, Vocaloid, Idol, Touistu, Lucky lotus)
  12. This lessesn the load on the filesystem for opening and closing a shitload of files.
  13. Also removes the million try/catch to one set outside the walk.
  14.  
  15. Das it mang
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement