Esempio n. 1
0
    def __init__(self, path):
        '''
        use movie title information contained in <path>'s filename to init

        path: path to target movie file
        '''

        # split pathname into useful things upon creation
        self.__abspath = uni(os.path.abspath(path))
        self.__dirpath = uni(os.path.split(self.__abspath)[0])
        self.__filename = os.path.splitext(os.path.split(self.__abspath)[1])
        self.basename = uni(self.__filename[0])
        self.ext = uni(self.__filename[1])
        # extract the title and year from the basename
        self.title = split_full_title(self.basename, False)['title']
        self.year = split_full_title(self.basename)['year']
        self.full_title = self.title + ' (' + self.year + ')'
        # unicode support
        self.uni_title = split_full_title(self.basename)['title']
        self.uni_full_title = self.uni_title + ' (' + self.year + ')'
        self.tmdb_data = None
        self.matched_method = None
Esempio n. 2
0
 def __init__(self, name, language, interactive, max_results):
     self.seriesname = uni(name)
     match = self.__get_series_match(self.seriesname, language, interactive,
                                      max_results)
     self.series_data = self.__get_series_info(match.tvdbId, language)
Esempio n. 3
0
def parse_path(path):
    if path == '.' or path == './':
        return uni(os.getcwd())
    return uni(os.path.join(os.getcwd(), path))