Giter Site home page Giter Site logo

plexplay's People

Contributors

themcclure avatar

plexplay's Issues

Add logger

Add a logger to split stream.
Configurable logging level and file name from .env.
Pipe ERROR+ logs to the console still.

Auto-prompt for login

If there are no login creds, on startup, it the api raises this exception
plexapi.exceptions.Unauthorized: (401) unauthorized; https://plex.tv/users/sign_in.xml <?xml version="1.0" encoding="UTF-8"?> <errors> <error>Invalid email, username, or password.</error> </errors>

It would be good if the tool caught this and pushed the user to sign in and generate the token automatically.

Enhanced UI

Extend this as a more interactive angular->electron app?
Or a 3rd option for some new mac gui thing?

Library reload

Other expansion efforts require this to support a long running program, with a persistent connection to the server.

To support this, a long running process should be able to reload the library from the server, without having to go through the overhead of reconnecting to the server.

Connect to other Music libraries

Connect to other Music libraries and combining music from there since the plex playlists now support it, and the PlexAPI has been updated since then.

Does the PlexAPI support it?

Playlist Markup Language

At the moment the playlist definitions are entirely contained within the code.
The env variables let me tune how many of each component are put into the playlist, and which plex servers etc but it involves coding effort to change or build a new playlist.

Ultimately I'd like to build in some kind of markup language (YAML, configParser, etc) that would let me define playlists.

eg something like this would let me define (somewhat) arbitrary playlists in a config file:

5-star-lru:
  - source: music-section
  - filter:
    -- sort: lastPlayed ASC
    -- rating: 5
    -- select: 20
  - select: random 10
  - publish: False

4-star-lru:
  - source: music-section
  - filter:
    -- sort: lastPlayed ASC
    -- rating: 4
    -- select: 50
  - select: random 20
  - publish: False

hot-mix:
  - source: [4-star-lru, 5-star-lru]
  - select: random 50
  - publish: True

Refactor playplay module

Refactor the entire module for equivalent functionality but to change the data structure.

Either a dataframe, with relevant data in each column for faster programmatic processing, and the PlexAPI objects added in columns for interacting with the API (Track, Album, Artist).

Or create a dataclass for each entity and re-create the hierarchy (though perhaps more loosely?) in the module as its own thing.

Put together "Recommendations" playlist

Grab info from other places that form recommendations

  • Plex has a recommendation engine - can I access it through plexapi? And how do I add those to a playlist?
  • import from Spotify #6
  • can we play / find / link spotify songs in plex playlist?
  • YouTube or other sources?

Ongoing housekeeping ideas

Housekeeping ideas for every time it runs, or at least modularly runnable:

  • Automatically find tracks with a 1/2 star rating and change their values to the next whole star up (since this is probably a user input error... fingers get 3.5 when trying to hit 4 quite often)

  • 2*+ rated track that has a name "similar" to other 2*+ rated tracks, so that "duplicates" and remixes or covers aren't put in the mix, except by deliberate choice

  • set album ratings. Perhaps on a weighted average of rated tracks on the album?

  • report of Artist/Album/Track/Rating/lastRated (revalidate a song rating every couple of years?) ... maybe a playlist of the 100 oldest rated songs. Not so much for listening to as just verifying the rating... but then how do we verify that the user confirmed the rating? Does the lastRated value change if you give it the same rating??

Connect other Plex library

The new Plex API allows for playlists to include tracks from other libraries now.

  • See if plexapi supports it manually within the unplayed playlist.

  • See if secondary plex libraries can have a [library]-[playlist] created for each library

  • if both work, figure out how to blend other libraries into the main list

Event driven updates

"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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.