Base logic for sorting playlist
fix crash on add folder containing unsupported file