CinemaVision / script.cinemavision

The core CinemaVision add-on for Kodi.
http://www.cinemavision.tv/
Other
9 stars 16 forks source link

Use filename for Atmos/DTS-X detection #4

Closed midgetspy closed 8 years ago

midgetspy commented 8 years ago

If a file is tagged in Kodi as Dolby TrueHD an additional check will be performed to see if its filename contains ".Atmos." (or similar). If so the audio format will be Dolby Atmos rather than Dolby TrueHD.

Similarly if a file is tagged in Kodi as DTS-HD Master Audio an additional check will be performed to see if its filename contains ".DTS.X." (or similar). If so the audio format will be DTS-X rathor than DTS-HD Master Audio.

In each case a regex is used to prevent false positives. When Kodi can detect and tag Atmos/DTS-X this code path can be safely removed without change in functionality.

See the discussion here for the pros and cons: http://cinemavision.tv/forums/topic/414-how-does-cinemavision-recognize-atmosdtsx-content-for-audio-bumpers/

I wasn't sure about the style, it didn't seem to be following PEP8 so I just winged it.

ruuk commented 8 years ago

Thanks for the addition.

My IDE is set for PEP8, but I have line length checking set at 160 because that's just the way I roll :)