Podcast scrobbling

This commit is contained in:
2023-12-02 13:55:22 +11:00
parent c0c50bc107
commit 731529ddb5
8 changed files with 203 additions and 118 deletions

View File

@@ -0,0 +1,20 @@
module Adamantium
module Repos
class PodcastScrobbleRepo < Adamantium::Repo[:podcast_scrobbles]
commands :create
def exists?(id:)
!!podcast_scrobbles
.where(overcast_id: id)
.one
end
def listing
podcast_scrobbles
.order(Sequel.desc(:listened_at))
.limit(5)
.to_a
end
end
end
end