package ctbrec.ui.sites.manyvids;

import java.io.IOException;
import java.util.List;

import ctbrec.Model;
import ctbrec.sites.manyvids.MVLive;
import ctbrec.ui.tabs.PaginatedScheduledService;
import javafx.concurrent.Task;

public class MVLiveUpdateService extends PaginatedScheduledService {

    private MVLive mvlive;

    public MVLiveUpdateService(MVLive mvlive) {
        this.mvlive = mvlive;
    }

    @Override
    protected Task<List<Model>> createTask() {
        return new Task<List<Model>>() {
            @Override
            public List<Model> call() throws IOException {
                return mvlive.getModels();
            }
        };
    }
}
