Liking cljdoc? Tell your friends :D

dk.simongray.podcast.profile.queue

The queue, the inbox and the playlists of a profile, and what the new episodes of a feed do to them.

The queue and the playlists are ordered collections of mind-meld, so the devices agree on their order, and a move never brings back an episode that another device took out. A playlist is kept beside the queue, and goes out as a list feed of the podcast namespace.

The queue, the inbox and the playlists of a profile, and what the new
episodes of a feed do to them.

The queue and the playlists are ordered collections of mind-meld, so the
devices agree on their order, and a move never brings back an episode
that another device took out. A playlist is kept beside the queue, and
goes out as a list feed of the podcast namespace.
raw docstring

add-to-playlistclj/s

(add-to-playlist profile name id at)

Put the episode id at the end of the playlist name of profile at at, unless the playlist holds it.

Put the episode `id` at the end of the playlist `name` of `profile` at
`at`, unless the playlist holds it.
sourceraw docstring

advanceclj/s

(advance profile at)

Drop the current episode from the queue of profile at at, so that the next one is current.

Drop the current episode from the queue of `profile` at `at`, so that the
next one is current.
sourceraw docstring

currentclj/s

(current profile)

The episode id at the front of the queue of profile, or nil when it's empty.

The episode id at the front of the queue of `profile`, or nil when it's
empty.
sourceraw docstring

dequeueclj/s

(dequeue profile id at)

Take the episode id out of the queue of profile at at, leaving a tombstone, so that it outlives an older addition on another device.

Take the episode `id` out of the queue of `profile` at `at`, leaving a
tombstone, so that it outlives an older addition on another device.
sourceraw docstring

dequeue-allclj/s

(dequeue-all profile ids at)

Take the episodes ids out of the queue of profile at at with one stamp, leaving tombstones, e.g. (queue profile) to clear it.

Take the episodes `ids` out of the queue of `profile` at `at` with one
stamp, leaving tombstones, e.g. (queue profile) to clear it.
sourceraw docstring

dismissclj/s

(dismiss profile id at)

Take the episode id out of the inbox of profile at at, leaving a tombstone.

Take the episode `id` out of the inbox of `profile` at `at`, leaving a
tombstone.
sourceraw docstring

dismiss-allclj/s

(dismiss-all profile ids at)

Take the episodes ids out of the inbox of profile at at with one stamp, e.g. all of the inbox, leaving tombstones.

Take the episodes `ids` out of the inbox of `profile` at `at` with one
stamp, e.g. all of the inbox, leaving tombstones.
sourceraw docstring

enqueueclj/s

(enqueue profile id at)

Put the episode id at the end of the queue of profile at at, unless it is in the queue.

Put the episode `id` at the end of the queue of `profile` at `at`, unless
it is in the queue.
sourceraw docstring

enqueue-allclj/s

(enqueue-all profile ids at)

Put the episodes ids in order at the end of the queue of profile at at with one stamp, but for those that it holds, and take them out of the inbox.

Put the episodes `ids` in order at the end of the queue of `profile` at
`at` with one stamp, but for those that it holds, and take them out of
the inbox.
sourceraw docstring

from-list-feedclj/s

(from-list-feed profile name feed at)

Add the episodes of the list feed feed to the end of the playlist name of profile at at, in the order of the feed.

Add the episodes of the list feed `feed` to the end of the playlist
`name` of `profile` at `at`, in the order of the feed.
sourceraw docstring

in-inbox?clj/s

(in-inbox? profile id)

Whether the episode id is in the inbox of profile, and the listener hasn't dismissed, queued or played it since it arrived.

Whether the episode `id` is in the inbox of `profile`, and the listener
hasn't dismissed, queued or played it since it arrived.
sourceraw docstring

inboxclj/s

(inbox profile)

The episode ids in the inbox of profile, the latest to arrive first.

The episode ids in the inbox of `profile`, the latest to arrive first.
sourceraw docstring

moveclj/s

(move profile id index at)

Move the queued episode id to position index of the queue of profile at at. An index that isn't whole is rounded down, and NaN counts as 0.

Move the queued episode `id` to position `index` of the queue of `profile`
at `at`. An index that isn't whole is rounded down, and NaN counts as 0.
sourceraw docstring

move-in-playlistclj/s

(move-in-playlist profile name id index at)

Move the episode id to position index of the playlist name of profile at at.

Move the episode `id` to position `index` of the playlist `name` of
`profile` at `at`.
sourceraw docstring

