deepakjois / dhun Goto Github PK
View Code? Open in Web Editor NEWMinimalist Music Player for OS X
License: MIT License
Minimalist Music Player for OS X
License: MIT License
This refers to achiu's fork http://github.com/achiu/dhun
Here is the help output from Thor when the user types dhun -h
Tasks:
thor dhun:runner:enqueue SEARCH # enqueue songs that match the SEARCH. run dhun help query for filter details.
once querying is complete, designate the index of song...
thor dhun:runner:help [TASK] # Describe available tasks or one specific task
thor dhun:runner:history # shows the previously played songs
...<snip>..
It would be preferable to insulate people from the fact that Dhun uses Thor internally. Hence my preference for help message :
Tasks available : help history next pause play prev query resume shuffle start_server status stop stop_server
type dhun help <TASKNAME> for additional help on each task
Also, when the user types something like dhun help play
, it currently displays
Usage:
thor dhun:runner:play SEARCH
Options:
-ar, [--artist=ARTIST]
..<snip>..
It would be preferable replace thor dhun:runner:play
with dhun play
.
I looked at the Thor code and it seems easy enough. The methods task_help and help need to be overridden and tweaked.
It would be great to save a playlist to play it back some other time. Here is a sample syntax
$ dhun save /Users/deepak/myplaylist.pls # saves the playlist in some standard format
$ dhun load /Users/deepak/myplaylist.pls # loads the playlist and starts playing first song
$ dhun load --enqueue /Users/deepak/myplaylist.pls # enqueues the songs from the playlist
Ideally, we should be able to support playlists from other apps like iTunes etc. Need some research on standard playlist formats. Suggestions are welcome
Some query results which return a file name with accented characters end up crashing the C program query.c
. The problem statement seems to be :
const char* convertedString = CFStringGetCStringPtr((CFStringRef)attrValue, encoding);
The function call returns a null value. The other option is to try the CFStringGetCString
function instead with a long enough buffer to contain any filename.
This refers to achiu's fork at http://github.com/achiu/dhun
handler.rb
has a method called perform_action
def perform_action(action, arg=nil, message={})
result = arg.nil? ? @player.send(action) : @player.send(action,arg)
return [:error,message[:error]].flatten unless result
return [:success,message[:success]].flatten
end
The problem with this method is that the message is taken as an argument even before the action is completed. This causes incorrect messages for actions like dhun next
and dhun prev
because the @player.current
changes after the action is performed, but the message has the old value.
This refers to achiu's fork of Dhun http://github.com/achiu/dhun
Initially,
play
was intended to stop whatever was currently playing, empty the queue and start playing the first item in the new set of results.enqueue
was supposed to just add the results to the queue.This behavior seems to have changed in the fork, and play and enqueue are effectively doing the same thing. We need to either :
play
, ORenqueue
command altogether.Please discuss..
This refers to achiu's fork : http://github.com/achiu/dhun
The following works
$ dhun query --album=kabul
$ dhun query --artist=coke
The following fails with an error
$ dhun query -al kabul
$ dhun query -ar coke
Another issue is that switches with two characters is not the general convention. It is better to use -a
for artist and -l
for album.
It would be good to show the version of the Dhun build somewhere in the help text, just to keep track of things.
This refers to achiu's fork : http://github.com/achiu/dhun
When I type a command like dhun play meray
, and it returns one result, it is preferable to save the user a bit of trouble and not ask him to enter the index.
When the JSON string is large (due to a large number of results), it is sent to the server in multiple packets.
Need to collect the data from multiple packets, combine them and then send it for processing.
Rogério Vicente writes :
I though about a feature that would be great. Track scrobbling to Last.fm. Since I'm currently learning the ruby language I developed a gem that scrobbles tracks to Last.fm with the purpose of integrating it with Dhun.
...
Here's the link to the scrobbler library: http://github.com/rogeriopvl/tinyscrobbler
0 is not very user friendly, so we should start numbering from 1. Another reason to use indexes starting from 1 is to allow easier switching using dhun next
and dhun prev
. If the listing starts from 1, the skip length becomes immediately obvious.
On a related note, history listing could be ordered in reverse chronological order, with the most recently played song having the index 1. This is again, to facilitate easier skipping using dhun prev
.
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.