Fixed a bug that cause search result to include playlists.

- This will cause insert_duration to fail.
- Removed some redundant operations