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

Use DuckDuckGo for search and fix typo in remove history dialogue #37

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class MusicActivity : AppCompatActivity() {

binding.searchMaterialButton.setOnClickListener {
try {
val uri = Uri.parse("https://www.google.com/search?q=${music.createSearchQuery()}")
val uri = Uri.parse("https://www.duckduckgo.com/?q=${music.createSearchQuery()}")
val intent = Intent(Intent.ACTION_VIEW, uri)
startActivity(intent)
} catch (e: Throwable) {
Expand Down Expand Up @@ -125,4 +125,4 @@ class MusicActivity : AppCompatActivity() {
}
}

fun Music.createSearchQuery() = "$title $artists ${year ?: ""} ${album ?: ""}"
fun Music.createSearchQuery() = "$title $artists ${year ?: ""} ${album ?: ""}"
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<string name="no_search_results">Nothing like that was found</string>
<string name="ok">OK</string>
<string name="privacy">Privacy</string>
<string name="remove_history_item_message">Do you want to \"%1$s\" from the history?</string>
<string name="remove_history_item_message">Do you want to remove \"%1$s\" from the history?</string>
<string name="remove_history_item_title">Remove</string>
<string name="search">Search</string>
<string name="settings">Settings</string>
Expand Down
Loading