Migration 22 to 23 issue
When we switched to model 23, we also changed the way we identify a playlist, by going from counting the number of subitems to identifying relevant extensions, and tagging such files as file_type = IFile::Type::Playlist
in the Task
table.
However, old tasks weren't flagged with the playlist file_type
.
This causes an issue when we try to process an incomplete task, as it will now be handled as a media.
When the existing entities are being restored, we fetch the file first, and get its associated media, which is nowhere to be found, causing the assertion
else if ( item.media() == nullptr )
{
// If we have a file but no media, this is a problem, we can analyze as
// much as we want, but won't be able to store anything.
// Keep in mind that if we are in this code path, we are not analyzing
// a playlist.
assert( false );
return Status::Fatal;
}
to trigger in debug, or the task to be ignored due to a failure in release.
In all cases, the Task was created with a file_type
of Main
There are two cases to handle:
- The file has been created, and we can update all tasks which are pointing to a playlist instead of a media
- The file was not created, in which case the easiest way out is probably to remove the task and wait for the reload to detect it again