soryrawyer / monty Goto Github PK
View Code? Open in Web Editor NEWa media player, written in python
a media player, written in python
specifically this: https://github.com/SoryRawyer/monty/blob/master/play_song.py#L48
There's gotta be a better way to handle setting up the keyboard events. Right now all the callback functions are declared in main
. There's no way that's the best option, right?
Edit 1: Does it make sense to keep these in a separate Callback class? If we make these methods static and rely on partially-evaluating these functions, would that create issues down the line? I believe so. E.g. โ if we edit the TrackList after initializing the player, then we won't have a current copy of that TrackList in our callbacks. we'd have to do some kind of update. Come to think of it, we'd probably have to do the same thing if we passed those objects as arguments to the Callback class at the time of initialization.
add an "update callbacks" function that will update bindings for keys/GUI elements.
As Monty moves into the realm of using an index file to know what's up, there are a couple things that need to change:
Expand the Metadata class and use it everywhere (DB, index, tracklist, etc.).
Take out pynput and just use Quartz/AppKit. There probably isn't enough reliance on pynput to justify the dependency.
eed99728e80158fff8456fded682dbd75d6b5b0c
Among things that would be nice to have updated:
I'm not sure we need anything more than a copy of the audio_tracks table and some cloud storage stuff, but what API endpoints would we need? Some ideas follow.
get_track : artist, album, track_name
(monty) rory@rory:~/dev/monty$ python launch_player.py
Traceback (most recent call last):
File "launch_player.py", line 92, in <module>
main()
File "launch_player.py", line 20, in main
client = CloudStorage()
handle errors that could arise from not being able to access Google Cloud and do something useful with them, like display something next to non-local files to say that you can't get to em.
Whatever happens, though, a user should still be able to run the player.
83d7337a94528cec81e33bcf8e315619bdc56845
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.