|
|
|
@ -19,6 +19,9 @@ from ArtNet.web.link_generator import LinkGenerator
|
|
|
|
|
|
|
|
|
|
class Window(QtWidgets.QMainWindow):
|
|
|
|
|
|
|
|
|
|
UNKNOWN_TITLE = "-Title Unknown-"
|
|
|
|
|
UNKNOWN_PRESENCE = "(Not in Database)"
|
|
|
|
|
|
|
|
|
|
def __init__(self, main):
|
|
|
|
|
super(Window, self).__init__()
|
|
|
|
|
|
|
|
|
@ -130,7 +133,7 @@ class Window(QtWidgets.QMainWindow):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
new_title = self.curr_image_title
|
|
|
|
|
if new_title == self.curr_file_name or len(new_title) == 0:
|
|
|
|
|
if new_title == self.curr_file_name or len(new_title) == 0 or new_title == Window.UNKNOWN_TITLE:
|
|
|
|
|
new_title = None
|
|
|
|
|
image_data = {
|
|
|
|
|
"ID": self.curr_art_id,
|
|
|
|
@ -143,7 +146,7 @@ class Window(QtWidgets.QMainWindow):
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for presence in self.curr_presences:
|
|
|
|
|
if presence[-1] == "(Not in Database)":
|
|
|
|
|
if presence[-1] == Window.UNKNOWN_PRESENCE:
|
|
|
|
|
msg = QtWidgets.QMessageBox()
|
|
|
|
|
msg.setWindowTitle("Invalid Presence Domain")
|
|
|
|
|
msg.setInformativeText("You've tried to save with a not working presence entry! " +
|
|
|
|
@ -302,10 +305,10 @@ class Window(QtWidgets.QMainWindow):
|
|
|
|
|
"""
|
|
|
|
|
if len(presences) > 1:
|
|
|
|
|
for name, domain in presences:
|
|
|
|
|
if domain == "(Not in Database)":
|
|
|
|
|
if domain == Window.UNKNOWN_PRESENCE:
|
|
|
|
|
presences.remove((name, domain))
|
|
|
|
|
elif len(presences) == 0:
|
|
|
|
|
presences = [(self.curr_art_path.split("/")[0], "(Not in Database)")]
|
|
|
|
|
presences = [(self.curr_art_path.split("/")[0], Window.UNKNOWN_PRESENCE)]
|
|
|
|
|
self.curr_presences = presences
|
|
|
|
|
|
|
|
|
|
if self.curr_presences is not None:
|
|
|
|
@ -529,7 +532,7 @@ class Window(QtWidgets.QMainWindow):
|
|
|
|
|
self.ui.image_label.setMovie(self.__pixmap)
|
|
|
|
|
self.__pixmap.start()
|
|
|
|
|
self.__pixmap.frameChanged.connect(self.on_movie_frame_changed)
|
|
|
|
|
elif file_ending in ["webm"]:
|
|
|
|
|
elif file_ending in ["webm", "mp4", "mov"]:
|
|
|
|
|
self.__showing_video = True
|
|
|
|
|
self.__video = QVideoWidget()
|
|
|
|
|
self.__player = QtMultimedia.QMediaPlayer(None, QtMultimedia.QMediaPlayer.VideoSurface)
|
|
|
|
|