Git Product home page Git Product logo

beetsplugingoingrunning's People

Contributors

adamjakab avatar juanmeleiro avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

juanmeleiro

beetsplugingoingrunning's Issues

Coveralls.io is unlinked

I cannot use Travis anymore (needs commercial license) so publishing coverage information to coveralls.io is broken.

Training without duration

when using a training without duration the plugin exits with the following back trace:

(base) jakabimac:~ jackisback$ beet run shopping
Handling training: shopping
Traceback (most recent call last):
  File "/Users/jackisback/opt/miniconda3/bin/beet", line 8, in <module>
    sys.exit(main())
  File "/Users/jackisback/opt/miniconda3/lib/python3.7/site-packages/beets/ui/__init__.py", line 1266, in main
    _raw_main(args)
  File "/Users/jackisback/opt/miniconda3/lib/python3.7/site-packages/beets/ui/__init__.py", line 1253, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/Users/jackisback/opt/miniconda3/lib/python3.7/site-packages/beetsplug/goingrunning/command.py", line 126, in func
    self.handle_training()
  File "/Users/jackisback/opt/miniconda3/lib/python3.7/site-packages/beetsplug/goingrunning/command.py", line 168, in handle_training
    sel_items = self._get_items_for_duration(sorted_lib_items, duration)
  File "/Users/jackisback/opt/miniconda3/lib/python3.7/site-packages/beetsplug/goingrunning/command.py", line 324, in _get_items_for_duration
    est_num_songs = round(requested_duration * 60 / _avg)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

incompatibility issue with other plugins declaring the same types

When both acousticbrainz and goingrunning plugins are activated beets exits with the following error:

Traceback (most recent call last):
  File "/Users/jackisback/opt/miniconda3/envs/beetsdevel/bin/beet", line 8, in <module>
    sys.exit(main())
  File "/Users/jackisback/opt/miniconda3/envs/beetsdevel/lib/python3.7/site-packages/beets/ui/__init__.py", line 1266, in main
    _raw_main(args)
  File "/Users/jackisback/opt/miniconda3/envs/beetsdevel/lib/python3.7/site-packages/beets/ui/__init__.py", line 1249, in _raw_main
    subcommands, plugins, lib = _setup(options, lib)
  File "/Users/jackisback/opt/miniconda3/envs/beetsdevel/lib/python3.7/site-packages/beets/ui/__init__.py", line 1148, in _setup
    library.Item._types.update(plugins.types(library.Item))
  File "/Users/jackisback/opt/miniconda3/envs/beetsdevel/lib/python3.7/site-packages/beets/plugins.py", line 344, in types
    u'another type.'.format(plugin.name, field)
beets.plugins.PluginConflictException: Plugin acousticbrainz defines flexible field average_loudness which has already been defined with another type.

Removing one of either plugins, the problem goes away.

Maintaining a consistent file type

I currently convert songs using the convert plugin and use some tags to export songs for my Walkman device, since it can only play mp3s. Is something like this possible when you export the files? maybe setting up a bit-rate and file type and convert files which aren't mp3s? Just a suggestion :)
Thanks a lot for this! Never thought we could use bpm like this ๐Ÿ‘

Beets 1.5+ "beets.util.confit is deprecated; use confuse instead"

Hi Adam,

When your plugin is installed it gives the following error in Beets 1.5+ when running any command. Even if I run e.g. beet ls -a artist. Is this something you would be willing/have the time for to fix?

Thanks, Jan

/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead
  warnings.warn("beets.mediafile is deprecated; use mediafile instead")
/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/beets/util/confit.py:19: UserWarning: beets.util.confit is deprecated; use confuse instead
  warnings.warn("beets.util.confit is deprecated; use confuse instead")

genre matching is not exact

Matching needs to be exact and not regex otherwise "Rock" will also match "Rock & Roll" from another selection. For regular expressions "^" first char can be used to distinguish if regex is needed.

training without a target

when listing a training:

================================[   walking   ]=================================
duration: 3:00:00
query: genre(jazz)
ordering: year+(100)

user does not get warned about a missing target.

In fact upon beet run walking the message is not very clear:

Handling training: walking
The target name[None] is not defined!
The target name[None] is not defined!
The target[None] does not declare a device root path.

A better message would be:

Training 'walking' must define a target!

Configuration error!

Error message: configuration error: goingrunning.trainings.walking.target not found

goingrunning:
  song_bpm: [111, 222]
  song_len: [120, 240]
  duration: 120
  target: SONY
  targets:
    TEST: ~/Music/tmp/
    SONY: /Volumes/WALKMAN/MUSIC/AUTO/
  clean_target: true
  trainings:
    test:
      alias: "Born to run"
      song_bpm: [90, 150]
      song_len: [120, 300]
      duration: 180
      target: TEST
    walking:
      alias: "Born to run"
      song_bpm: [0, 130]
      song_len: [0, 600]
      duration: 180
    longrun:
      alias: "Born to run"
      song_bpm: [120, 150]
      song_len: [120, 300]
      duration: 180

beets version 1.4.9
Python version 3.7.6
plugins: convert, duplicates, fromfilename, goingrunning, info, inline, the, zero

goingrunning -l
Available trainings:
======================================== ::: test
alias: Born to run
duration: 180
song_bpm: [90, 150]
song_len: [120, 300]
target: TEST
======================================== ::: walking
alias: Born to run
duration: 180
song_bpm: [0, 130]
song_len: [0, 600]
target: SONY
======================================== ::: longrun
alias: Born to run
duration: 180
song_bpm: [120, 150]
song_len: [120, 300]
target: SONY

