diff options
-rw-r--r-- | play (renamed from cplay.py) | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -1,25 +1,26 @@ #!/usr/bin/env python # -*- python -*- -__version__ = "cplay 1.50pre7" +__version__ = "play 1.00" """ -cplay - A curses front-end for various audio players +play - A curses front-end for various audio players based on cplay Copyright (C) 1998-2005 Ulf Betlehem <flu@iki.fi> +Copyright (C) 2008-2010 Adrian C. <anrxc@sysphere.org> -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. """ # ------------------------------------------ @@ -44,7 +45,7 @@ try: import locale; locale.setlocale(locale.LC_ALL, "") except: pass # ------------------------------------------ -_locale_domain = "cplay" +_locale_domain = "play" _locale_dir = "/usr/local/share/locale" try: @@ -63,7 +64,7 @@ except: # ------------------------------------------ XTERM = re.search("rxvt|xterm", os.environ["TERM"]) -CONTROL_FIFO = "/var/tmp/cplay_control" +CONTROL_FIFO = "/var/tmp/play_control" # ------------------------------------------ def which(program): @@ -237,7 +238,7 @@ class StatusWindow(Window): def set_default_status(self, message): if self.current_message == self.default_message: self.status(message) self.default_message = message - XTERM and sys.stderr.write("\033]0;%s\a" % (message or "cplay")) + XTERM and sys.stderr.write("\033]0;%s\a" % (message or "play")) def restore_default_status(self): self.status(self.default_message) @@ -303,7 +304,7 @@ class RootWindow(Window): def command_quit(self): app.do_input_hook = self.do_quit app.start_input(_("Quit? (y/N)")) - + def do_quit(self, ch): if chr(ch) == 'y': app.quit() app.stop_input() @@ -529,7 +530,7 @@ class HelpWindow(ListWindow): z, x : toggle pause/stop s : recursive search BS, o : goto parent/specified dir Left, Right, m, ' : set/get bookmark - C-f, C-b : seek forward/backward + C-f, C-b : seek forward/backward C-a, C-e : restart/end track Playlist C-s, C-r, / : isearch -------- C-g, Esc : cancel d, D : delete (tagged) tracks/playlist @@ -745,7 +746,7 @@ class FilelistWindow(TagListWindow): def command_set_bookmark(self): app.do_input_hook = self.do_set_bookmark app.start_input(_("set bookmark")) - + def do_set_bookmark(self, ch): app.input_string = ch self.bookmarks[ch] = [self.cwd, self.bufptr] @@ -957,7 +958,7 @@ class PlaylistWindow(TagListWindow): file = open(pathname) map(f, map(string.strip, file.readlines())) file.close() - + def add(self, pathname, quiet=0): try: if os.path.isdir(pathname): @@ -1676,7 +1677,7 @@ def VALID_PLAYLIST(name): if re.search("\.(m3u|pls)$", name, re.I): return 1 -for rc in [os.path.expanduser("~/.cplayrc"), "/etc/cplayrc"]: +for rc in [os.path.expanduser("~/.playrc"), "/etc/playrc"]: try: execfile(rc); break except IOError: pass |