Author: dmeyer
Date: Fri Dec 15 19:22:28 2006
New Revision: 2242

Added:
   trunk/metadata/src/disc/cdrom.py
      - copied, changed from r2240, /trunk/metadata/src/disc/cdinfo.py
Removed:
   trunk/metadata/src/disc/cdinfo.py
Modified:
   trunk/metadata/src/__init__.py
   trunk/metadata/src/disc/audio.py
   trunk/metadata/src/disc/core.py
   trunk/metadata/src/disc/vcd.py

Log:
rename cdinfo to cdrom

Modified: trunk/metadata/src/__init__.py
==============================================================================
--- trunk/metadata/src/__init__.py      (original)
+++ trunk/metadata/src/__init__.py      Fri Dec 15 19:22:28 2006
@@ -38,7 +38,7 @@
 
 # import factory code for kaa.metadata access
 from factory import *
-from disc.cdinfo import get_id as get_discid
+from disc.cdrom import get_id as get_discid
 from mediainfo import Media, MEDIA_AUDIO, MEDIA_VIDEO, MEDIA_IMAGE, \
      MEDIA_AV, MEDIA_SUBTITLE, MEDIA_CONTAINER, MEDIA_DIRECTORY, MEDIA_DISC, \
      MEDIA_GAME

Modified: trunk/metadata/src/disc/audio.py
==============================================================================
--- trunk/metadata/src/disc/audio.py    (original)
+++ trunk/metadata/src/disc/audio.py    Fri Dec 15 19:22:28 2006
@@ -38,7 +38,7 @@
 
 # kaa.metadata.disc imports
 import core
-import cdinfo
+import cdrom
 import CDDB
 
 # get logging object
@@ -61,8 +61,8 @@
 
     def query(self, device):
 
-        cdromfd = cdinfo.audiocd_open(device)
-        disc_id = cdinfo.audiocd_id(cdromfd)
+        cdromfd = cdrom.audiocd_open(device)
+        disc_id = cdrom.audiocd_id(cdromfd)
 
         if kaa.metadata.USE_NETWORK:
             try:
@@ -138,7 +138,7 @@
 
 
         # read the tracks to generate the title list
-        (first, last) = cdinfo.audiocd_toc_header(cdromfd)
+        (first, last) = cdrom.audiocd_toc_header(cdromfd)
 
         lmin = 0
         lsec = 0
@@ -146,9 +146,9 @@
         num = 0
         for i in range(first, last + 2):
             if i == last + 1:
-                min, sec, frames = cdinfo.audiocd_leadout(cdromfd)
+                min, sec, frames = cdrom.audiocd_leadout(cdromfd)
             else:
-                min, sec, frames = cdinfo.audiocd_toc_entry(cdromfd, i)
+                min, sec, frames = cdrom.audiocd_toc_entry(cdromfd, i)
             if num:
                 self.tracks[num-1].length = (min-lmin)*60 + (sec-lsec)
             num += 1

Copied: trunk/metadata/src/disc/cdrom.py (from r2240, 
/trunk/metadata/src/disc/cdinfo.py)
==============================================================================
--- /trunk/metadata/src/disc/cdinfo.py  (original)
+++ trunk/metadata/src/disc/cdrom.py    Fri Dec 15 19:22:28 2006
@@ -1,3 +1,34 @@
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------------
+# cdrom.py - cdrom access module
+# -----------------------------------------------------------------------------
+# $Id$
+#
+# -----------------------------------------------------------------------------
+# kaa-Metadata - Media Metadata for Python
+# Copyright (C) 2003-2006 Thomas Schueppel, Dirk Meyer
+#
+# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
+# Maintainer:    Dirk Meyer <[EMAIL PROTECTED]>
+#
+# Please see the file AUTHORS for a complete list of authors.
+#
+# 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 MER-
+# CHANTABILITY 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
+#
+# -----------------------------------------------------------------------------
+
 # python imports
 import os
 import re
@@ -13,7 +44,7 @@
     import _cdrom
 except ImportError:
     _cdrom = None
-    
+
 # get logging object
 log = logging.getLogger('metadata')
 
@@ -35,7 +66,7 @@
 
     track_frames = []
     checksum = 0
-    
+
     for i in range(first, last + 1):
        (min, sec, frame) = _cdrom.toc_entry(device, i)
         n = min*60 + sec
@@ -173,7 +204,7 @@
     if not _cdrom:
         log.debug("kaa.metadata not compiled with CDROM support")
         return 0, None
-        
+
     global _id_cache
     try:
         if _id_cache[device][0] + 0.9 > time.time():

Modified: trunk/metadata/src/disc/core.py
==============================================================================
--- trunk/metadata/src/disc/core.py     (original)
+++ trunk/metadata/src/disc/core.py     Fri Dec 15 19:22:28 2006
@@ -38,8 +38,8 @@
 from kaa.metadata.factory import register
 from kaa.metadata.video.core import VideoStream
 
-# extra cdinfo parser
-import cdinfo
+# extra cdrom parser
+import cdrom
 
 EXTENSION_DEVICE = mediainfo.EXTENSION_DEVICE
 EXTENSION_DIRECTORY = mediainfo.EXTENSION_DIRECTORY
@@ -56,7 +56,7 @@
     media = mediainfo.MEDIA_DISC
     
     def is_disc(self, device):
-        (type, self.id) = cdinfo.get_id(device, handle_mix=1)
+        (type, self.id) = cdrom.get_id(device, handle_mix=1)
         if type != 2:
             if type == 4:
                 self.mixed = 1

Modified: trunk/metadata/src/disc/vcd.py
==============================================================================
--- trunk/metadata/src/disc/vcd.py      (original)
+++ trunk/metadata/src/disc/vcd.py      Fri Dec 15 19:22:28 2006
@@ -31,7 +31,7 @@
 
 # kaa.metadata.disc imports
 import core
-import cdinfo
+import cdrom
 
 class VCD(core.Disc):
     def __init__(self,device):
@@ -67,7 +67,7 @@
 
         # read the tracks to generate the title list
         device = open(device)
-        (first, last) = cdinfo.audio_toc_header(device)
+        (first, last) = cdrom.audio_toc_header(device)
 
         lmin = 0
         lsec = 0
@@ -75,9 +75,9 @@
         num = 0
         for i in range(first, last + 2):
             if i == last + 1:
-                min, sec, frames = cdinfo.audio_leadout(device)
+                min, sec, frames = cdrom.audio_leadout(device)
             else:
-                min, sec, frames = cdinfo.audio_toc_entry(device, i)
+                min, sec, frames = cdrom.audio_toc_entry(device, i)
             if num:
                 vi = core.VideoStream()
                 # XXX add more static information here, it's also possible

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to