Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 194 additions & 3 deletions syncplay/client.py

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions syncplay/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def getValueForOS(constantDict):
['syncplay.pl:8999 (France)', 'syncplay.pl:8999']]
PLAYLIST_LOAD_NEXT_FILE_MINIMUM_LENGTH = 10 # Seconds
PLAYLIST_LOAD_NEXT_FILE_TIME_FROM_END_THRESHOLD = 5 # Seconds (only triggered if file is paused, e.g. due to EOF)
PLAYLIST_NEAR_EOF_WINDOW = 270 # seconds
PLAYLIST_NEAR_EOF_MIN_DWELL = 120 # seconds
PLAYLIST_NEAR_EOF_LATCH_TTL = 60 # seconds
EXECUTABLE_COMBOBOX_MINIMUM_LENGTH = 30 # Minimum number of characters that the combobox will make visible

# Overriden by config
Expand Down Expand Up @@ -110,6 +113,11 @@ def getValueForOS(constantDict):
FOLDER_SEARCH_WARNING_THRESHOLD = 2.0 # Secs - how long until a warning saying how many files have been scanned
FOLDER_SEARCH_DOUBLE_CHECK_INTERVAL = 30.0 # Secs - Frequency of updating cache

# Changable values for watched features (you usually don't need to change these)
WATCHED_CHECKQUEUE_INTERVAL = 1.0 # Secs
WATCHED_PLAYERWAIT_INTERVAL = 0.1 # Secs
WATCHED_PLAYERWAIT_MAXRETRIES = 80

# Usually there's no need to adjust these
DOUBLE_CHECK_REWIND = True
LAST_PAUSED_DIFF_THRESHOLD = 2
Expand Down Expand Up @@ -332,6 +340,10 @@ def getValueForOS(constantDict):

VLC_EOF_DURATION_THRESHOLD = 2.0

WATCHED_SUBFOLDER = "Watched"
WATCHED_AUTOMOVE = False
WATCHED_AUTOCREATESUBFOLDERS = False

PRIVACY_HIDDENFILENAME = "**Hidden filename**"
INVERTED_STATE_MARKER = "*"
ERROR_MESSAGE_MARKER = "*"
Expand Down
16 changes: 16 additions & 0 deletions syncplay/messages_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,20 @@

"playlist-empty-error": "Wiedergabeliste is aktuell leer.",
"playlist-invalid-index-error": "Ungültiger Wiedergabelisten-Index",

# Watched file functionality
# TODO: Please double-check these translations and remove this message if they are fine
"folders-label": "Ordner",
"syncplay-watchedfiles-title": "Gesehene Dateien",
"syncplay-watchedautomove-label": "Gesehene Dateien automatisch in Unterordner verschieben (falls vorhanden)",
"syncplay-watchedmovesubfolder-label": "Unterordner für gesehene Dateien",
"syncplay-watchedsubfolderautocreate-label": "Unterordner für gesehene Dateien bei Bedarf automatisch erstellen",
"mark-as-watched-menu-label": "Als gesehen markieren",
"mark-as-unwatched-menu-label": "Als ungesehen markieren",
"watchedautomove-tooltip": "Verschiebt die Datei automatisch in den Unterordner für gesehene Dateien, wenn das Ende der Datei erreicht ist. Dies funktioniert nur, wenn der übergeordnete Ordner ein Medienordner ist.",
"watchedsubfolder-tooltip": "Unterordner (relativ zum Ordner der Datei), in den gesehene Dateien verschoben werden (der Unterordner muss existieren, damit die Datei verschoben werden kann). Dies funktioniert nur, wenn der übergeordnete Ordner ein Medienordner ist.",
"watchedsubfolderautocreate-tooltip": "Erstellt den Unterordner für gesehene Dateien beim Verschieben automatisch, falls er noch nicht existiert. Dies funktioniert nur, wenn der übergeordnete Ordner ein Medienordner ist.",
"cannot-move-file-due-to-name-conflict-error": "Konnte '{}' nicht in den Unterordner '{}' verschieben, da bereits eine Datei mit diesem Namen existiert.", # Path, subfolder
"moved-file-to-subfolder-notification": "Verschoben: '{}' in den Unterordner '{}'.", # Path, subfolder

}
23 changes: 19 additions & 4 deletions syncplay/messages_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
"media-player-latency-warning": "Warning: The media player took {} seconds to respond. If you experience syncing issues then close applications to free up system resources, and if that doesn't work then try a different media player.", # Seconds to respond
"mpv-unresponsive-error": "mpv has not responded for {} seconds so appears to have malfunctioned. Please restart Syncplay.", # Seconds to respond

"moved-file-to-subfolder-notification": "Moved '{}' to '{}' subfolder.", # Path, subfolder

# Client prompts
"enter-to-exit-prompt": "Press enter to exit\n",

Expand Down Expand Up @@ -161,7 +163,7 @@

"feature-sharedPlaylists": "shared playlists", # used for not-supported-by-server-error
"feature-chat": "chat", # used for not-supported-by-server-error
"feature-readiness": "readiness", # used for not-supported-by-server-error
"feature-readiness": "readiness", # used for not-supported-by-server-error"
"feature-managedRooms": "managed rooms", # used for not-supported-by-server-error
"feature-setOthersReadiness": "readiness override", # used for not-supported-by-server-error

Expand All @@ -173,15 +175,17 @@
"invalid-offset-value": "Invalid offset value",

"switch-file-not-found-error": "Could not switch to file '{0}'. Syncplay looks in specified media directories.", # File not found
"folder-search-timeout-error": "The search for media in media directories was aborted as it took too long to search through '{}' after having processed the first {:,} files. This will occur if you select a folder with too many sub-folders in your list of media folders to search through or if there are too many files to process. For automatic file switching to work again please select File->Set Media Directories in the menu bar and remove this directory or replace it with an appropriate sub-folder. If the folder is actually fine then you can re-enable it by selecting File->Set Media Directories and pressing 'OK'.", # Folder, Files processed. Note: {:,} is {} but with added commas seprators.
"folder-search-timeout-warning": "Warning: It has taken {} seconds to scan {:,} files in the folder '{}'. This will occur if you select a folder with too many sub-folders in your list of media folders to search through or if there are too many files to process.", # Folder, Files processed. Note: {:,} is {} but with added commas seprators.
"folder-search-timeout-error": "The search for media in media directories was aborted as it took too long to search through '{}' after having processed the first {:,} files. This will occur if you select a folder with too many subfolders in your list of media folders to search through or if there are too many files to process. For automatic file switching to work again please select File->Set Media Directories in the menu bar and remove this directory or replace it with an appropriate subfolder. If the folder is actually fine then you can re-enable it by selecting File->Set Media Directories and pressing 'OK'.", # Folder, Files processed. Note: {:,} is {} but with added commas seprators.
"folder-search-timeout-warning": "Warning: It has taken {} seconds to scan {:,} files in the folder '{}'. This will occur if you select a folder with too many subfolders in your list of media folders to search through or if there are too many files to process.", # Folder, Files processed. Note: {:,} is {} but with added commas seprators.
"folder-search-first-file-timeout-error": "The search for media in '{}' was aborted as it took too long to access the directory. This could happen if it is a network drive or if you configure your drive to spin down after a period of inactivity. For automatic file switching to work again please go to File->Set Media Directories and either remove the directory or resolve the issue (e.g. by changing power saving settings).", # Folder
"added-file-not-in-media-directory-error": "You loaded a file in '{}' which is not a known media directory. You can add this as a media directory by selecting File->Set Media Directories in the menu bar.", # Folder
"no-media-directories-error": "No media directories have been set. For shared playlist and file switching features to work properly please select File->Set Media Directories and specify where Syncplay should look to find media files.",
"cannot-find-directory-error": "Could not find media directory '{}'. To update your list of media directories please select File->Set Media Directories from the menu bar and specify where Syncplay should look to find media files.",

"failed-to-load-server-list-error": "Failed to load public server list. Please visit https://www.syncplay.pl/ in your browser.",

"cannot-move-file-due-to-name-conflict-error": "Could not move '{}' to '{}' subfolder because a file with that name already exists.", # Path, folder

# Client arguments
"argument-description": 'Solution to synchronize playback of multiple media player instances over the network.',
"argument-epilog": 'If no options supplied _config values will be used',
Expand Down Expand Up @@ -252,12 +256,19 @@
"automatic-language": "Default ({})", # Default language
"showdurationnotification-label": "Warn about media duration mismatches",
"basics-label": "Basics",
"folders-label": "Folders", # Directories
"readiness-label": "Play/Pause",
"misc-label": "Misc",
"core-behaviour-title": "Core room behaviour",
"syncplay-internals-title": "Syncplay internals",
"syncplay-mediasearchdirectories-title": "Directories to search for media",
"syncplay-mediasearchdirectories-label": "Directories to search for media (one path per line)",
"syncplay-watchedfiles-title": "Watched files",
"syncplay-watchedautomove-label": "Automatically move watched files to subfolder (if subfolder exists)",
"syncplay-watchedmovesubfolder-label": "Subfolder for watched files",
"syncplay-watchedsubfolderautocreate-label": "Automatically create watched subfolder when needed",
"mark-as-watched-menu-label": "Mark as watched",
"mark-as-unwatched-menu-label": "Mark as unwatched",
"sync-label": "Sync",
"sync-otherslagging-title": "If others are lagging behind...",
"sync-youlaggging-title": "If you are lagging behind...",
Expand Down Expand Up @@ -411,7 +422,7 @@
"executable-path-tooltip": "Location of your chosen supported media player (mpv, mpv.net, VLC, MPC-HC/BE, mplayer2 or IINA).",
"media-path-tooltip": "Location of video or stream to be opened. Necessary for mplayer2.",
"player-arguments-tooltip": "Additional command line arguments / switches to pass on to this media player.",
"mediasearcdirectories-arguments-tooltip": "Directories where Syncplay will search for media files, e.g. when you are using the click to switch feature. Syncplay will look recursively through sub-folders.",
"mediasearcdirectories-arguments-tooltip": "Directories where Syncplay will search for media files, e.g. when you are using the click to switch feature. Syncplay will look recursively through subfolders.",

"more-tooltip": "Display less frequently used settings.",
"filename-privacy-tooltip": "Privacy mode for sending currently playing filename to server.",
Expand Down Expand Up @@ -472,6 +483,10 @@
"switch-to-file-tooltip": "Double click to switch to {}", # Filename
"sendmessage-tooltip": "Send message to room",

"watchedautomove-tooltip": "Automatically move file into watched subfolder when end of file is reached. This only works if the parent directory is a media directory.",
"watchedsubfolder-tooltip": "Subfolder for watched files to be moved into relative to file directory (subfolder needs to exist for file to be moved). This only works if the parent directory is a media directory.",
"watchedsubfolderautocreate-tooltip": "Automatically create watched subfolder when moving file to subfolder if it does not already exist. This only works if the parent directory is a media directory.",

# In-userlist notes (GUI)
"differentsize-note": "Different size!",
"differentsizeandduration-note": "Different size and duration!",
Expand Down
16 changes: 16 additions & 0 deletions syncplay/messages_eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,4 +558,20 @@

"playlist-empty-error": "Ludlisto nun estas malplena.",
"playlist-invalid-index-error": "Nevalida indico de ludlisto",

# Watched file functionality
# TODO: Please double-check these translations and remove this message if they are fine
"folders-label": "Dosierujoj",
"syncplay-watchedfiles-title": "Spektitaj dosieroj",
"syncplay-watchedautomove-label": "Aŭtomate movi spektitajn dosierojn al subdosierujo (se la subdosierujo ekzistas)",
"syncplay-watchedmovesubfolder-label": "Subdosierujo por spektitaj dosieroj",
"syncplay-watchedsubfolderautocreate-label": "Aŭtomate krei subdosierujon por spektitaj dosieroj laŭbezone",
"mark-as-watched-menu-label": "Marki kiel spektita",
"mark-as-unwatched-menu-label": "Marki kiel nespektita",
"watchedautomove-tooltip": "Aŭtomate movas la dosieron al la subdosierujo por spektitaj dosieroj kiam la fino de la dosiero estas atingita. Ĉi tio funkcias nur se la patra dosierujo estas aŭdvidaĵa dosierujo.",
"watchedsubfolder-tooltip": "Subdosierujo por movi spektitajn dosierojn, rilate al la dosierujo de la dosiero (la subdosierujo devas ekzisti por ke la dosiero estu movita). Ĉi tio funkcias nur se la patra dosierujo estas aŭdvidaĵa dosierujo.",
"watchedsubfolderautocreate-tooltip": "Aŭtomate kreas la subdosierujon por spektitaj dosieroj dum la movo, se ĝi ankoraŭ ne ekzistas. Ĉi tio funkcias nur se la patra dosierujo estas aŭdvidaĵa dosierujo.",
"cannot-move-file-due-to-name-conflict-error": "Ne eblis movi '{}' al la subdosierujo '{}' ĉar dosiero kun tiu nomo jam ekzistas.", # Path, subfolder
"moved-file-to-subfolder-notification": "Movis '{}' al la subdosierujo '{}'.", # Path, subfolder

}
15 changes: 15 additions & 0 deletions syncplay/messages_es.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,4 +552,19 @@

