Skip to content

Commit 8e9c5df

Browse files
committed
download: use the Playback command instead of Download
On my TrackMix Wifi, both API commands work the same way, but Download is limited to about 800kB/s, while Playback hits about 4MB/s. So, replace the Download command with Playback for get_file.
1 parent d8ed858 commit 8e9c5df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

reolinkapi/handlers/api_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _execute_command(self, command: str, data: List[Dict], multi: bool = False)
121121
try:
122122
if self.token is None:
123123
raise ValueError("Login first")
124-
if command == 'Download':
124+
if command == 'Playback':
125125
# Special handling for downloading an mp4
126126
# Pop the filepath from data
127127
tgt_filepath = data[0].pop('filepath')

reolinkapi/mixins/download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ def get_file(self, filename: str, output_path: str) -> bool:
77
"""
88
body = [
99
{
10-
"cmd": "Download",
10+
"cmd": "Playback",
1111
"source": filename,
1212
"output": filename,
1313
"filepath": output_path
1414
}
1515
]
16-
resp = self._execute_command('Download', body)
16+
resp = self._execute_command('Playback', body)
1717

1818
return resp

0 commit comments

Comments
 (0)