Example #1
0
	def __init__(self):
		log.trace('__init__ method: Started')

		super(seriesInfo, self).__init__()

		seriesinfo_group = self.options.parser.add_argument_group("Episode Detail Options", description=None)
		seriesinfo_group.add_argument("--sn", "--name", type=str, dest='series_name')
		seriesinfo_group.add_argument("--season", type=int, dest='season')
		seriesinfo_group.add_argument("--epno", type=int, action='append', dest='epno')

		seriesinfo_group.add_argument("--series-only", "--so", dest="get_episodes",
				action="store_false", default=False,
				help="Information to come from MyTrakt.tv")
		'''
		seriesinfo_group.add_argument("--tvdb", dest="processes",
				action="append_const", const='tvdb',
				help="Information to come from TVDB")
		seriesinfo_group.add_argument("--tvrage", dest="processes",
				action="append_const", const='tvrage',
				help="Information to come from TVRage")
		seriesinfo_group.add_argument("--MyTrakt", dest="processes",
				action="append_const", const='MyTrakt',
				help="Information to come from MyTrakt.tv")
		'''

		self.parser = FileParser()

		self.regex_repack = re.compile('^.*(repack|proper).*$', re.IGNORECASE)
		self.check_suffix = re.compile('^(?P<seriesname>.+?)[ \._\-](?P<year>[0-9][0-9][0-9][0-9]|US|us|Us)$', re.VERBOSE)
		self.regex_SeriesDir = re.compile('^{}.*$'.format(self.settings.SeriesDir), re.IGNORECASE)

		self.selected_file = None

		return
Example #2
0
    def __init__(self):
        log.trace('__init__ method: Started')

        super(DownloadDatabase, self).__init__()

        self.db = sqlite3.connect(self.settings.DBFile)
        self.cursor = self.db.cursor()
        self.fileparser = FileParser()
Example #3
0
    def setUp(self):

        TRACE = 5
        VERBOSE = 15

        logger.initialize(unit_test=True, level=INFO)
        self.library = FileParser()
        args = self.library.options.parser.parse_args('--error')
    def setUp(self):

        TRACE = 5
        VERBOSE = 15

        logger.initialize(unit_test=True, level=INFO)
        #        logger.start(level=ERROR)

        self.library = FileParser()
Example #5
0
    def __init__(self):
        log.trace('__init__ method: Started')

        super(CleanDatabase, self).__init__()

        self.db = sqlite3.connect(self.settings.DBFile)
        self.cursor = self.db.cursor()

        self.directory_old = '/mnt/DadVision/Series'
        self.re_dir_old = re.compile('^{}.*$'.format(self.directory_old),
                                     re.IGNORECASE)
        self.re_dir_current = re.compile(
            '^{}.*$'.format(self.settings.SeriesDir), re.IGNORECASE)

        self.fileparser = FileParser()
Example #6
0
    pp = pprint.PrettyPrinter(indent=1, depth=1)
    print '-' * 60
    pp.pprint(answer)
    print '-' * 60


if __name__ == "__main__":

    logger.initialize()

    log.trace("MAIN: -------------------------------------------------")
    from series import FileParser
    import pprint

    library = SeriesInfo()
    parser = FileParser()

    __main__group = library.options.parser.add_argument_group(
        "Get SeriesInfo Information Options", description=None)
    __main__group.add_argument("--Error-Log",
                               dest="errorlog",
                               action="store_true",
                               default=False,
                               help="Create Seperate Log for Errors")

    Library.args = library.options.parser.parse_args(sys.argv[1:])
    log.debug("Parsed command line: {!s}".format(library.args))

    log_level = logging.getLevelName(library.args.loglevel.upper())

    if library.args.logfile == 'daddyvision.log':