"playlist-empty-error": "Playlist is currently empty.", # TO DO: Translate
"playlist-invalid-index-error": "Invalid playlist index", # TO DO: Translate

# Watchlist terms
# TODO: Please double-check these translations and remove this message if they are fine
"folders-label": "Dosierujoj",
"syncplay-watchedfiles-title": "Spektitaj dosieroj",
"syncplay-watchedautomove-label": "Aŭtomate movi spektitajn dosierojn al subdosierujo (se la subdosierujo ekzistas)",
"syncplay-watchedmovesubfolder-label": "Subdosierujo por spektitaj dosieroj",
"syncplay-watchedsubfolderautocreate-label": "Aŭtomate krei subdosierujon por spektitaj dosieroj laŭbezone",
"mark-as-watched-menu-label": "Marki kiel spektita",
"mark-as-unwatched-menu-label": "Marki kiel nespektita",
"watchedautomove-tooltip": "Aŭtomate movas la dosieron al la subdosierujo por spektitaj dosieroj kiam la fino de la dosiero estas atingita. Ĉi tio funkcias nur se la patra dosierujo estas aŭdvidaĵa dosierujo.",
"watchedsubfolder-tooltip": "Subdosierujo por movi spektitajn dosierojn, rilate al la dosierujo de la dosiero (la subdosierujo devas ekzisti por ke la dosiero estu movita). Ĉi tio funkcias nur se la patra dosierujo estas aŭdvidaĵa dosierujo.",
"watchedsubfolderautocreate-tooltip": "Aŭtomate kreas la subdosierujon por spektitaj dosieroj dum la movo, se ĝi ankoraŭ ne ekzistas. Ĉi tio funkcias nur se la patra dosierujo estas aŭdvidaĵa dosierujo.",
"Could not move '{}' to '{}' subfolder because a file with that name already exists": "Ne eblis movi '{}' al la subdosierujo '{}' ĉar dosiero kun tiu nomo jam ekzistas",
"moved-file-to-subfolder-notification": "Movis '{}' al la subdosierujo '{}'."
}
17 changes: 17 additions & 0 deletions syncplay/messages_fi.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,4 +551,21 @@

"playlist-empty-error": "Toistoluettelo on tällä hetkellä tyhjä.",
"playlist-invalid-index-error": "Epäkelpo toistoluettelohakemisto",

# Watched file functionality
# TODO: Please double-check these translations and remove this message if they are fine
"folders-label": "Kansiot",
"syncplay-watchedfiles-title": "Katsotut tiedostot",
"syncplay-watchedautomove-label": "Siirrä katsotut tiedostot automaattisesti alikansioon (jos alikansio on olemassa)",
"syncplay-watchedmovesubfolder-label": "Alikansio katsotuille tiedostoille",
"syncplay-watchedsubfolderautocreate-label": "Luo katsottujen tiedostojen alikansio automaattisesti tarvittaessa",
"mark-as-watched-menu-label": "Merkitse katsotuksi",
"mark-as-unwatched-menu-label": "Merkitse katsomattomaksi",
"watchedautomove-tooltip": "Siirtää tiedoston automaattisesti katsottujen tiedostojen alikansioon, kun tiedoston loppu saavutetaan. Toimii vain, jos yläkansio on mediakansio.",
"watchedsubfolder-tooltip": "Alikansio, johon katsotut tiedostot siirretään suhteessa tiedoston kansioon (alikansion on oltava olemassa, jotta tiedosto voidaan siirtää). Toimii vain, jos yläkansio on mediakansio.",
"watchedsubfolderautocreate-tooltip": "Luo katsottujen tiedostojen alikansion automaattisesti siirron yhteydessä, jos sitä ei vielä ole. Toimii vain, jos yläkansio on mediakansio.",
"cannot-move-file-due-to-name-conflict-error": "Tiedostoa '{}' ei voitu siirtää alikansioon '{}', koska samanniminen tiedosto on jo olemassa.", # Path, subfolder
"moved-file-to-subfolder-notification": "Siirrettiin '{}' alikansioon '{}'.", # Path, subfolder


}
16 changes: 16 additions & 0 deletions syncplay/messages_fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,4 +555,20 @@

