Skip to content

Event driven updates #10

@themcclure

Description

@themcclure

"Epic" to cover the user story: this should become a long running process that updates the playlists after they have been sufficiently listened to to warrant an update.

Questions:

  • detecting new media being added and either adding it as a delta or just refreshing the whole thing... I guess it doesn't happen that often... would a refresh to include new media keep the living track data?
  • what about track data that changes on the server? Does the API just "know" to fetch it again? eg if a track is rated, will that just magically reload? Or will it be stale until manually refreshed... but how do we do that?

Triggering the job:

  • Is websockets viable? (and using PlexServer.Alert())
  • Plex webhooks to trigger something?
  • SOME kind of monitoring that puts events on a queue until there are "enough"
  • can we avoid having to implement queueing in some way (Celery, Cloud Tasks)?

Processing the job:

  • can we measure the "last played" date of a playlist?
  • cold startup time is long... like 2 minutes to connect, 1 minute to get the track list and 3 minutes to fetch track data. Once fetched the track data can be used without further Plex API call for ??? (>15) minutes so maybe it's only going to be an issue if there's new media
  • can we tell is Plex events are coming from playlist plays, or at least songs in a playlist?
  • perhaps after THRESHOLD % of songs in a playlist have been played, refresh that playlist?
  • perhaps just a daily/weekly job to see if things have moved enough to trigger?
  • can we force sync the devices who have synced that playlist?

delivery & packaging:

  • can it be run on cloud infrastructure?
  • can ultimate location still be triggered manually, or will I also have to keep working on the PlexCLI?
  • can it be dockerized to run on a low powered local server?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions