예제 #1
0
파일: lsdvd.py 프로젝트: whf839/xbmc-addons
    def __init__(self, device):
        DiscInfo.__init__(self)
        self.context = 'video'
        self.offset = 0
        if mediainfo.DEBUG > 1:
            print 'trying lsdvd for scanning the disc'

        if os.path.isdir(device):
            self.valid = self.isDVDdir(device)
        else:
            self.valid = self.isDisc(device)

        if self.valid and self.tracks:
            self.keys.append('length')
            self.length = 0
            first = 0

            for t in self.tracks:
                self.length += t.length
                if not first:
                    first = t.length

            if self.length / len(self.tracks) == first:
                # badly mastered dvd
                self.length = first

            if mediainfo.DEBUG > 1:
                print 'lsdvd detection ok'

        self.mime = 'video/dvd'
        self.type = 'DVD'
        self.subtype = 'video'
예제 #2
0
    def __init__(self, device):
        DiscInfo.__init__(self)
        self.context = 'video'
        self.offset = 0
        if mediainfo.DEBUG > 1:
            print 'trying lsdvd for scanning the disc'

        if os.path.isdir(device):
            self.valid = self.isDVDdir(device)
        else:
            self.valid = self.isDisc(device)

        if self.valid and self.tracks:
            self.keys.append('length')
            self.length = 0
            first       = 0

            for t in self.tracks:
                self.length += t.length
                if not first:
                    first = t.length
            
            if self.length/len(self.tracks) == first:
                # badly mastered dvd
                self.length = first

            if mediainfo.DEBUG > 1:
                print 'lsdvd detection ok'
            
        self.mime    = 'video/dvd'
        self.type    = 'DVD'
        self.subtype = 'video'
예제 #3
0
 def __init__(self,device):
     DiscInfo.__init__(self)
     self.context = 'unknown'
     self.offset = 0
     self.valid = self.isDisc(device)
     self.mime = 'unknown/unknown'
     self.type = 'CD'
     self.subtype = 'data'
예제 #4
0
 def __init__(self, device):
     DiscInfo.__init__(self)
     self.context = 'unknown'
     self.offset = 0
     self.valid = self.isDisc(device)
     self.mime = 'unknown/unknown'
     self.type = 'CD'
     self.subtype = 'data'
예제 #5
0
 def __init__(self,device):
     DiscInfo.__init__(self)
     self.context = 'video'
     self.offset = 0
     self.valid = self.isDisc(device)
     self.mime = 'video/vcd'
     self.type = 'CD'        
     self.subtype = 'video'
예제 #6
0
 def __init__(self, device):
     DiscInfo.__init__(self)
     self.context = 'video'
     self.offset = 0
     self.valid = self.isDisc(device)
     self.mime = 'video/vcd'
     self.type = 'CD'
     self.subtype = 'video'