"playlist-empty-error": "La liste de lecture est actuellement vide.",
"playlist-invalid-index-error": "Index de liste de lecture non valide",

# Watched file functionality
# TODO: Please double-check these translations and remove this message if they are fine
"folders-label": "Dossiers",
"syncplay-watchedfiles-title": "Fichiers vus",
"syncplay-watchedautomove-label": "Déplacer automatiquement les fichiers vus vers un sous-dossier (si le sous-dossier existe)",
"syncplay-watchedmovesubfolder-label": "Sous-dossier pour les fichiers vus",
"syncplay-watchedsubfolderautocreate-label": "Créer automatiquement le sous-dossier des fichiers vus si nécessaire",
"mark-as-watched-menu-label": "Marquer comme vu",
"mark-as-unwatched-menu-label": "Marquer comme non vu",
"watchedautomove-tooltip": "Déplace automatiquement le fichier vers le sous-dossier des fichiers vus lorsque la fin du fichier est atteinte. Fonctionne uniquement si le dossier parent est un dossier multimédia.",
"watchedsubfolder-tooltip": "Sous-dossier (par rapport au dossier du fichier) vers lequel déplacer les fichiers vus (le sous-dossier doit exister pour que le fichier soit déplacé). Fonctionne uniquement si le dossier parent est un dossier multimédia.",
"watchedsubfolderautocreate-tooltip": "Crée automatiquement le sous-dossier des fichiers vus lors du déplacement s’il n’existe pas encore. Fonctionne uniquement si le dossier parent est un dossier multimédia.",
"cannot-move-file-due-to-name-conflict-error": "Impossible de déplacer '{}' vers le sous-dossier '{}' car un fichier portant ce nom existe déjà.", # Path, subfolder
"moved-file-to-subfolder-notification": "Déplacé '{}' vers le sous-dossier '{}'.", # Path, subfolder

}
16 changes: 16 additions & 0 deletions syncplay/messages_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,20 @@

"playlist-empty-error": "Playlist is currently empty.", # TO DO: Translate
"playlist-invalid-index-error": "Invalid playlist index", # TO DO: Translate

# Watched file functionality
# TODO: Please double-check these translations and remove this message if they are fine
"folders-label": "Cartelle",
"syncplay-watchedfiles-title": "File guardati",
"syncplay-watchedautomove-label": "Sposta automaticamente i file guardati nella sottocartella (se esiste)",
"syncplay-watchedmovesubfolder-label": "Sottocartella per i file guardati",
"syncplay-watchedsubfolderautocreate-label": "Crea automaticamente la sottocartella dei file guardati quando necessario",
"mark-as-watched-menu-label": "Segna come guardato",
"mark-as-unwatched-menu-label": "Segna come non guardato",
"watchedautomove-tooltip": "Sposta automaticamente il file nella sottocartella dei file guardati quando si raggiunge la fine del file. Funziona solo se la cartella principale è una cartella multimediale.",
"watchedsubfolder-tooltip": "Sottocartella (relativa alla cartella del file) in cui spostare i file guardati (la sottocartella deve esistere per poter spostare il file). Funziona solo se la cartella principale è una cartella multimediale.",
"watchedsubfolderautocreate-tooltip": "Crea automaticamente la sottocartella dei file guardati durante lo spostamento se non esiste ancora. Funziona solo se la cartella principale è una cartella multimediale.",
"cannot-move-file-due-to-name-conflict-error": "Impossibile spostare '{}' nella sottocartella '{}' perché esiste già un file con lo stesso nome.", # Path, subfolder
"moved-file-to-subfolder-notification": "Spostato '{}' nella sottocartella '{}'.", # Path, subfolder

}
Loading
Loading