Git Product home page Git Product logo

dhun's People

Contributors

achiurizo avatar deepakjois avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dhun's Issues

Help command, remove Thor references

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.

Save/Load playlist feature

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

Issue with queries which return accented characters

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.

Problem with pre-computing of message string in handler.rb, causing incorrect messages

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.

Discussion : Play and Enqueue seem to be doing the same thing

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 :

  • Reinstate the original behavior of play, OR
  • Remove the enqueue command altogether.

Please discuss..

-al and -ar switches dont work

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.

Show version in help text

It would be good to show the version of the Dhun build somewhere in the help text, just to keep track of things.

Server chokes when the JSON string is huge

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.

Scrobble Track support

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

Numbering of songs in listings

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.

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.