Ejemplo n.º 1
0
            return false;
        }
        return $file->get_file_url();
    }
    public function refetch_files()
    {
        foreach (EpisodeAsset::all() as $asset) {
            if ($file = MediaFile::find_by_episode_id_and_episode_asset_id($this->id, $asset->id)) {
                $file->determine_file_size();
                $file->save();
            }
        }
    }
}
Episode::property('id', 'INT NOT NULL AUTO_INCREMENT PRIMARY KEY');
Episode::property('post_id', 'INT');
Episode::property('show_id', 'INT');
Episode::property('subtitle', 'VARCHAR(255)');
Episode::property('summary', 'TEXT');
Episode::property('active', 'INT');
// publicized or not?
Episode::property('enable', 'INT');
// listed in podcast directories or not?
Episode::property('slug', 'VARCHAR(255)');
Episode::property('duration', 'VARCHAR(255)');
Episode::property('cover_art', 'VARCHAR(255)');
Episode::property('chapters', 'TEXT');
// todo: add summary
// episode_number
// season_number
// episode_id nach template, virtual attribute