Skip to content

Commit

Permalink
fixed bug of 'Asset is not ready for playback'
Browse files Browse the repository at this point in the history
  • Loading branch information
yaronzz committed Mar 11, 2020
1 parent 18a84be commit ed6de44
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 6 deletions.
Binary file modified TIDALDL-PY/exe/tidal-dl.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion TIDALDL-PY/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
setup(
name = 'tidal-dl',
version="2020.3.10.0",
version="2020.3.11.0",
license="Apache2",
description = "Tidal Music Download.",

Expand Down
2 changes: 1 addition & 1 deletion TIDALDL-PY/tidal_dl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from tidal_dl.download import Download
from tidal_dl.printhelper import printMenu, printChoice2, printErr, printWarring, LOG

TIDAL_DL_VERSION = "2020.3.10.0"
TIDAL_DL_VERSION = "2020.3.11.0"


def logIn(username="", password=""):
Expand Down
5 changes: 4 additions & 1 deletion TIDALDL-PY/tidal_dl/tidal.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _get(self, url, params={}):
retry = 3
sessionid = self.config.sessionid
if 'soundQuality' in params:
if params['soundQuality'] == 'LOSSLESS' or params['soundQuality'] == 'DOLBY_ATMOS':
if params['soundQuality'] == 'LOSSLESS':
sessionid = self.config.sessionid2

while retry > 0:
Expand All @@ -58,6 +58,9 @@ def _get(self, url, params={}):
params=params).json()
if 'status' in resp and resp['status'] == 404 and resp['subStatus'] == 2001:
self.errmsg = '{}. This might be region-locked.'.format(resp['userMessage'])
elif 'status' in resp and resp['status'] == 401 and resp['subStatus'] == 4005: #'Asset is not ready for playback'
sessionid = self.config.sessionid2
continue
elif 'status' in resp and not resp['status'] == 200:
self.errmsg = '{}. Get operation err!'.format(resp['userMessage'])
# self.errmsg = "Get operation err!"
Expand Down
3 changes: 3 additions & 0 deletions TIDALDL-PY/updatelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2020-03-11
- Fix bug of 'Asset is not ready for playback'

#### 2020-03-10
- Update token

Expand Down
2 changes: 1 addition & 1 deletion TIDALDL-UI/TIDALDL-UI/Pages/AboutView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<Grid Height="282" Grid.Row="1">
<Image Margin="94,13,93,177" Source="pack://application:,,,/resource/tidal.jpg" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Label Content="TIDAL-GUI" Margin="103,105,102,151" HorizontalAlignment="Center" FontWeight="Bold" Width="74"/>
<Label Content="Copyright 2019 Yaron Inc." Margin="54,131,61,124" HorizontalAlignment="Center"/>
<Label Content="Copyright 2019-2020 Yaron Inc." Margin="54,131,57,124" HorizontalAlignment="Center" Width="168"/>
<Label Content="All Rights Reserved." Margin="77,158,77,100" HorizontalAlignment="Center" Width="125"/>
<Label Content="{Binding Version}" Margin="77,182,77,76" HorizontalAlignment="Center" Width="125" HorizontalContentAlignment="Center"/>
<Button Margin="127,211,122,41" HorizontalAlignment="Center"
Expand Down
4 changes: 2 additions & 2 deletions TIDALDL-UI/TIDALDL-UI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.13")]
[assembly: AssemblyFileVersion("1.1.0.13")]
[assembly: AssemblyVersion("1.1.0.14")]
[assembly: AssemblyFileVersion("1.1.0.14")]
6 changes: 6 additions & 0 deletions TIDALDL-UI/TIDALDL-UI/Tidal/TidalTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ static string get(string Path, out string Errmsg, Dictionary<string, string> Par
if (Paras != null && Paras.ContainsKey("soundQuality") && Paras["soundQuality"].ToLower() == "lossless")
sSessionID = SESSIONID_PHONE;

POINT_RETURN:
string sRet = (string)HttpHelper.GetOrPost(URL + Path + sParams, out Errmsg, Header: "X-Tidal-SessionId:" + sSessionID, Retry: RetryNum, IsErrResponse: true, Proxy: PROXY);
if (!string.IsNullOrEmpty(Errmsg))
{
Expand All @@ -148,6 +149,11 @@ static string get(string Path, out string Errmsg, Dictionary<string, string> Par
string sMessage = JsonHelper.GetValue(Errmsg, "userMessage");
if (sStatus.IsNotBlank() && sStatus == "404" && sSubStatus == "2001")
Errmsg = sMessage + ". This might be region-locked.";
else if (sStatus.IsNotBlank() && sStatus == "401" && sSubStatus == "4005")//'Asset is not ready for playback'
{
sSessionID = SESSIONID_PHONE;
goto POINT_RETURN;
}
else if (sStatus.IsNotBlank() && sStatus != "200")
Errmsg = sMessage + ". Get operation err!";
return null;
Expand Down

1 comment on commit ed6de44

@vad62
Copy link

@vad62 vad62 commented on ed6de44 Mar 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the new version, the download speed of tracks has decreased.

Please sign in to comment.