Skip to content

Commit

Permalink
Merge 9991f49 into 422835e
Browse files Browse the repository at this point in the history
  • Loading branch information
natumbri committed Nov 14, 2019
2 parents 422835e + 9991f49 commit b90cdde
Show file tree
Hide file tree
Showing 16 changed files with 17,002 additions and 2,313 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -6,5 +6,11 @@
.tox/
MANIFEST
build/
contacts/
dist/
xunit-*.xml
mopidy-youtube.Rproj
.Rproj.user
.Rhistory
youtube.sqlite
.RData
62 changes: 35 additions & 27 deletions README.rst
Expand Up @@ -17,27 +17,6 @@ Mopidy-YouTube
Mopidy extension that plays sound from YouTube.


Maintainer wanted
=================

Mopidy-YouTube is currently kept on life support by the Mopidy core
developers. It is in need of a more dedicated maintainer.

If you want to be the maintainer of Mopidy-YouTube, please:

1. Make 2-3 good pull requests improving any part of the project.

2. Read and get familiar with all of the project's open issues.

3. Send a pull request removing this section and adding yourself as the
"Current maintainer" in the "Credits" section below. In the pull request
description, please refer to the previous pull requests and state that
you've familiarized yourself with the open issues.

As a maintainer, you'll be given push access to the repo and the authority to
make releases to PyPI when you see fit.


Installation
============

Expand All @@ -51,17 +30,34 @@ For older versions of Mopidy (pre v2.0), install the plugins by running::

sudo apt-get install gstreamer0.10-plugins-bad

Install by running::
Install the the development branch of the natumbri fork (works without a YouTube API key) by running::

sudo pip install https://github.com/natumbri/mopidy-youtube/archive/develop.zip

Install the default version (currently requires a YouTube API key) by running::

pip install Mopidy-YouTube


Configuration
=============

No configuration needed. The only supported config value is ``youtube/enabled``
which can be set to ``false`` to disable the extension.
If you want modipy-youtube to use the YouTube API, before starting Mopidy,
you must set ``api_enabled = True``, and add your Google API key to your Mopidy configuration file::

[youtube]
enabled = true
youtube_api_key = <api key you got from Google>

Other configuration options are::

threads_max = 16
search_results = 15
playlist_max_videos = 20
api_enabled = false

If api_enabled is ``True`` but the youtube_api_key supplied is not valid, the
plugin will report an error and the API will not be used.

Usage
=====
Expand All @@ -81,10 +77,13 @@ Example for playlist::
Troubleshooting
===============

If resolving of URIs stops working, always try to update the pafy library
If the extension is slow, try setting lower values for threads_max, search_results
and playlist_max_videos.

If resolving of URIs stops working, always try to update the youtube-dl library
first::

pip install --upgrade pafy
pip install --upgrade youtube-dl


Project resources
Expand All @@ -98,13 +97,22 @@ Credits
=======

- Original author: `Janez Troha <https://github.com/dz0ny>`_
- Current maintainer: None. Maintainer wanted, see section above.
- Current maintainer: `Nikolas Tumbri <https://github.com/natumbri>`_
- `Contributors <https://github.com/mopidy/mopidy-youtube/graphs/contributors>`_


Changelog
=========

v2.1.0 (2019-10-26)
-------------------

- Major overhaul.

- Improved performance.

- Works with or without YouTube API key.

v2.0.2 (2016-01-19)
-------------------

Expand Down
7 changes: 6 additions & 1 deletion mopidy_youtube/__init__.py
Expand Up @@ -6,7 +6,7 @@
from mopidy import config, ext


__version__ = '2.0.2'
__version__ = '2.1.0'

logger = logging.getLogger(__name__)

Expand All @@ -23,6 +23,11 @@ def get_default_config(self):

def get_config_schema(self):
schema = super(Extension, self).get_config_schema()
schema['youtube_api_key'] = config.String(optional=True)
schema['threads_max'] = config.Integer(minimum=1)
schema['search_results'] = config.Integer(minimum=1)
schema['playlist_max_videos'] = config.Integer(minimum=1)
schema['api_enabled'] = config.Boolean()
return schema

def setup(self, registry):
Expand Down

0 comments on commit b90cdde

Please sign in to comment.