1 | #if 0 /* |
---|
2 | # ----------------------------------------------------------------------- |
---|
3 | # datainfo.py - info about a normal data disc |
---|
4 | # ----------------------------------------------------------------------- |
---|
5 | # $Id: datainfo.py,v 1.3 2004/02/28 18:45:05 dischi Exp $ |
---|
6 | # |
---|
7 | # ----------------------------------------------------------------------- |
---|
8 | # Copyright (C) 2003 Thomas Schueppel, Dirk Meyer |
---|
9 | # |
---|
10 | # This program is free software; you can redistribute it and/or modify |
---|
11 | # it under the terms of the GNU General Public License as published by |
---|
12 | # the Free Software Foundation; either version 2 of the License, or |
---|
13 | # (at your option) any later version. |
---|
14 | # |
---|
15 | # This program is distributed in the hope that it will be useful, but |
---|
16 | # WITHOUT ANY WARRANTY; without even the implied warranty of MER- |
---|
17 | # CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
---|
18 | # Public License for more details. |
---|
19 | # |
---|
20 | # You should have received a copy of the GNU General Public License along |
---|
21 | # with this program; if not, write to the Free Software Foundation, Inc., |
---|
22 | # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
23 | # |
---|
24 | # ----------------------------------------------------------------------- */ |
---|
25 | #endif |
---|
26 | |
---|
27 | |
---|
28 | from mmpython import mediainfo |
---|
29 | import mmpython |
---|
30 | from discinfo import DiscInfo |
---|
31 | |
---|
32 | class DataDiscInfo(DiscInfo): |
---|
33 | def __init__(self,device): |
---|
34 | DiscInfo.__init__(self) |
---|
35 | self.context = 'unknown' |
---|
36 | self.offset = 0 |
---|
37 | self.valid = self.isDisc(device) |
---|
38 | self.mime = 'unknown/unknown' |
---|
39 | self.type = 'CD' |
---|
40 | self.subtype = 'data' |
---|
41 | |
---|
42 | def isDisc(self, device): |
---|
43 | if DiscInfo.isDisc(self, device) != 2: |
---|
44 | return 0 |
---|
45 | |
---|
46 | return 1 |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | mmpython.registertype( 'cd/unknown', mediainfo.EXTENSION_DEVICE, mediainfo.TYPE_NONE, DataDiscInfo ) |
---|