mmmmmtasty / SportScanner

Scanner and Metadata Agent for Plex that uses sportdb
101 stars 31 forks source link

Y22bug - Create 9-char episode number if it's 2022 #41

Closed jbalcorn closed 2 years ago

jbalcorn commented 2 years ago

Episode numbers are copied to the index field in the metadata_items table internally in Plex. It's a 32-bit unsigned integer so it has a maximum value of 2,147,483,647. When we create a 10-digit episode number in 2022 it starts at 2,200,000,000 and overflows the index attribute, so it gets a -1.

Since all the events for that season on that day have the same index, they show up as the same event.

This code implements a kludge - just make the episodes 9 characters long if they're after 2021. We leave the code the same for older events so that the code continues to generate the same episode number for the same file.

This PR includes corrected code.

jbalcorn commented 2 years ago

Addresses issue #38

jbalcorn commented 2 years ago

Actually Issue #37