We were relying on the content's type property for a lot of things with hardcoded types in the app, but Apple hasn't been using type as an enum for a good while.
Changed SessionInstance parsing to use originalPublishingDate as startTime when the content doesn't have hasLiveStream == true, that way the schedule tab will display when the video will be published
Removed hardcoded handling for labs and other special event types and associated special handling for images / shelf since those all have proper image assets now
Showing all available session types in the filter options for the Schedule tab
Tweaked table cells in Schedule tab so that they only show the start and end time for sessions with a live component; for other types of events it only shows the start time; also no longer showing room name (lol)
NOTE: I believe there's a lot more that can be removed from the app with the removal of this special handling for different session types, but I chose to keep this PR as small as possible
NOTE 2: there's a bit of special handling on the backend because Article and Collection are also session types from Apple's API, but we don't support those, so our proxy is filtering them out
NOTE 3: there's a significant migration upon running this version because it will delete all current SessionInstance objects; there's no user data associated with that object so it should be fine (famous last words), but because of that the Schedule tab might be empty for several seconds while content is fetched and indexed (we definitely need to move away from Realm)
We were relying on the content's
type
property for a lot of things with hardcoded types in the app, but Apple hasn't been usingtype
as an enum for a good while.SessionInstance
parsing to useoriginalPublishingDate
asstartTime
when the content doesn't havehasLiveStream == true
, that way the schedule tab will display when the video will be publishedNOTE: I believe there's a lot more that can be removed from the app with the removal of this special handling for different session types, but I chose to keep this PR as small as possible
NOTE 2: there's a bit of special handling on the backend because
Article
andCollection
are also session types from Apple's API, but we don't support those, so our proxy is filtering them outNOTE 3: there's a significant migration upon running this version because it will delete all current
SessionInstance
objects; there's no user data associated with that object so it should be fine (famous last words), but because of that the Schedule tab might be empty for several seconds while content is fetched and indexed (we definitely need to move away from Realm)