package ink.wgink.module.file.media.startup;

import ink.wgink.module.file.media.manager.MediaManager;
import ink.wgink.properties.media.MediaProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: MediaStartUp
 * @Description: 启动
 * @Author: WangGeng
 * @Date: 2021/6/8 21:56
 * @Version: 1.0
 **/
@Component
public class ModuleFileMediaStartUp implements ApplicationRunner {

    @Autowired
    private MediaProperties mediaProperties;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        MediaManager.getInstance().setFFmpegPath(mediaProperties.getFfmpegPath());
    }
}
