+PodSchema.pre('remove', function (next) {
+ // Remove the videos owned by this pod too
+ Video.listByUrl(this.url, function (err, videos) {
+ if (err) return next(err)
+
+ each(videos, function (video, callbackEach) {
+ video.remove(callbackEach)
+ }, next)
+ })
+})
+