Fixed resource leak.
Support setting shuffle/repeat status.