def uploadCuesheet(self):
        try:
            # Always check for saving the last marker
            if config.EMC.movie_save_lastplayed.value is True:
                self.__saveOldLast()

            # Is there native cuesheet support
            cue = InfoBarCueSheetSupport._InfoBarCueSheetSupport__getCuesheet(
                self)

            if cue is None or (cue and not cue.getCutList()):
                # No native cuesheet support
                # Update local cut list, maybe there is a newer one
                #TODO to be tested
                #self.__readCutFile(True)
                if hasattr(self, "service") and self.service:
                    path = self.service.getPath()
                    self.__newPath(path)
                    self.__writeCutFile()
            else:
                # Native cuesheet support
                if isDreamOS and self.service:
                    if self.service.getPath().rsplit('.')[-1] == "mkv":
                        path = self.service.getPath()
                        self.__newPath(path)
                        self.__writeCutFile()
                    else:
                        cue.setCutList(self.cut_list)
                else:
                    cue.setCutList(self.cut_list)
        except Exception, e:
            emcDebugOut("[CUTS] uploadCuesheet exception:" + str(e))
	def uploadCuesheet(self):
		try:
			# Always check for saving the last marker
			if config.EMC.movie_save_lastplayed.value is True:
				self.__saveOldLast()

			# Is there native cuesheet support
			cue = InfoBarCueSheetSupport._InfoBarCueSheetSupport__getCuesheet(self)

			if cue is None or (cue and not cue.getCutList()):
				# No native cuesheet support
				# Update local cut list, maybe there is a newer one
				#TODO to be tested
				#self.__readCutFile(True)
				if hasattr(self, "service") and self.service:
					path = self.service.getPath()
					self.__newPath(path)
					self.__writeCutFile()
			else:
				# Native cuesheet support
				if isDreamOS and self.service:
					if self.service.getPath().rsplit('.')[-1] == "mkv":
						path = self.service.getPath()
						self.__newPath(path)
						self.__writeCutFile()
					else:
						cue.setCutList(self.cut_list)
				else:
					cue.setCutList(self.cut_list)
		except Exception, e:
			emcDebugOut("[CUTS] uploadCuesheet exception:" + str(e))
Beispiel #3
0
	def uploadCuesheet(self):
		#print("MVC: CutList: uploadCuesheet")
		# Is there native cuesheet support
		cue = InfoBarCueSheetSupport._InfoBarCueSheetSupport__getCuesheet(self)

		if cue is None or (cue and not cue.getCutList()):
			# No native cuesheet support
			# Update local cut list, maybe there is a newer one
			if hasattr(self, "service") and self.service:
				path = self.service.getPath()
				self.cut_file = self.__newPath(path)
				self.__writeCutFile(self.cut_file, self.cut_list)
		else:
			# Native cuesheet support
			if self.service:
				if self.service.getPath().rsplit('.')[-1] == "mkv":
					path = self.service.getPath()
					self.cut_file = self.__newPath(path)
					self.__writeCutFile(self.cut_file, self.cut_list)
				else:
					cue.setCutList(self.cut_list)
			else:
				cue.setCutList(self.cut_list)