mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Properly detect DVDs, VCDs etc.
Submitted by: maintainer
This commit is contained in:
parent
7c916b7187
commit
c220d7c05a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111222
6 changed files with 112 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
PORTNAME= mmpython
|
PORTNAME= mmpython
|
||||||
PORTVERSION= 0.4.2
|
PORTVERSION= 0.4.2
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= multimedia python
|
CATEGORIES= multimedia python
|
||||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||||
|
|
32
multimedia/mmpython/files/patch-disc_discinfo.py
Normal file
32
multimedia/mmpython/files/patch-disc_discinfo.py
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
|
||||||
|
$FreeBSD$
|
||||||
|
|
||||||
|
--- disc/discinfo.py.orig Thu Jun 10 20:51:51 2004
|
||||||
|
+++ disc/discinfo.py Thu Jun 10 20:52:32 2004
|
||||||
|
@@ -223,22 +223,10 @@
|
||||||
|
else:
|
||||||
|
f = open(device,'rb')
|
||||||
|
|
||||||
|
- f.seek(0x0000832d)
|
||||||
|
- if os.uname()[0] == 'FreeBSD':
|
||||||
|
- # why doesn't seeking to 0x0000832d+40 and reading 32 work?
|
||||||
|
- # no idea, do it this way
|
||||||
|
- label = f.read(72);
|
||||||
|
- label = label[40:72]
|
||||||
|
- else:
|
||||||
|
- id = f.read(16)
|
||||||
|
- f.seek(32808, 0)
|
||||||
|
- if os.uname()[0] == 'FreeBSD':
|
||||||
|
- # why doesn't seeking to 32808 + 829 and reading 16 work?
|
||||||
|
- # no idea, do it this way
|
||||||
|
- id = f.read(829);
|
||||||
|
- id = id[813:829]
|
||||||
|
- else:
|
||||||
|
- label = f.read(32)
|
||||||
|
+ f.seek(32768)
|
||||||
|
+ id = f.read(829)
|
||||||
|
+ label = id[40:72]
|
||||||
|
+ id = id[813:829]
|
||||||
|
|
||||||
|
if CREATE_MD5_ID:
|
||||||
|
id_md5 = md5.new()
|
27
multimedia/mmpython/files/patch-disc_dvdinfo.py
Normal file
27
multimedia/mmpython/files/patch-disc_dvdinfo.py
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
$FreeBSD$
|
||||||
|
|
||||||
|
--- disc/dvdinfo.py.orig Thu Jun 10 20:53:51 2004
|
||||||
|
+++ disc/dvdinfo.py Thu Jun 10 20:55:02 2004
|
||||||
|
@@ -115,8 +115,8 @@
|
||||||
|
|
||||||
|
# brute force reading of the device to find out if it is a DVD
|
||||||
|
f = open(device,'rb')
|
||||||
|
- f.seek(32808, 0)
|
||||||
|
- buffer = f.read(50000)
|
||||||
|
+ f.seek(32768, 0)
|
||||||
|
+ buffer = f.read(50040)
|
||||||
|
|
||||||
|
if buffer.find('UDF') == -1:
|
||||||
|
f.close()
|
||||||
|
@@ -148,8 +148,8 @@
|
||||||
|
|
||||||
|
def isDVDiso(self, f):
|
||||||
|
# brute force reading of the device to find out if it is a DVD
|
||||||
|
- f.seek(32808, 0)
|
||||||
|
- buffer = f.read(50000)
|
||||||
|
+ f.seek(32768, 0)
|
||||||
|
+ buffer = f.read(50040)
|
||||||
|
|
||||||
|
if buffer.find('UDF') == -1:
|
||||||
|
return 0
|
16
multimedia/mmpython/files/patch-disc_lsdvd.py
Normal file
16
multimedia/mmpython/files/patch-disc_lsdvd.py
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
$FreeBSD$
|
||||||
|
|
||||||
|
--- disc/lsdvd.py.orig Thu Jun 10 20:55:34 2004
|
||||||
|
+++ disc/lsdvd.py Thu Jun 10 20:58:14 2004
|
||||||
|
@@ -173,8 +173,8 @@
|
||||||
|
|
||||||
|
# brute force reading of the device to find out if it is a DVD
|
||||||
|
f = open(device,'rb')
|
||||||
|
- f.seek(32808, 0)
|
||||||
|
- buffer = f.read(50000)
|
||||||
|
+ f.seek(32768, 0)
|
||||||
|
+ buffer = f.read(50040)
|
||||||
|
|
||||||
|
if buffer.find('UDF') == -1:
|
||||||
|
f.close()
|
18
multimedia/mmpython/files/patch-disc_vcdinfo.py
Normal file
18
multimedia/mmpython/files/patch-disc_vcdinfo.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
$FreeBSD$
|
||||||
|
|
||||||
|
--- disc/vcdinfo.py.orig Thu Jun 10 20:56:21 2004
|
||||||
|
+++ disc/vcdinfo.py Thu Jun 10 20:56:59 2004
|
||||||
|
@@ -62,9 +62,9 @@
|
||||||
|
|
||||||
|
# brute force reading of the device to find out if it is a VCD
|
||||||
|
f = open(device,'rb')
|
||||||
|
- f.seek(32808, 0)
|
||||||
|
- buffer = f.read(50000)
|
||||||
|
- f.close()
|
||||||
|
+ f.seek(32768, 0)
|
||||||
|
+ buffer = f.read(50040)
|
||||||
|
+ f.close()
|
||||||
|
|
||||||
|
if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \
|
||||||
|
buffer.find('ENTRIES.SVD') > 0:
|
18
multimedia/mmpython/files/patch-video_vcdinfo.py
Normal file
18
multimedia/mmpython/files/patch-video_vcdinfo.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
$FreeBSD$
|
||||||
|
|
||||||
|
--- video/vcdinfo.py.orig Thu Jun 10 20:58:51 2004
|
||||||
|
+++ video/vcdinfo.py Thu Jun 10 20:59:19 2004
|
||||||
|
@@ -85,9 +85,9 @@
|
||||||
|
|
||||||
|
# brute force reading of the bin to find out if it is a VCD
|
||||||
|
f = open(bin,'rb')
|
||||||
|
- f.seek(32808, 0)
|
||||||
|
- buffer = f.read(50000)
|
||||||
|
- f.close()
|
||||||
|
+ f.seek(32768, 0)
|
||||||
|
+ buffer = f.read(50040)
|
||||||
|
+ f.close()
|
||||||
|
|
||||||
|
if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \
|
||||||
|
buffer.find('ENTRIES.SVD') > 0:
|
Loading…
Add table
Reference in a new issue