play-nextclj/s

(play-next profile id at)

Put the episode id right after the current episode of profile at at, moving it there when it's queued, or to the front of an empty queue.

Put the episode `id` right after the current episode of `profile` at `at`,
moving it there when it's queued, or to the front of an empty queue.
sourceraw docstring

playlistclj/s

(playlist profile name)

The episode ids in the playlist name of profile, in order. A playlist is kept beside the queue, so to play it, queue its episodes.

The episode ids in the playlist `name` of `profile`, in order. A playlist
is kept beside the queue, so to play it, queue its episodes.
sourceraw docstring

playlistsclj/s

(playlists profile)

The episode ids of each playlist of profile, by name, leaving out the playlists without episodes.

The episode ids of each playlist of `profile`, by name, leaving out the
playlists without episodes.
sourceraw docstring

queueclj/s

(queue profile)

The episode ids queued in profile, the current one first.

The episode ids queued in `profile`, the current one first.
sourceraw docstring

queued?clj/s

(queued? profile id)

Whether the episode id is in the queue of profile.

Whether the episode `id` is in the queue of `profile`.
sourceraw docstring

refreshclj/s

(refresh profile url before after at)
(refresh profile url before after at {:keys [join-pred] :as opts})

Note in profile at at a new parse after of the feed at url, which was before, with the opts of feed/new-episodes and :join-pred. The result is a map of the new :profile and the episode ids that feed/new-episodes gives: those :added, :backfilled and :renamed.

The new episodes join the queue with :auto-queue? in the settings of a live subscription, at its end or right after the current episode, the newest :auto-queue-max of them when it's set. The others join the inbox with :inbox?. With :join-pred, a predicate of the feed and an item, e.g. of criteria/where, only the episodes that meet it join either. An episode that's already in the profile stays as the listener left it. A renamed episode takes its state along, as profile/rename-episode moves it, written by this device for the listener.

Note in `profile` at `at` a new parse `after` of the feed at `url`, which
was `before`, with the `opts` of feed/new-episodes and :join-pred. The
result is a map of the new :profile and the episode ids that
feed/new-episodes gives: those :added, :backfilled and :renamed.

The new episodes join the queue with :auto-queue? in the settings of a
live subscription, at its end or right after the current episode, the
newest :auto-queue-max of them when it's set. The others join the inbox
with :inbox?. With :join-pred, a predicate of the feed and an item, e.g.
of criteria/where, only the episodes that meet it join either. An
episode that's already in the profile stays as the listener left it. A
renamed episode takes its state along, as profile/rename-episode moves
it, written by this device for the listener.
sourceraw docstring

remove-from-playlistclj/s

(remove-from-playlist profile name id at)

Take the episode id out of the playlist name of profile at at, leaving a tombstone.

Take the episode `id` out of the playlist `name` of `profile` at `at`,
leaving a tombstone.
sourceraw docstring

rename-playlistclj/s

(rename-playlist profile from to at)

Move the episodes of the playlist from of profile to the end of the playlist to at at, or delete the playlist when to is nil.

The episodes keep their order, and an episode that both playlists hold stays where to has it.

Move the episodes of the playlist `from` of `profile` to the end of the
playlist `to` at `at`, or delete the playlist when `to` is nil.

The episodes keep their order, and an episode that both playlists hold
stays where `to` has it.
sourceraw docstring

to-list-feedclj/s

(to-list-feed profile name)
(to-list-feed
  profile
  name
  {:keys [url link description medium] :or {medium "podcastL"} :as opts})

The playlist name of profile as a list feed of the podcast namespace, with the opts below.

It's a channel of the medium podcastL, whose remote items point to the episodes in order. The opts give what a feed needs and a playlist lacks:

  • :url, where the feed is published, which gives its podcast:guid
  • :link, a page about the list, the URL by default, which RSS 2.0 requires
  • :description, the name by default
  • :medium, another medium, such as mixed

The URLs of the feeds go out without credentials.

The playlist `name` of `profile` as a list feed of the podcast namespace,
with the `opts` below.

It's a channel of the medium podcastL, whose remote items point to the
episodes in order. The `opts` give what a feed needs and a playlist
lacks:

- :url, where the feed is published, which gives its podcast:guid
- :link, a page about the list, the URL by default, which RSS 2.0
  requires
- :description, the name by default
- :medium, another medium, such as mixed

The URLs of the feeds go out without credentials.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close