From 676c2374a397e90d701f82b628906ed02e24d730 Mon Sep 17 00:00:00 2001 From: moculus Date: Mon, 9 Mar 2009 16:24:00 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- mode/mp3.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mode/mp3.py b/mode/mp3.py index d4cd343..e1f6149 100644 --- a/mode/mp3.py +++ b/mode/mp3.py @@ -5,6 +5,7 @@ from lex import Grammar, PatternRule, RegionRule, PatternGroupRule from point import Point from buffer import Buffer from method import Method, Argument, arg +from method.shell import Interact try: import eyeD3 @@ -101,6 +102,14 @@ class Mp3Grammar(Grammar): class Mp3Refresh(Method): def _execute(self, w, **vargs): w.buffer.reload() +class Mp3Play(Method): + def _execute(self, w, **vargs): + pass +class Mpg123Play(Interact): + args = [] + def _execute(self, w, **vargs): + path = os.path.realpath(w.buffer.path) + Interact._execute(self, w, bname='*Mpg123*', cmd='mpg123 %r' % path) class Mp3OpenPath(Method): args = [arg('mp3', dt="path", p="Open MP3: ", dv=default.path_dirname,