(self, filePath, index=-1)
| 2016 | self.playlist.setPlaylistIndexFilename(filename) |
| 2017 | |
| 2018 | def addFileToPlaylist(self, filePath, index=-1): |
| 2019 | if not isURL(filePath): |
| 2020 | self.removePlaylistNote() |
| 2021 | filename = os.path.basename(filePath) |
| 2022 | if self.noPlaylistDuplicates(filename): |
| 2023 | if self.playlist == -1 or index == -1: |
| 2024 | self.playlist.addItem(filename) |
| 2025 | else: |
| 2026 | self.playlist.insertItem(index, filename) |
| 2027 | self._syncplayClient.fileSwitch.notifyUserIfFileNotInMediaDirectory(filename, filePath) |
| 2028 | else: |
| 2029 | self.removePlaylistNote() |
| 2030 | if self.noPlaylistDuplicates(filePath): |
| 2031 | if self.playlist == -1 or index == -1: |
| 2032 | self.playlist.addItem(filePath) |
| 2033 | else: |
| 2034 | self.playlist.insertItem(index, filePath) |
| 2035 | |
| 2036 | def openFile(self, filePath, resetPosition=False, fromUser=False): |
| 2037 | self._syncplayClient.openFile(filePath, resetPosition, fromUser=fromUser) |
no test coverage detected