So configuration is correctly read

If I put the target directly on the training leaf it works.

Store multiple trainings on target

One might do multiple consecutive trainings which will make it necessary to store multiple trainings. For example: warmup, 10K, cool-down.
Instead of clean_target: yes|no we could have clean_target: no|training|all

Duration as argument

It would be nice to be able to change on the fly the duration of a training. For example a longrun defined as 2hrs training at times can be also shorter or longer.

add progress when exporting to target

Sometimes it can take a while to copy all the songs to the target device. An optional progress bar showing the current status and ETA would be nice.

fallback configuration is not picked up for ordering

when using this configuration:

trainings:
        fallback:
            target: TEST
            increment_play_count: yes
            favour_unplayed: yes
            ordering:
                original_year: 25
                bpm: 50
                mood_aggressive: 50
                danceable: 100
                mood_relaxed: -100
        longrun-la:
            use_flavours: [running, intensity_low, genre_alternative]
            duration: 150
            target: SONY

and executing beet -vv run longrun-la

the plugin reports:

user configuration: /Users/jackisback/.config/beets/config.yaml
data directory: /Users/jackisback/.config/beets
plugin paths: /Users/jackisback/Documents/Projects/Python/BeetsPluginGenreFixer/beetsplug
Sending event: pluginload
inline: adding item field initial_letter
inline: adding item field disc_num_prefix
library database: /Users/jackisback/.config/beets/real_library.db
library directory: /Volumes/J/Music
Sending event: library_opened
goingrunning: Handling training: longrun-la
goingrunning: Getting attribute[device_root] for target: SONY
goingrunning: Finding target: SONY
goingrunning: Found target[SONY] attribute[device_root] path: /Volumes/WALKMAN
goingrunning: Getting attribute[device_path] for target: SONY
goingrunning: Finding target: SONY
goingrunning: Found target[SONY] attribute[device_path] path: MUSIC/AUTO
goingrunning: Found target[SONY] path: SONY
goingrunning: Command query elements: []
goingrunning: Training query elements: []
goingrunning: Flavour query elements: ["^genre:Experimental", "^genre:Christian", "^genre:Christmas", "^genre:Speech", "bpm:..110", "mood_aggressive:..0.1", "genre:Alternative Rock", "genre:Grunge", "genre:Indie", "genre:New Wave", "genre:Progressive", "genre:Psychedelic Rock", "genre:Punk", "genre:Ska"]
goingrunning: Combined query elements: ["^genre:Experimental", "^genre:Christian", "^genre:Christmas", "^genre:Speech", "bpm:..110", "mood_aggressive:..0.1", "genre:Alternative Rock", "genre:Grunge", "genre:Indie", "genre:New Wave", "genre:Progressive", "genre:Psychedelic Rock", "genre:Punk", "genre:Ska"]
goingrunning: ^genre: AndQuery([NotQuery(SubstringQuery("genre", "Experimental", True)), NotQuery(SubstringQuery("genre", "Christian", True)), NotQuery(SubstringQuery("genre", "Christmas", True)), NotQuery(SubstringQuery("genre", "Speech", True))])
goingrunning: bpm: NumericQuery("bpm", "..110", True)
goingrunning: mood_aggressive: NumericQuery("mood_aggressive", "..0.1", False)
goingrunning: genre: OrQuery([SubstringQuery("genre", "Alternative Rock", True), SubstringQuery("genre", "Grunge", True), SubstringQuery("genre", "Indie", True), SubstringQuery("genre", "New Wave", True), SubstringQuery("genre", "Progressive", True), SubstringQuery("genre", "Psychedelic Rock", True), SubstringQuery("genre", "Punk", True), SubstringQuery("genre", "Ska", True)])
goingrunning: Parsed query: AndQuery([AndQuery([NotQuery(SubstringQuery("genre", "Experimental", True)), NotQuery(SubstringQuery("genre", "Christian", True)), NotQuery(SubstringQuery("genre", "Christmas", True)), NotQuery(SubstringQuery("genre", "Speech", True))]), NumericQuery("bpm", "..110", True), NumericQuery("mood_aggressive", "..0.1", False), OrQuery([SubstringQuery("genre", "Alternative Rock", True), SubstringQuery("genre", "Grunge", True), SubstringQuery("genre", "Indie", True), SubstringQuery("genre", "New Wave", True), SubstringQuery("genre", "Progressive", True), SubstringQuery("genre", "Psychedelic Rock", True), SubstringQuery("genre", "Punk", True), SubstringQuery("genre", "Ska", True)])])
goingrunning: ORDERING permutation: ScoreBasedLinearPermutation
goingrunning: Scoring 753 items...
goingrunning: ORDER INFO: {}
goingrunning: PICKER strategy: RandomFromBinsPicker ("favour_unplayed": yes)

so the ordering key is not picked up from the fallback training. (It howvever seems that the favour_unplayed is picked up).

GoingRunning(beets-goingrunning) plugin for Beets: v1.2.1

Add tags to repository

Congrats on this plugin! I'm considering it for generating sport routine playlists.
Not really a bug or something, just here to recommend adding tags to this repository for improved visibility/reachability in GitHub (personally I like to go to this page periodically to see if new plugins appear).
I've seen beets plugins repos usually having these tags:

  • beets
  • beets-plugin

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.