Add /next command (#518)

* Add next command

* Add /next command to English and Russian /help list

* Add commandlist-notification/next stubs
This commit is contained in:
Radif Tazetdinov 2022-04-09 14:34:46 +03:00 committed by GitHub
parent c89b73cbd7
commit b7b80df01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 14 additions and 0 deletions

View File

@ -129,6 +129,7 @@ COMMANDS_QUEUEANDSELECT = ['queueandselect','qas']
COMMANDS_PLAYLIST = ['playlist', 'ql', 'pl'] COMMANDS_PLAYLIST = ['playlist', 'ql', 'pl']
COMMANDS_SELECT = ['select', 'qs'] COMMANDS_SELECT = ['select', 'qs']
COMMANDS_DELETE = ['delete', 'd', 'qd'] COMMANDS_DELETE = ['delete', 'd', 'qd']
COMMANDS_NEXT = ["next", "qn"]
MPC_MIN_VER = "1.6.4" MPC_MIN_VER = "1.6.4"
MPC_BE_MIN_VER = "1.5.2.3123" MPC_BE_MIN_VER = "1.5.2.3123"
VLC_MIN_VERSION = "2.2.1" VLC_MIN_VERSION = "2.2.1"

View File

@ -92,6 +92,7 @@ de = {
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate "commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate
"commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate "commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate
"commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate "commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate "commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate
"syncplay-version-notification": "Syncplay Version: {}", # syncplay.version "syncplay-version-notification": "Syncplay Version: {}", # syncplay.version
"more-info-notification": "Weitere Informationen auf: {}", # projectURL "more-info-notification": "Weitere Informationen auf: {}", # projectURL

View File

@ -92,6 +92,7 @@ en = {
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", "commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it",
"commandList-notification/playlist": "\tql - show the current playlist", "commandList-notification/playlist": "\tql - show the current playlist",
"commandList-notification/select": "\tqs [index] - select given entry in the playlist", "commandList-notification/select": "\tqs [index] - select given entry in the playlist",
"commandList-notification/next": "\tqn - select next entry in the playlist",
"commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", "commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist",
"syncplay-version-notification": "Syncplay version: {}", # syncplay.version "syncplay-version-notification": "Syncplay version: {}", # syncplay.version
"more-info-notification": "More info available at: {}", # projectURL "more-info-notification": "More info available at: {}", # projectURL

View File

@ -92,6 +92,7 @@ es = {
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate "commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate
"commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate "commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate
"commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate "commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate "commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate
"syncplay-version-notification": "Versión de Syncplay: {}", # syncplay.version "syncplay-version-notification": "Versión de Syncplay: {}", # syncplay.version
"more-info-notification": "Más información disponible en: {}", # projectURL "more-info-notification": "Más información disponible en: {}", # projectURL

View File

@ -91,6 +91,7 @@ fr = {
"commandList-notification/queue": "\tqa [fichier/url] - ajoute un fichier ou une URL au bas de la liste de lecture", "commandList-notification/queue": "\tqa [fichier/url] - ajoute un fichier ou une URL au bas de la liste de lecture",
"commandList-notification/playlist": "\tql - afficher la liste de lecture actuelle", "commandList-notification/playlist": "\tql - afficher la liste de lecture actuelle",
"commandList-notification/select": "\tqs [index] - sélectionnez l'entrée donnée dans la liste de lecture", "commandList-notification/select": "\tqs [index] - sélectionnez l'entrée donnée dans la liste de lecture",
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - supprime l'entrée donnée de la liste de lecture", "commandList-notification/delete": "\tqd [index] - supprime l'entrée donnée de la liste de lecture",
"syncplay-version-notification": "Version de Syncplay: {}", # syncplay.version "syncplay-version-notification": "Version de Syncplay: {}", # syncplay.version
"more-info-notification": "Plus d'informations disponibles sur: {}", # projectURL "more-info-notification": "Plus d'informations disponibles sur: {}", # projectURL

View File

@ -92,6 +92,7 @@ it = {
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate "commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate
"commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate "commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate
"commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate "commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate "commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate
"syncplay-version-notification": "Versione di Syncplay: {}", # syncplay.version "syncplay-version-notification": "Versione di Syncplay: {}", # syncplay.version
"more-info-notification": "Maggiori informazioni a: {}", # projectURL "more-info-notification": "Maggiori informazioni a: {}", # projectURL

View File

@ -93,6 +93,7 @@ pt_BR = {
"commandList-notification/queueandselect": "\tqas [arquivo/url] - adiciona um arquivo ou URL para o final da playlist e o seleciona", "commandList-notification/queueandselect": "\tqas [arquivo/url] - adiciona um arquivo ou URL para o final da playlist e o seleciona",
"commandList-notification/playlist": "\tql - mostra a playlist atual", "commandList-notification/playlist": "\tql - mostra a playlist atual",
"commandList-notification/select": "\tqs [índice] - seleciona um item da playlist", "commandList-notification/select": "\tqs [índice] - seleciona um item da playlist",
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - remove um item da playlist", "commandList-notification/delete": "\tqd [index] - remove um item da playlist",
"syncplay-version-notification": "Versão do Syncplay: {}", # syncplay.version "syncplay-version-notification": "Versão do Syncplay: {}", # syncplay.version
"more-info-notification": "Mais informações disponíveis em: {}", # projectURL "more-info-notification": "Mais informações disponíveis em: {}", # projectURL

View File

@ -92,6 +92,7 @@ pt_PT = {
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate "commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate
"commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate "commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate
"commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate "commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate "commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate
"syncplay-version-notification": "Versão do Syncplay: {}", # syncplay.version "syncplay-version-notification": "Versão do Syncplay: {}", # syncplay.version
"more-info-notification": "Mais informações disponíveis em: {}", # projectURL "more-info-notification": "Mais informações disponíveis em: {}", # projectURL

View File

@ -91,6 +91,7 @@ ru = {
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate "commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate
"commandList-notification/playlist": "\tql - показать текущий список воспроизведения", "commandList-notification/playlist": "\tql - показать текущий список воспроизведения",
"commandList-notification/select": "\tqs [индекс] - выделить указанный пункт в списке воспроизведения", "commandList-notification/select": "\tqs [индекс] - выделить указанный пункт в списке воспроизведения",
"commandList-notification/next": "\tqn - выделить следующий пункт в списке воспроизведения",
"commandList-notification/delete": "\tqd [индекс] - удалить указанный пункт из списка воспроизведения", "commandList-notification/delete": "\tqd [индекс] - удалить указанный пункт из списка воспроизведения",
"syncplay-version-notification": "Версия Syncplay: {}", # syncplay.version "syncplay-version-notification": "Версия Syncplay: {}", # syncplay.version
"more-info-notification": "Больше информации на {}", # projectURL "more-info-notification": "Больше информации на {}", # projectURL

View File

@ -92,6 +92,7 @@ tr = {
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate "commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate
"commandList-notification/playlist": "\tql - mevcut oynatma listesini gösterir", "commandList-notification/playlist": "\tql - mevcut oynatma listesini gösterir",
"commandList-notification/select": "\tqs [index] - oynatma listesinde verilen girişi seçer", "commandList-notification/select": "\tqs [index] - oynatma listesinde verilen girişi seçer",
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - verilen girişi oynatma listesinden siler", "commandList-notification/delete": "\tqd [index] - verilen girişi oynatma listesinden siler",
"syncplay-version-notification": "Syncplay sürümü: {}", # syncplay.version "syncplay-version-notification": "Syncplay sürümü: {}", # syncplay.version
"more-info-notification": "Daha fazla bilgiye şu adresten ulaşabilirsiniz: {}", # projectURL "more-info-notification": "Daha fazla bilgiye şu adresten ulaşabilirsiniz: {}", # projectURL

View File

@ -92,6 +92,7 @@ zh_CN = {
"commandList-notification/queueandselect": "\tqas [file/url] - 在播放列表最后添加文件或URL并选中", "commandList-notification/queueandselect": "\tqas [file/url] - 在播放列表最后添加文件或URL并选中",
"commandList-notification/playlist": "\tql - 显示当前播放列表", "commandList-notification/playlist": "\tql - 显示当前播放列表",
"commandList-notification/select": "\tqs [index] - 选中播放列表中指定序号的视频", "commandList-notification/select": "\tqs [index] - 选中播放列表中指定序号的视频",
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - 删除播放列表中指定序号的视频", "commandList-notification/delete": "\tqd [index] - 删除播放列表中指定序号的视频",
"syncplay-version-notification": "当前Syncplay版本为{}", # syncplay.version "syncplay-version-notification": "当前Syncplay版本为{}", # syncplay.version
"more-info-notification": "更多信息请参照{}", # projectURL "more-info-notification": "更多信息请参照{}", # projectURL

View File

@ -228,6 +228,8 @@ class ConsoleUI(threading.Thread):
except (TypeError, AttributeError): except (TypeError, AttributeError):
self.showErrorMessage(getMessage("playlist-invalid-index-error")) self.showErrorMessage(getMessage("playlist-invalid-index-error"))
elif command.group('command') in constants.COMMANDS_NEXT:
self._syncplayClient.playlist.loadNextFileInPlaylist()
else: else:
if self._tryAdvancedCommands(data): if self._tryAdvancedCommands(data):
@ -250,6 +252,7 @@ class ConsoleUI(threading.Thread):
self.showMessage(getMessage("commandList-notification/queueandselect"), True) self.showMessage(getMessage("commandList-notification/queueandselect"), True)
self.showMessage(getMessage("commandList-notification/playlist"), True) self.showMessage(getMessage("commandList-notification/playlist"), True)
self.showMessage(getMessage("commandList-notification/select"), True) self.showMessage(getMessage("commandList-notification/select"), True)
self.showMessage(getMessage("commandList-notification/next"), True)
self.showMessage(getMessage("commandList-notification/delete"), True) self.showMessage(getMessage("commandList-notification/delete"), True)
self.showMessage(getMessage("syncplay-version-notification").format(syncplay.version), True) self.showMessage(getMessage("syncplay-version-notification").format(syncplay.version), True)
self.showMessage(getMessage("more-info-notification").format(syncplay.projectURL), True) self.showMessage(getMessage("more-info-notification").format(syncplay.projectURL), True)