動画・音声ソフト@linux
at LINUX
408:login:Penguin
03/11/04 01:18 AopNZRIO
>>400
とりあえず以下のコードで。
class PlaylistWindow にて
self.keymap.bind('C', self.command_add_or_refresh_cd_entries, ())
def command_add_or_refresh_cd_entries(self):
current_entry = self.current()
cdda_entries = []
for e in self.buffer:
if re.match("cdda://", e.pathname):
cdda_entries.append(e)
map(self.remove, cdda_entries)
proc = os.popen3(["cdparanoia", "-Q"])[2]
lines = proc.readlines()
while lines:
line = lines.pop(0)
m = re.match("\s+(\d+)\.\s+(\d+)", line)
if m:
e = PlaylistEntry("cdda://%02d" % int(m.group(1)))
self.append(e) # カーソル位置に追加すべき?
try: self.bufptr = self.buffer.index(current_entry)
except ValueError: pass
self.update()
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4865日前に更新/243 KB
担当:undef