Coder Social home page Coder Social logo

mpd_skill's Introduction

MPD Playback

Connect and control media players over the MPD protocol

About

The skill retreivs all listable albums, artists and genres and can play each of these. Also pausing and resuming is possible along with stop and skipping tracks.

Examples

  • "play Beastie Boys"
  • "play some rock music"

Credits

@forslund

Category

Music

Tags

#mpd #music

mpd_skill's People

Contributors

forslund avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mpd_skill's Issues

No longer working

This skill does not seem to work at all currently. Would really like to see it fixed as this is the biggest reason I'd like to use Mycroft over Alexa & similar.

Add ability to specify artist or album

I could be wrong, but currently there doesn't seem to be a way to play an album if an artist has the same name. For instance, I can't play the Siouxsie & the Banshees album "Kaleidoscope" because I also have several albums by the band Kaleidoscope. I'd like to be able to say "play album Kaleidoscope".

track found too late (timeout) on raspberry

Good skil. if the database is large, the answer from mpd always comes after the mycroft error message on my raspberry. on PC OK.
the answer comes about 20 seconds after playback control. Do you have an idea how I can speed it up?

16:19:13.610 | INFO | 810 | Playback Control Skill | Resolving Player for: rammstein 16:19:13.663 | INFO | 810 | Morse | save output for morse ft_skill.mycroft_skill:find_resource:720 | Resource 'PlayTheNews.list' for lang 'de-de' not found: trying 'en-us' Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout 16:19:20.125 | INFO | 810 | Playback Control Skill | No matches >>>>>>>>> 16:19:20.296 | INFO | 810 | Morse | save output for morse Removing event mycroft-mark-2.mycroftai:IdleCheck 16:19:31.336 | INFO | 810 | Mark2 | Displaying all animations for page 16:19:31.338 | INFO | 810 | Mark2 | Cancelling Idle screen Removing event mycroft-mark-2.mycroftai:IdleCheck 16:19:40.228 | INFO | 810 | MPDSkill | MPD Found Rammstein >>>>>>>

UniCode error on load

Hello,

I have these errors as the mpd-skill is loading in MyCroft cli console.

2020-12-21 05:41:15.039 | INFO | 556 | mpd | Calling MPD connect('192.168.0.57', '6600', timeout=None)
2020-12-21 05:41:15.054 | INFO | 556 | MPDSkill | Fetching stuff!!!
2020-12-21 05:41:15.054 | INFO | 556 | MPDSkill | Albums...
2020-12-21 05:41:15.119 | INFO | 556 | MPDSkill | Artists...
2020-12-21 05:41:15.178 | INFO | 556 | MPDSkill | Genres...
2020-12-21 05:41:15.199 | INFO | 556 | MPDSkill | Titles...
2020-12-21 05:41:15.339 | INFO | 556 | mpd | Calling MPD disconnect()
2020-12-21 05:41:15.340 | INFO | 556 | mpd | Calling MPD connect('192.168.0.57', '6600', timeout=None)
2020-12-21 05:41:15.483 | ERROR | 556 | MPDSkill | An error occured while collecting data
Traceback (most recent call last):
File "/opt/mycroft/skills/mycroft-mpd-skill.mycroftai/init.py", line 47, in list
return super().list(*args)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 629, in decorator
return wrapper(self, name, args, bound_decorator(self, returnValue))
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 254, in _execute
return retval()
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 623, in decorator
return function(self, *args, **kwargs)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 398, in _fetch_list
return self._wrap_iterator(self._read_list())
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 374, in _wrap_iterator
return list(iterator)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 318, in _read_list
for key, value in self._read_pairs():
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 314, in _read_pairs
pair = self._read_pair(separator)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 302, in _read_pair
line = self._read_line()
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 282, in _read_line
line = self._rfile.readline()
File "/home/emilot/.pyenv/versions/3.7.9/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 4543: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/mycroft/skills/mycroft-mpd-skill.mycroftai/init.py", line 140, in _connect
self.titles = self.server.list('title')
File "/opt/mycroft/skills/mycroft-mpd-skill.mycroftai/init.py", line 50, in list
return super().list(*args)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 629, in decorator
return wrapper(self, name, args, bound_decorator(self, returnValue))
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 254, in _execute
return retval()
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 623, in decorator
return function(self, *args, **kwargs)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 398, in _fetch_list
return self._wrap_iterator(self._read_list())
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 374, in _wrap_iterator
return list(iterator)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 318, in _read_list
for key, value in self._read_pairs():
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 314, in _read_pairs
pair = self._read_pair(separator)
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 302, in _read_pair
line = self._read_line()
File "/home/emilot/programs/mycroft-core/.venv/lib/python3.7/site-packages/mpd.py", line 282, in _read_line
line = self._rfile.readline()
File "/home/emilot/.pyenv/versions/3.7.9/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 3110: invalid start byte

After that it won't found any song, artist, etc... and said "no playlists found"

I use latest Master branch of Mycroft and i tried with fuzzy and rapidfuzz.

I have generating "locale-gen" with en_US.UTF-8 in ArchlinuxARM

Thank you.

Not able to play anything

Just installed this again after a few years. Whatever I try to get it to play, it logs "Sorry MPD has no playlists" and says it's unable to play. Is this still working with the latest release?

Unable to play albums with punctuation marks

I don't seem to be able to get it to play any albums with punctuation marks. I've tried albums with ,, !, :, ', /and โ€™; all seem to fail with "I don't know what that means", unless part of the album also matches an artist or a genre, in which case it plays the artist or genre instead.

Docs say to add your settings to mycroft.ini which doesn't exist.

It seems the configuration file type and format has changed. It says to add
[MPDSkill]
mpd_url=YOUR_URL
mpd_port=YOUR_PORT

to mycroft.ini but that file doesn't exist. I think mycroft.conf is the relevant file now but it has a different format. Is there an example of how to add my settings to mycroft.conf?

Traceback in extractWithoutOrder

I am seeing the following issue when I try to use this skill on a Mark 1:

2019-12-23 16:46:49.065 | ERROR    |   855 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:798 | An error occurred while processing a request in MPD Skill
Traceback (most recent call last):
  File "/opt/venvs/mycroft-core/lib/python3.7/site-packages/fuzzywuzzy/process.py", line 92, in extractWithoutOrder
    return StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/venvs/mycroft-core/lib/python3.7/site-packages/mycroft/skills/mycroft_skill/event_container.py", line 66, in wrapper
    handler(message)
  File "/opt/mycroft/skills/mpd_skill.forslund/__init__.py", line 128, in handle_play_playlist
    self.playlist)
  File "/opt/venvs/mycroft-core/lib/python3.7/site-packages/fuzzywuzzy/process.py", line 230, in extractOne
    return max(best_list, key=lambda i: i[1])
RuntimeError: generator raised StopIteration```

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.