(self, filename)
| 564 | |
| 565 | @needsClient |
| 566 | def getFileSwitchState(self, filename): |
| 567 | if filename: |
| 568 | if filename == getMessage("nofile-note"): |
| 569 | return constants.FILEITEM_SWITCH_NO_SWITCH |
| 570 | if self._syncplayClient.userlist.currentUser.file and utils.sameFilename(filename, self._syncplayClient.userlist.currentUser.file['name']): |
| 571 | return constants.FILEITEM_SWITCH_NO_SWITCH |
| 572 | if isURL(filename): |
| 573 | return constants.FILEITEM_SWITCH_STREAM_SWITCH |
| 574 | elif filename not in self.newWatchlist: |
| 575 | if self._syncplayClient.fileSwitch.findFilepath(filename): |
| 576 | return constants.FILEITEM_SWITCH_FILE_SWITCH |
| 577 | else: |
| 578 | self.newWatchlist.extend([filename]) |
| 579 | return constants.FILEITEM_SWITCH_NO_SWITCH |
| 580 | |
| 581 | @needsClient |
| 582 | def isItemUntrusted(self, filename): |
no test coverage detected