Skip to content

new way of detecting ads in Spotify#64

Merged
aghontpi merged 6 commits into
masterfrom
63-new-ad-detection-spotify
Jul 13, 2022
Merged

new way of detecting ads in Spotify#64
aghontpi merged 6 commits into
masterfrom
63-new-ad-detection-spotify

Conversation

@aghontpi

@aghontpi aghontpi commented Jul 5, 2022

Copy link
Copy Markdown
Owner

refer #63

Test out new ad detection for Spotify.

On top of the existing detections, added new logic to detect ads, if the old logic does not catch the ads, the new logic is activated.

did not remove old detection because that might cause bugs/unexpected behaviour in existing flow.

closes #63

@aghontpi

aghontpi commented Jul 5, 2022

Copy link
Copy Markdown
Owner Author

@aghontpi aghontpi changed the title update ad detection for spotify new way of detecting ads in Spotify Jul 5, 2022
@aghontpi

aghontpi commented Jul 5, 2022

Copy link
Copy Markdown
Owner Author

@citizenserious can you test the above build.

this only has a slight chance of working...but I have added logs that will help us find the thing we need.

in the logcat, filter with [new detection]and share it.

@aghontpi

aghontpi commented Jul 5, 2022

Copy link
Copy Markdown
Owner Author

@citizenserious

Copy link
Copy Markdown

@aghontpi I tested 34 with different podcasts and languages. As far as I can tell it works perfectly. I installed 36 know, and will do the same.

@citizenserious

Copy link
Copy Markdown

@aghontpi also build 36 works great. Mutes all ads in my case. Awesome!

@aghontpi

aghontpi commented Jul 6, 2022

Copy link
Copy Markdown
Owner Author

@citizenserious thank you soo much for testing.
just testing build 36 is fine, sorry I did not mention this earlier.

kindly share a logcat, after you get an ad of the following type.

Screenshot 2022-07-06 at 4 33 48 PM

In the mean time, I'll also continue testing with this build.

@citizenserious

citizenserious commented Jul 6, 2022

Copy link
Copy Markdown

@aghontpi no problem I was already testing build 34 before you shared the other builds.

I would share the log, but I don't know how to right now, I am sorry. If you could explain it real quick, that would be nice (:

Edit: I looked up logcat, is there a way to do it without a computer? My device is rooted btw.

@aghontpi

aghontpi commented Jul 6, 2022

Copy link
Copy Markdown
Owner Author

@citizenserious

citizenserious commented Jul 6, 2022

Copy link
Copy Markdown

@aghontpi
logcat.txt

@aghontpi

aghontpi commented Jul 6, 2022

Copy link
Copy Markdown
Owner Author

@citizenserious thanks, I was able to update the logic.

the following build should be more accurate I believe. kindly update to this.

(rename to .apk restrictions in GitHub comments)
ad-silence-test-build-37.zip

@citizenserious

citizenserious commented Jul 6, 2022

Copy link
Copy Markdown

@citizenserious thanks, I was able to update the logic.

the following build should be more accurate I believe. kindly update to this.

(rename to .apk restrictions in GitHub comments) ad-silence-test-build-37.zip

I tested it again, the new build misses the ad I attached below. I also added the logcat again. "Werbung von Gerolsteiner" means translated "Advertisement from Gerolsteiner"

1
2
logcat.txt
.
logcat 1.txt

both logs were taken while the Gerolsteiner ad was playing, with an ad for another podcast in between. It seems like the ad doesn't even appear in the log if I am not wrong. That is why I took a second logcat to make sure I didn't missed it somehow.

@aghontpi

aghontpi commented Jul 7, 2022

Copy link
Copy Markdown
Owner Author

@citizenserious, yea, it does not seem to appear.
MatLog clears the log buffer, when it reaches the limit 🤔

maybe try the record option, because it is highly unlikely that Spotify does not update the notification...
try it in your free time and also thanks for testing!.

@citizenserious

citizenserious commented Jul 7, 2022

Copy link
Copy Markdown

@aghontpi You were right (: I caught it with the recording
logcat.txt
.

@aghontpi

aghontpi commented Jul 8, 2022

Copy link
Copy Markdown
Owner Author

@citizenserious thanks so much.

for this ad, even artist name is not Spotify, it is Werbung von Gerolsteiner

[spotify notification][new detection] Bundle[{android.title=Werbung von Gerolsteiner, android.reduced.images=true, android.subText=Werbung von Gerolsteiner, android.template=android.app.Notification$MediaStyle, android.showChronometer=false, android.text=,...

only option is to regex match the word "Advertisement"/ "Werbung" - translated

We already have it here, but we do exact match. I'll update it to check if title & subtitle contains any keywords..hopefully it does not cause other issues.

this only seems to occur in podcasts 🤔

@aghontpi

aghontpi commented Jul 8, 2022

Copy link
Copy Markdown
Owner Author

(rename to .apk restrictions in GitHub comments)
ad-silence-test-build-38.zip

@citizenserious

Copy link
Copy Markdown

(rename to .apk restrictions in GitHub comments) ad-silence-test-build-38.zip

@aghontpi works perfectly (: thank you so much, if you need another logcat, just let me know.

@aghontpi

Copy link
Copy Markdown
Owner Author

Thank you @citizenserious

@aghontpi aghontpi merged commit b25e915 into master Jul 13, 2022
@aghontpi aghontpi deleted the 63-new-ad-detection-spotify branch July 13, 2022 16:46
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.

New way of ad detection [Spotify]

2 participants