Package Manager

Examples of Manager.SubTitleManager


        _filesManager = filesManager;
        _log = logManager;
    }

    public void downloadSubTitles() {
        SubTitleManager subManager = new SubTitleManager(_config, _log);

        _log.initiateDownloading();
        try {
            List<VideoFileVO> listVideo = _filesManager.getVideosWithoutSubTitles();
            // Pega os Handlers
            HashMap<IDownloadHandler, DownloadHandlerVO> downloadHandlers = _config.getDownloadHandlers();
            // Vê se acha a bagaça nos Handlers
            for (Map.Entry<IDownloadHandler, DownloadHandlerVO> handler : downloadHandlers.entrySet()) {
                if (listVideo.isEmpty()) {
                    break;
                }
                // Pego as legendas para os filmes
                try {
                    subManager.setListaVideo(listVideo);
                    subManager.downloadSubTitles(handler.getKey(), handler.getValue());
                    for (VideoFileVO videoVO : subManager.getListaVideoSaved())
                        _log.SavedSubTitle(videoVO.getFileName(), videoVO.getSubTitleVO().getFileName(), handler.getKey().getDescription());
                } catch (Exception e) {
                    _log.ServerError(handler.getKey().getDescription(), e);
                }
                // Tira os que consegui pegar a legenda, os que sobraram vão para o próximo loop no próximo handler
View Full Code Here

TOP

Related Classes of Manager.SubTitleManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.