mpgirro / stalla

A Kotlin and Java library for RSS podcast feeds
https://stalla.dev
BSD 3-Clause "New" or "Revised" License
26 stars 5 forks source link

Podcast Pingback namespace support #84

Open mpgirro opened 3 years ago

mpgirro commented 3 years ago

Podcast Pingback is a method for reporting listening activity back to a podcast publisher. The namespace is https://podping.info/specification/1.

Examples:

<channel>
  <pingback:receiver>pingback-receiving-server</pingback:receiver>
</channel>
<item>
  <pingback:receiver>pingback-receiving-server</pingback:receiver>
</item>

The latest analysis results show that 1,2% of feeds declare the receiver element in the <channel> and < 0,0% in an <item>.

rock3r commented 3 years ago

and < 0,0% in an <item>.

Is this correct? Sounds odd :)

mpgirro commented 3 years ago

I'm afraid it's correct. Had the glorious idea to use this formatting rule:

when (percentage) {
    0.0 -> "0"
    100.0 -> "100"
    else -> percentage.round(1)
} + "%"

So we only know that 0% < frequency < 0,1% for receiver 😅

mpgirro commented 3 years ago

Ok, now that I've written this, I should have used < 0,1% in the first place...

rock3r commented 3 years ago

Ahaha yeah would've been a bit clearer, but that's ok, thanks for explaining :)