themcclure / plexplay Goto Github PK
View Code? Open in Web Editor NEWPlaylist management
Playlist management
Add a logger to split stream.
Configurable logging level and file name from .env.
Pipe ERROR+ logs to the console still.
Connect to the Spotify API
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.
Extend this as a more interactive angular->electron app?
Or a 3rd option for some new mac gui thing?
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 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?
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 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.
Grab info from other places that form recommendations
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??
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
If it's not explicitly selected from the env/args, then prompt user to select which server to connect to
"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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.