Update of /cvsroot/freevo/freevo/WIP/Aubin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11317
Modified Files:
makeplaylist.py
Log Message:
Forgot to commit this; updated to work with the sqlite integration (dbutil, etc.)
Index: makeplaylist.py
===================================================================
RCS file: /cvsroot/freevo/freevo/WIP/Aubin/makeplaylist.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** makeplaylist.py 9 Jan 2004 22:44:58 -0000 1.1
--- makeplaylist.py 26 Feb 2004 06:10:08 -0000 1.2
***************
*** 1,3 ****
- #!/usr/bin/env python
#if 0 /*
# -----------------------------------------------------------------------
--- 1,2 ----
***************
*** 15,40 ****
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.1 2004/01/09 22:44:58 outlyer
! # Restoring my old sqlite stuff... going to work on doing it properly...
! # Also, mp3dir is a function that, given a directory will return:
! #
! # Artist
! # Album
! # Playtime (m:s)
! # Year
! #
! # which are things I'd like to have in the info display, maybe under the cover image
! # or something.
! #
! # (It's not amazing, but it'll know to put "Various" if the artist varies, or the
! # album title varies.)
! #
! # Aubin
! #
! # Revision 1.2 2003/08/23 12:51:42 dischi
! # removed some old CVS log messages
#
- # Revision 1.1 2003/08/23 09:09:18 dischi
- # moved some helpers to src/helpers
#
# -----------------------------------------------------------------------
--- 14,20 ----
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.2 2004/02/26 06:10:08 outlyer
! # Forgot to commit this; updated to work with the sqlite integration (dbutil, etc.)
#
#
# -----------------------------------------------------------------------
***************
*** 64,69 ****
import os, sys
import config, util
! import musicsqlimport as fdb
!
base = 'SELECT path, filename FROM music '
--- 44,48 ----
import os, sys
import config, util
! from util.dbutil import MetaDatabase
base = 'SELECT path, filename FROM music '
***************
*** 81,89 ****
if __name__ == '__main__':
- if not fdb.check_db():
- print "Database missing or empty, please run 'freevo musicsqlimport'"
- print "before running this program"
- sys.exit(1)
-
if not len(sys.argv) > 1 or sys.argv[1] == '--help':
print 'Usage: '
--- 60,63 ----
***************
*** 98,104 ****
else:
output = None
! db = sqlite.connect(fdb.DATABASE,autocommit=0)
! cursor = db.cursor()
! #cursor.execute(queries[sys.argv[1]][1])
q = int(sys.argv[1])
sql = queries[q][1]
--- 72,76 ----
else:
output = None
! db = MetaDatabase()
q = int(sys.argv[1])
sql = queries[q][1]
***************
*** 113,118 ****
! cursor.execute(sql)
! for row in cursor.fetchall():
line = os.path.join(row['path'],row['filename'])
if output:
--- 85,90 ----
! result = db.runQuery(sql)
! for row in result:
line = os.path.join(row['path'],row['filename'])
if output:
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog