Coder Social home page Coder Social logo

leftfeet's People

Contributors

bmerry avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

leftfeet's Issues

Test handling of song without genre in playlist

Need to test whether having a song which does not match any of the genres in the play queue will cause an issue when generating new songs. I think it will be okay (from eyeballing the code), but could potentially go wrong either in lf_site (must return an empty genre list) or in repulsion (must handle an empty genre list).

Change handling of not enough songs

Currently if not enough songs could be found for a genre, we return a dummy that takes 1 second. A small interval makes sure that we don't run too short, but can also make rhythmbox appear to be hung if we run out of everything (which is normally what a new user will find before configuration. Instead, the generator should be able to accept a None return value and stop asking for that genre.

Algorithm is very slow

Currently cubic time. It could be improved to quadratic time by doing incremental calculation of scores. Sub-quadratic may also be possible by using a balanced binary tree for the scores for each genre.

python3 issues

Hi,
I've had a quick play with this on Rhythmbox 3 which uses python3

Thus I've run a 2to3 across the .py files and change the Loader instruction in the .plugin file to python3.

First observation - the Tools menu option "Generate playlist" - that didnt really stand out for me to be a "left feet" menu option - can you consider adding "Left Feet" to the menu name?

other errors seen in the terminal when running:

/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py:192: PyGTKDeprecationWarning: The "buttons" argument must be a Gtk.ButtonsType enum value. Please use the "add_buttons" method for adding buttons. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  Gtk.STOCK_OK, Gtk.ResponseType.OK
/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py:192: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  Gtk.STOCK_OK, Gtk.ResponseType.OK
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:497: PyGTKDeprecationWarning: The keyword(s) "parent" have been deprecated in favor of "transient_for" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  self._init(*args, **new_kwargs)
/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py:202: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for n_rows, n_columns or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  table = Gtk.Table(len(genres.genres), 2)
/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py:211: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  table.attach(Gtk.Label(_(g.name)), 0, 1, i, i + 1, 0)
/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py:212: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for value, lower, upper, step_increment, page_increment or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  adj = Gtk.Adjustment(freq, 0.0, 100.0, 1.0, 10.0)
/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py:223: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  hbox.pack_start(Gtk.Label(_('Minutes')), False, False, 0)
/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py:224: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for value, lower, upper, step_increment, page_increment or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  self.duration_minutes = Gtk.Adjustment(240, 0, 400, 1, 10)
Traceback (most recent call last):
  File "/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py", line 177, in generate_response
    self.generate()
  File "/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/__init__.py", line 151, in generate
    songs = generator.generate_songs(freqs, duration, factory)
  File "/home/dad/.local/share/rhythmbox/plugins/leftfeet/leftfeet/generator.py", line 119, in generate_songs
    raise ValueError('Must have at least one non-zero frequency')
ValueError: Must have at least one non-zero frequency

The latter non-zero frequency was because I just hit OK without changing the slider bars - maybe throw up a messagebox instead?

After changing the first slider to be non-zero and entering 60 minuts and hit OK rhythmbox hung. No obvious errors in rhythmbox -d trace (no output generated). Any thoughts?

Ubuntu 14.04 Trusty

Case-normalize the genre names

In some cases there are a mix of cases uses in genre tags in songs. At the moment this is handled via genre_aliases in specific instances, but it would be simpler to just force everything into lowercase as a general solution.

Filter by bitrate

Feature request from UCT: filter out anything with lossy encoding at less than 128kbps. Will need to check how lossless files are represented in the DB.

Set length by time not by number

This probably requires some revamping of the interface to have the generator ask for a song object, along with introspection methods to query its time and genre[s].

Handle songs that fit multiple genres

This probably just requires putting them into multiple places in by_genre, but also having the right mechanisms to prevent them being used multiple times.

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.