brandan-schmitz / plexbot

Plexbot - A discord bot for automating movie libraries.
0 stars 0 forks source link

Some media is getting empty codec from mediainfo #78

Closed brandan-schmitz closed 3 years ago

brandan-schmitz commented 3 years ago

Some media files when scanned with mediainfo are not returning anything for the Encoded_Library_Name field in the video section. A check should be added to see if this is returning as empty and if it is, then it should check the Internet media type field and just remove the video/prefix that is returned there.

The check for if a file is optimized will need to be adapted for this change as well. If the field above returns something containing H265 then the file is optimized, otherwise it is not. If the above uses the secondary check field and finds a media file is optimized, it should also set the codec value to x265 so it matches the others in the database given that is what it actually is.