# Path: subdownloader/movie.py
# class LocalMovie(object):
#     def __init__(self):
#         self._movie_name = None
#         self._imdb_id = None
#         self._language = UnknownLanguage.create_generic()
#         self._release_name = None
#         self._comments = None
#         self._author = None
# 
#         self._hearing_impaired = None
#         self._high_definition = None
#         self._foreign_only = None
#         self._automatic_translation = None
# 
#         self._data = []
# 
#     def add_video_subtitle(self, video, subtitle):
#         self._data.append(VideoSubtitle(video, subtitle))
# 
#     def check(self):
#         video_paths = set()
#         subtitle_paths = set()
#         for data in self._data:
#             if not data.check():
#                 return False
#             vfp = str(data.video.get_filepath().resolve())
#             if vfp in video_paths:
#                 return False
#             video_paths.add(vfp)
# 
#             sfp = str(data.subtitle.get_filepath().resolve())
#             if sfp in subtitle_paths:
#                 return False
#         if self._language.is_generic():
#             return False
#         return True
# 
#     def get_data(self):
#         return self._data
# 
#     def set_data(self, data):
#         self._data = data
# 
#     def iter_video_subtitles(self):
#         for d in self._data:
#             yield d.video, d.subtitle
# 
#     def set_movie_name(self, movie_name):
#         self._movie_name = movie_name
# 
#     def get_movie_name(self):
#         return self._movie_name
# 
#     def set_imdb_id(self, imdb_id):
#         self._imdb_id = imdb_id
# 
#     def get_imdb_id(self):
#         return self._imdb_id
# 
#     def set_language(self, language):
#         self._language = language
# 
#     def get_language(self):
#         return self._language
# 
#     def set_release_name(self, release_name):
#         self._release_name = release_name
# 
#     def get_release_name(self):
#         return self._release_name
# 
#     def set_comments(self, comments):
#         self._comments = comments
# 
#     def get_comments(self):
#         return self._comments
# 
#     def set_author(self, author):
#         self._author = author
# 
#     def get_author(self):
#         return self._author
# 
#     def set_hearing_impaired(self, hearing_impaired):
#         self._hearing_impaired = hearing_impaired
# 
#     def is_hearing_impaired(self):
#         return self._hearing_impaired
# 
#     def set_high_definition(self, high_definition):
#         self._high_definition = high_definition
# 
#     def is_high_definition(self):
#         return self._high_definition
# 
#     def set_foreign_only(self, foreign_only):
#         self._foreign_only = foreign_only
# 
#     def is_foreign_only(self):
#         return self._foreign_only
# 
#     def set_automatic_translation(self, automatic_translation):
#         self._automatic_translation = automatic_translation
# 
#     def is_automatic_translation(self):
#         return self._automatic_translation
# 
# class VideoSubtitle(object):
#     def __init__(self, video=None, subtitle=None):
#         self.video = video
#         self.subtitle = subtitle
# 
#     def check(self):
#         if not self.video or not self.video.exists():
#             return False
#         if not self.subtitle or not self.subtitle.exists():
#             return False
#         return True


import logging
from subdownloader.movie import LocalMovie, VideoSubtitle
from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot, QAbstractTableModel, QModelIndex
# -*- coding: utf-8 -*-
# Copyright (c) 2019 SubDownloader Developers - See COPYING - GPLv3



log = logging.getLogger('subdownloader.client.gui.models.upload')


class UploadDataCollection(object):
    NB_COLS = 2
    COL_VIDEO = 0
    COL_SUB = 1

    def __init__(self):
        self._local_movie = LocalMovie()

    def set_local_movie(self, local_movie):
        self._local_movie = local_movie

    def reset_size(self, nb=2):

# Path: subdownloader/movie.py
# class LocalMovie(object):
#     def __init__(self):
#         self._movie_name = None
#         self._imdb_id = None
#         self._language = UnknownLanguage.create_generic()
#         self._release_name = None
#         self._comments = None
#         self._author = None
# 
#         self._hearing_impaired = None
#         self._high_definition = None
#         self._foreign_only = None
#         self._automatic_translation = None
# 
#         self._data = []
# 
#     def add_video_subtitle(self, video, subtitle):
#         self._data.append(VideoSubtitle(video, subtitle))
# 
#     def check(self):
#         video_paths = set()
#         subtitle_paths = set()
#         for data in self._data:
#             if not data.check():
#                 return False
#             vfp = str(data.video.get_filepath().resolve())
#             if vfp in video_paths:
#                 return False
#             video_paths.add(vfp)
# 
#             sfp = str(data.subtitle.get_filepath().resolve())
#             if sfp in subtitle_paths:
#                 return False
#         if self._language.is_generic():
#             return False
#         return True
# 
#     def get_data(self):
#         return self._data
# 
#     def set_data(self, data):
#         self._data = data
# 
#     def iter_video_subtitles(self):
#         for d in self._data:
#             yield d.video, d.subtitle
# 
#     def set_movie_name(self, movie_name):
#         self._movie_name = movie_name
# 
#     def get_movie_name(self):
#         return self._movie_name
# 
#     def set_imdb_id(self, imdb_id):
#         self._imdb_id = imdb_id
# 
#     def get_imdb_id(self):
#         return self._imdb_id
# 
#     def set_language(self, language):
#         self._language = language
# 
#     def get_language(self):
#         return self._language
# 
#     def set_release_name(self, release_name):
#         self._release_name = release_name
# 
#     def get_release_name(self):
#         return self._release_name
# 
#     def set_comments(self, comments):
#         self._comments = comments
# 
#     def get_comments(self):
#         return self._comments
# 
#     def set_author(self, author):
#         self._author = author
# 
#     def get_author(self):
#         return self._author
# 
#     def set_hearing_impaired(self, hearing_impaired):
#         self._hearing_impaired = hearing_impaired
# 
#     def is_hearing_impaired(self):
#         return self._hearing_impaired
# 
#     def set_high_definition(self, high_definition):
#         self._high_definition = high_definition
# 
#     def is_high_definition(self):
#         return self._high_definition
# 
#     def set_foreign_only(self, foreign_only):
#         self._foreign_only = foreign_only
# 
#     def is_foreign_only(self):
#         return self._foreign_only
# 
#     def set_automatic_translation(self, automatic_translation):
#         self._automatic_translation = automatic_translation
# 
#     def is_automatic_translation(self):
#         return self._automatic_translation
# 
# class VideoSubtitle(object):
#     def __init__(self, video=None, subtitle=None):
#         self.video = video
#         self.subtitle = subtitle
# 
#     def check(self):
#         if not self.video or not self.video.exists():
#             return False
#         if not self.subtitle or not self.subtitle.exists():
#             return False
#         return True


# Path: subdownloader/client/gui/models/upload.py
import logging
from subdownloader.movie import LocalMovie, VideoSubtitle
from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot, QAbstractTableModel, QModelIndex

# -*- coding: utf-8 -*-
# Copyright (c) 2019 SubDownloader Developers - See COPYING - GPLv3



log = logging.getLogger('subdownloader.client.gui.models.upload')


class UploadDataCollection(object):
    NB_COLS = 2
    COL_VIDEO = 0
    COL_SUB = 1

    def __init__(self):
        self._local_movie = LocalMovie()

    def set_local_movie(self, local_movie):
        self._local_movie = local_movie

    def reset_size(self, nb=2):

        self._local_movie.set_data([VideoSubtitle() for _ in range(nb)])