Package: pydvdid
Overviewpydvdidis a pure Python implementation of the Windows APIIDvdInfo2::GetDiscIDmethod, as used by Windows Media Center to compute a ‘practically unique’ 64-bitCRCfor metadata retrieval.MotivationI needed a zero-knowledge way to recover some basic information about an inserted DVD or a mounted ISO image, and whilst googling ran acrossdvdid. 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.pydvdid is envisaged to be useful for DVD ripping scripts, custom Growl notifications, and media centre related home automation tasks.CompatibilityWorks for Python versions 2 and 3, from 2.6 through to the nightly build.AvailabilityGet it from PyPI or directly from GitHub.PyPI:pipinstallpydvdidGitHub:ReleasesExamplesFrom the shell:steve@babbage:~$crc64=$(pydvdid/mnt/dvd)steve@babbage:~$echo$crc646e23e6a41a154405steve@babbage:~$curl--gethttp://metaservices.windowsmedia.com/pas_dvd_B/template/GetMDRDVDByCRC.xml?CRC=$crc64<?xmlversion='1.0'encoding="UTF-8"?><METADATAxmlns:sql="urn:schemas-microsoft-com:xml-sql"><MDR-DVD><version>4.0</version><dvdTitle>LEGOStarWars:ThePadawanMenace[French][Blu-ray/DVD]</dvdTitle><studio>20thCenturyFoxHomeEntertainment(Canadian</studio><leadPerformer></leadPerformer><actors></actors><director></director><MPAARating></MPAARating><releaseDate>20120207</releaseDate><genre>ScienceFiction</genre><dataProvider>AMG</dataProvider><wmid_dvd>7DDE9379-18E0-446A-8214-BCD3D573A54A</wmid_dvd><dv_id>E278184</dv_id><dataProviderParams>Provider=AMG</dataProviderParams><dataProviderLogo>Provider=AMG</dataProviderLogo><moreInfoParams></moreInfoParams><title><titleNum>1</titleNum><titleTitle>LEGOStarWars:ThePadawanMenace[French][Blu-ray/DVD]</titleTitle><studio>20thCenturyFoxHomeEntertainment(Canadian</studio><director></director><leadPerformer></leadPerformer><actors></actors><MPAARating></MPAARating><genre>ScienceFiction</genre><providerRating></providerRating><communityRating></communityRating></title></MDR-DVD></METADATA>From Python:pydvdid has a decidely simple API, with the important bits imported into the package level so they can be conveniently imported directly from the package.>>>frompydvdidimportcompute>>>crc64=compute("/mnt/dvd")>>>str(crc64)'a5acf20f2e56954b'>>>fromurllibimporturlopen>>>urlopen("http://metaservices.windowsmedia.com/pas_dvd_B/template/GetMDRDVDByCRC.xml?CRC={0}".format(crc64)).read()'<?xml version=\'1.0\'encoding="UTF-8" ?><METADATA xmlns:sql="urn:schemas-microsoft-com:xml-sql">\r\n\t\r\n\t<MDR-DVD><version>4.0</version><dvdTitle>Room on the Broom</dvdTitle><studio>N Circle Entertainment</studio><leadPerformer>Gillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy Spall</leadPerformer><actors>Gillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy Spall</actors><director>Jan Lachauer; Max Lang</director><MPAARating></MPAARating><releaseDate>2013 08 06</releaseDate><genre>Children&apos;s/Family</genre><largeCoverParams>cov150/drv600/v691/v69118k4p4h.jpg</largeCoverParams><smallCoverParams>cov075/drv600/v691/v69118k4p4h.jpg</smallCoverParams><dataProvider>AMG</dataProvider><wmid_dvd>E568D84B-4CB8-4296-8896-716DDCFA1458</wmid_dvd><dv_id>E   303360          </dv_id><dataProviderParams>Provider=AMG</dataProviderParams><dataProviderLogo>Provider=AMG</dataProviderLogo><moreInfoParams></moreInfoParams><title><titleNum>1</titleNum><titleTitle>Room on the Broom</titleTitle><studio>N Circle Entertainment</studio><director>Jan Lachauer; Max Lang</director><leadPerformer>Gillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy Spall</leadPerformer><actors>Gillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy Spall</actors><MPAARating></MPAARating><genre>Children&apos;s/Family</genre><providerRating></providerRating><communityRating></communityRating><chapter><chapterNum>1</chapterNum><chapterTitle>Scene One [4:47]</chapterTitle></chapter><chapter><chapterNum>2</chapterNum><chapterTitle>Scene Two [7:29]</chapterTitle></chapter><chapter><chapterNum>3</chapterNum><chapterTitle>Scene Three [4:31]</chapterTitle></chapter><chapter><chapterNum>4</chapterNum><chapterTitle>Scene Four [9:55]</chapterTitle></chapter></title></MDR-DVD>\r\n</METADATA>'LicenseApache License, Version 2.0