Skip to content

Commit

Permalink
Merge pull request #106 from aghontpi/update-spotify-detections
Browse files Browse the repository at this point in the history
Update spotify detections, add spotify detection for "Catalan" lang and others
  • Loading branch information
aghontpi authored Oct 9, 2023
2 parents 2e336d3 + c6b55aa commit f6801a6
Show file tree
Hide file tree
Showing 6 changed files with 1,225 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
applicationId "bluepie.ad_silence"
minSdk 21
targetSdk 33
versionCode 43
versionCode 46
versionName "0.6.1-dev"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/java/bluepie/ad_silence/NotificationParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ fun AppNotification.adString(): List<String> {
context.getString(R.string.spotify_ad2),
*spotifyTrigger
)

SupportedApps.TIDAL -> listOf(context.getString(R.string.tidal_ad_string))
SupportedApps.PANDORA -> listOf(
context.getString(R.string.pandora_ad_string),
context.getString(R.string.pandora_ad_string_2)
)

SupportedApps.LiveOne -> listOf(
context.getString(R.string.liveOne_ad_string),
context.getString(R.string.liveOne_ad_string_2)
)

else -> listOf("")
}
}
Expand Down Expand Up @@ -142,7 +145,12 @@ class NotificationParser(override var appNotification: AppNotification) :

var isAd = false
this.appNotification.notification.extras?.get("android.title").toString().run {
Log.v(TAG, "trying match against \"$this\" with ${appNotification.adString().take(40)}")
Log.v(
TAG,
"trying match against \"$this\" with ${
appNotification.adString().take(10)
}...refer app/src/main/java/bluepie/ad_silence/triggers/Spotify.kt in source (ie) github"
)
for (adString in appNotification.adString()) {
if (this == adString) {
Log.v(TAG, "detection in Spotify: $adString")
Expand Down
33 changes: 26 additions & 7 deletions app/src/main/java/bluepie/ad_silence/triggers/Spotify.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,48 @@ val spotifyTrigger = arrayOf(
"Advertensie",
"ማስታወቂያ",
"إعلان",
"إعلان",
"إشهار",
"الإعلانات",
"Reklam",
"Реклама",
"বিজ্ঞাপন",
"Oglas",
"Anunci",
"Reklama",
"Reklame",
"Werbung",
"Διαφήμιση",
"Advertisement",
"Anuncio",
"Anuncio",
"Publicidad",
"Anuncio",
"Reklaam",
"آگهی",
"Iragarkia",
"تبلیغ",
"Mainos",
"Annonce",
"Publicité",
"Publicidade",
"જાહેરાત",
"विज्ञापन",
"Oglasi",
"Oglas",
"Reklám",
"Iklan",
"Auglýsing",
"Pubblicità",
"פרסומת",
"広告",
"ಜಾಹೀರಾತುಗಳು",
"ಜಾಹೀರಾತು",
"광고",
"Reklama",
"Reklāma",
"Реклама",
"പരസ്യം",
"जाहिरात",
"Iklan",
"آگهی",
"تبلیغ",
"Annonser",
"विज्ञापन",
"Advertentie",
Expand All @@ -46,7 +57,7 @@ val spotifyTrigger = arrayOf(
"Reklama",
"Anúncio",
"Publicidade",
"Reclamă",
"Anunț",
"Реклама",
"Reklama",
"Oglas",
Expand All @@ -69,20 +80,27 @@ val spotifyTrigger = arrayOf(
"Jou liedjie gaan na hierdie kort boodskap speel",
"ሙዚቃዎ ከዚህ አጭር መልዕክት በኋላ ይጫወታል",
"ستبدأ بالاستماع إلى أغنيتك بعد هذه الرسالة القصيرة",
"أغنيتك هتشتغل بعد الرسالة القصيرة دي",
"أغنيتك غادي تخدم من بعد هاد الرسالة القصير",
"أغنيتك رح تشتغل بعد هذه الرسالة القصيرة",
"Mahnın bu qısa mesajdan sonra oxudulacaq",
"Песента ви ще се пусне след това кратко съобщение",
"আপনার গানটি এই সংক্ষিপ্ত বার্তার পরে চলবে",
"Pjesma će se reproducirati nakon ove kratke poruke",
"Skladba se přehraje po této krátké zprávě.",
"Din sang afspilles efter denne korte meddelelse",
"Deinen Song hörst du nach dieser kurzen Botschaft.",
"Το τραγούδι σου θα ξεκινήσει μετά από αυτό το σύντομο μήνυμα",
"Your song will play after this short message",
"Tu canción se reproducirá después de este breve mensaje",
"Tu canción sonará tras este breve mensaje.",
"Sinu laul esitatakse pärast seda lühisõnumit",
"Mezu labur honen ondoren erreproduzituko da abestia",
"آهنگ شما بعد از این پیام کوتاه پخش خواهد شد",
"Kappale soi tämän lyhyen viestin jälkeen",
"Votre titre se lancera après cette courte pub",
"Nous ferons jouer votre chanson après ce court message",
"A canción reproducirase despois desta breve mensaxe",
"તમારું ગીત આ ટૂંકા સંદેશ પછી વાગશે",
"आपका गाना इस छोटे से संदेश के बाद चलेगा",
"Vaša pjesma reproducirat će se nakon ove kratke poruke",
Expand All @@ -96,6 +114,7 @@ val spotifyTrigger = arrayOf(
"짧은 광고 후에 곡이 재생됩니다.",
"Daina bus paleista po šio trumpo pranešimo",
"Tava dziesma tiks atskaņota pēc īsas ziņas",
"Песната ќе се пушти по краткава порака",
"ഈ ഹ്രസ്വ സന്ദേശത്തിന് ശേഷം നിങ്ങളുടെ ഗാനം പ്ലേ ചെയ്യും",
"या छोट्याशा संदेशानंतर तुमचे गाणे प्ले केले जाईल",
"Lagu anda akan dimainkan selepas pesanan ringkas ini",
Expand All @@ -119,13 +138,13 @@ val spotifyTrigger = arrayOf(
"இந்தக் குறுகிய செய்திக்குப் பிறகு உங்கள் பாடல் பிளே ஆகும்",
"ఈ చిన్న సందేశం తర్వాత మీ పాట ప్లే అవుతుంది",
"เพลงของคุณจะเล่นหลังสิ้นสุดข้อความสั้นๆ นี้",
"Magpe-play ang kanta mo pagkatapos ng patalastas na 'to",
"\"Magpe-play ang kanta mo pagkatapos ng patalastas na 'to\"",
"Şarkın bu kısa mesajdan sonra çalacak",
"Пісня відтвориться після цього короткого повідомлення",
"آپ کا گانا اس مختصر میسج کے بعد پلے ہوگا",
"Bài hát của bạn sẽ phát sau thông điệp ngắn này",
"你的歌曲将在此短信送达后播放",
"你的歌曲將在這則簡短訊息後播放",
"你的歌曲會在此簡短訊息結束後播放",
"你的歌曲將在這則簡短訊息後播放",
"Ingoma yakho izodlala ngemva kwalo myalezo omfushane",
);
Loading

0 comments on commit f6801a6

Please sign in to comment.