blob: 7c4172601ad08a06586cd134afc7e47d7c219fc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
### jack_m3u: generate a m3u playlist - a module for
### jack - tag audio from a CD and encode it using 3rd party software
### Copyright (C) 1999-2003 Arne Zellentin <zarne@users.sf.net>
### 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.
### 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
from jack_globals import *
m3u = None
wavm3u = None
def init():
global m3u, wavm3u
m3u = []
wavm3u = []
def add(file):
m3u.append(file)
def add_wav(file):
wavm3u.append(file)
# fixeme - not written to a file yet
def write(file="jack.m3u"):
if m3u and cf['_write_m3u']:
f = open(file, "w")
for i in m3u:
f.write(i)
f.write("\n")
f.close()
|