Skip to content

Commit

Permalink
Merge pull request #20 from adamjakab/devel
Browse files Browse the repository at this point in the history
Devel - v1.2.0
  • Loading branch information
adamjakab committed Apr 2, 2020
2 parents 07c1d56 + 4022956 commit 2437976
Show file tree
Hide file tree
Showing 20 changed files with 982 additions and 459 deletions.
8 changes: 5 additions & 3 deletions README.md
@@ -1,8 +1,10 @@
[![Build Status](https://travis-ci.org/adamjakab/BeetsPluginGoingRunning.svg?branch=master)](https://travis-ci.org/adamjakab/BeetsPluginGoingRunning)
[![Coverage Status](https://coveralls.io/repos/github/adamjakab/BeetsPluginGoingRunning/badge.svg?branch=master)](https://coveralls.io/github/adamjakab/BeetsPluginGoingRunning?branch=master)
[![Build Status](https://travis-ci.org/adamjakab/BeetsPluginGoingRunning.svg?branch=devel)](https://travis-ci.org/adamjakab/BeetsPluginGoingRunning)
[![Coverage Status](https://coveralls.io/repos/github/adamjakab/BeetsPluginGoingRunning/badge.svg?branch=devel)](https://coveralls.io/github/adamjakab/BeetsPluginGoingRunning?branch=devel)
[![PyPi](https://img.shields.io/pypi/v/beets-goingrunning.svg)](https://pypi.org/project/beets-goingrunning/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/beets-goingrunning.svg)](https://pypi.org/project/beets-goingrunning/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.txt)

# Going Running (beets plugin)
# Going Running (Beets Plugin)

The *beets-goingrunning* is a [beets](https://github.com/beetbox/beets) plugin for obsessive-compulsive music geek runners. It lets you configure different training activities by filtering songs based on their tag attributes (bpm, length, mood, loudness, etc), generates a list of songs for that specific training and copies those songs to your player device.

Expand Down
3 changes: 0 additions & 3 deletions beetsplug/__init__.py
@@ -1,9 +1,6 @@
# Copyright: Copyright (c) 2020., Adam Jakab
#
# Author: Adam Jakab <adam at jakab dot pro>
# Created: 2/16/20, 10:20 AM
# License: See LICENSE.txt

from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)

30 changes: 23 additions & 7 deletions beetsplug/goingrunning/__init__.py
@@ -1,15 +1,13 @@
# Copyright: Copyright (c) 2020., Adam Jakab
#
# Author: Adam Jakab <adam at jakab dot pro>
# Created: 2/19/20, 11:30 AM
# License: See LICENSE.txt
#

import os

from beets import mediafile
from beets.dbcore import types
from beets.plugins import BeetsPlugin
from beets.util.confit import ConfigSource, load_yaml

from beetsplug.goingrunning import common as GRC
from beetsplug.goingrunning.command import GoingRunningCommand


Expand All @@ -18,9 +16,27 @@ class GoingRunningPlugin(BeetsPlugin):

def __init__(self):
super(GoingRunningPlugin, self).__init__()
config_file_path = os.path.join(os.path.dirname(__file__), self._default_plugin_config_file_name_)
source = ConfigSource(load_yaml(config_file_path) or {}, config_file_path)

# Read default configuration
config_file_path = os.path.join(os.path.dirname(__file__),
self._default_plugin_config_file_name_)
source = ConfigSource(load_yaml(config_file_path) or {},
config_file_path)
self.config.add(source)

# Add `play_count` field support
fld_name = u'play_count'
if fld_name not in mediafile.MediaFile.fields():
field = mediafile.MediaField(
mediafile.MP3DescStorageStyle(fld_name),
mediafile.StorageStyle(fld_name),
out_type=int
)
self.add_media_field(fld_name, field)

def commands(self):
return [GoingRunningCommand(self.config)]

@property
def item_types(self):
return {'play_count': types.INTEGER}
22 changes: 22 additions & 0 deletions beetsplug/goingrunning/about.py
@@ -0,0 +1,22 @@
# Copyright: Copyright (c) 2020., Adam Jakab
#
# Author: Adam Jakab <adam at jakab dot pro>
# Created: 3/27/20, 3:52 PM
# License: See LICENSE.txt

__author__ = u'Adam Jakab'
__email__ = u'adam@jakab.pro'
__copyright__ = u'Copyright (c) 2020, {} <{}>'.format(__author__, __email__)
__license__ = u'License :: OSI Approved :: MIT License'
__version__ = u'1.2.0'
__status__ = u'Stable'

__PACKAGE_TITLE__ = u'GoingRunning'
__PACKAGE_NAME__ = u'beets-goingrunning'
__PACKAGE_DESCRIPTION__ = u'A beets plugin for creating and exporting songs ' \
u'that match your running session.',
__PACKAGE_URL__ = u'https://github.com/adamjakab/BeetsPluginGoingRunning'
__PLUGIN_NAME__ = u'goingrunning'
__PLUGIN_ALIAS__ = u'run'
__PLUGIN_SHORT_DESCRIPTION__ = u'run with the music that matches your ' \
u'training sessions'

0 comments on commit 2437976

Please sign in to comment.