pydvdid2
Overview
pydvdid2 is a continuation of the stale pydvdid Python
package. Just like its predecessor, this library is a pure Python
implementation of the Windows API IDvdInfo2::GetDiscID method,
as used by Windows Media Center to compute a 'practically unique' 64-bit
CRC for metadata retrieval.
Differences from pydvdid
- Integrated pull request #1 by rlaphoenix in the original repo, making it possible to calculate the CRC64 without mounting the disk
- Introduced a
pyproject.toml - Dependencies have been updated
- Typings have been added where possible
- Fixed some logic error discovered during typing
Motivation
I needed a zero-knowledge way to recover some basic information about an inserted DVD or a mounted ISO image, and whilst googling ran across dvdid. A compiled solution didn't fit with my requirement, so I re-implemented it as a Python module. Kudos go to Christopher Key for originally developing dvdid and documenting the algorithm so thoroughly.
pydvdid2 is envisaged to be useful for DVD ripping scripts, custom Growl notifications, and media centre related home automation tasks.
Compatibility
Works only with Python 3.
Support for Windows, Mac OS and Linux.
Availability
Get it from PyPI or directly from GitHub.
PyPI
|PyPI status| |PyPI version| |PyPI format| |PyPI python versions|
pip install pydvdid2
GitHub
Download a tagged version from the releases page, if available.
Examples
From the shell
$ crc64=$(pydvdid2 /dev/sr0)
$ echo $crc64
f8f9d45140065acc
$ curl --get https://1337server.pythonanywhere.com/api/v1/?mode=s&crc64=$crc64
{
"mode": "search",
"results": {
"0": {
"crc_id": "f8f9d45140065acc",
"date_added": "2023-02-04 20:47:28.839849",
"disctype": "None",
"hasnicetitle": "True",
"imdb_id": "tt0208092",
"label": "SNATCH",
"no_of_titles": "None",
"poster_img": "None",
"title": "Snatch",
"tmdb_id": "None",
"validated": "False",
"video_type": "movie",
"year": "2000"
}
},
"success": true
}
From Python
pydvdid2 has a decidely simple API, with the important bits imported into the package level so they can be conveniently imported directly from the package.
>>> from pydvdid import compute
>>> crc64 = compute("/dev/sr0") # or "E:" e.t.c
>>> str(crc64)
'f8f9d45140065acc'
>>> from urllib import urlopen
>>> urlopen(f"https://1337server.pythonanywhere.com/api/v1/?mode=s&crc64={crc64}").read()
{
"mode": "search",
"results": {
"0": {
"crc_id": "f8f9d45140065acc",
"date_added": "2023-02-04 20:47:28.839849",
"disctype": "None",
"hasnicetitle": "True",
"imdb_id": "tt0208092",
"label": "SNATCH",
"no_of_titles": "None",
"poster_img": "None",
"title": "Snatch",
"tmdb_id": "None",
"validated": "False",
"video_type": "movie",
"year": "2000"
}
},
"success": true
}
License
Apache License, Version 2.0
Metadata
Release files for pydvdid2 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pydvdid2-2.0.0.tar.gz | 18.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydvdid2-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.0 kB
Release files / pydvdid2-2.0.0.tar.gz
| Download URL | pydvdid2-2.0.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae73fd0b4df31b46855d0aa799a22abb825c77ee5e2615be33748237f79015f9
|
|
BLAKE2b-256 checksum How to use checksums |
4fa2bfb5d59c83b8d71318d66ee199dce505bee097fefa388a4759138cbc0949
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / pydvdid2-2.0.0-py3-none-any.whl
| Download URL | pydvdid2-2.0.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be5ac55d34be114197806aa186a7e500928c2be0a8d852e1cf1dce23aea88cd8
|
|
BLAKE2b-256 checksum How to use checksums |
691bd6a34528a3998848c130feb7b36726f1dc6bb4b46641ae3417ffa68a2454
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for pydvdid2 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.