Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

searching for tracks considers the search pattern in filenames too #818

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jensgoe
Copy link

@jensgoe jensgoe commented Sep 18, 2016

Searching for tracks currently uses the MPD search command with type "any". The type "any" only considers tags like id3 or something. The type "filename" is a special type not included by "any". This pull request allows MPDroid to find files with the matching search pattern in filenames too.


try {
arrayMusic = mApp.oMPDAsyncHelper.oMPD.search("any", finalSearch);
} catch (final IOException | MPDException e) {
Log.e(TAG, "MPD search failure.", e);

}

if (arrayMusic == null) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it returns here you don't get the chance to match the filename ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats right, but i thought arrayMusic is only null if an error occured (exception catched) and i don't wanted to do another search in that case. arrayMusic should be an empty list if nothing was found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants