本文整理汇总了Python中movie.Movie.original_file_name方法的典型用法代码示例。如果您正苦于以下问题:Python Movie.original_file_name方法的具体用法?Python Movie.original_file_name怎么用?Python Movie.original_file_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类movie.Movie
的用法示例。
在下文中一共展示了Movie.original_file_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_movies_run
# 需要导入模块: from movie import Movie [as 别名]
# 或者: from movie.Movie import original_file_name [as 别名]
def load_movies_run(self, filepaths):
renaming_rule = utils.preferences.value("renaming_rule").toString()
# loop on file paths
for filepath in filepaths:
# set loading label text, show current file name
self.ui.label_loading.setText(QApplication.translate('GUI', "Getting information from ")\
+ os.path.split(filepath)[1])
# create a new movie object
movie = Movie(filepath)
# generate new movie name based on renaming rule
movie.generate_new_name(renaming_rule)
# add movie to list
self.movies.append(movie)
# insert a new row in movie table
self.ui.table_movies.insertRow(self.ui.table_movies.rowCount())
# create a table item with original movie file name
item_original_name = QTableWidgetItem(movie.original_file_name())
item_original_name.setForeground(QBrush(Qt.black))
self.ui.table_movies.setItem(self.ui.table_movies.rowCount() - 1, 0, item_original_name)
# create a table item with new movie file name
item_new_name = QTableWidgetItem(movie.new_file_name())
item_new_name.setForeground(QBrush(Qt.black))
self.ui.table_movies.setItem(self.ui.table_movies.rowCount() - 1, 1, item_new_name)
self.load_movies_finished.emit()