Skip to content

Commit

Permalink
Merge pull request #37 from cortadocodes/use-duckduckgo-for-search
Browse files Browse the repository at this point in the history
Use DuckDuckGo for search and fix typo in remove history dialogue
  • Loading branch information
alexmercerind authored Sep 6, 2024
2 parents f5b8e02 + d637b9b commit a539c34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit a539c34

Please sign in to comment.