-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No album names present for specific users. #234
Comments
@exislow I have never seen this myself during normal playback. However, when trying to browse the two albums using tidal web, they are simply listed as "The content is no longer available". So perhaps such albums are not handled correctly/skipped.
|
I cannot confirm this. Those tracks / albums are fully available to me. I can listen to them using the web browser player or the TIDAL app. Have you clicked on the correct links? From which country do you try to access these songs?
The user also states, that this happens with every track he tries to access with |
You are right, I mistakenly used the wrong ID when I checked this earlier. Have you tried reproducing this issue using a minimum tidalapi script eg. |
I can no longer assist with the issue as my dad has removed me from the family subscription and I have no means of paying. My app still works but I haven't tested the web player or the API yet |
@tehkillerbee I never experienced this problem, and since @Dialgatrainer02 cannot assist anymore with this I would like to close this issue. |
@tehkillerbee I think I could finally re-produce this error. Take a look at the following: import tidalapi
from tidalapi import Quality
from pathlib import Path
session_file1 = Path("token.json")
session = tidalapi.Session()
session.login_session_file(session_file1)
session.audio_quality = Quality.hi_res_lossless.value
album = session.album("117485440")
tracks = album.tracks()
print(vars(album))
track = session.track("117485441")
print(vars(track.album)) This is the output: {'session': <tidalapi.session.Session object at 0x102d40c50>, 'requests': <tidalapi.request.Requests object at 0x10519c5d0>, 'artist': <tidalapi.artist.Artist object at 0x10519e950>, 'id': 117485440, 'name': 'Wer hätte das gedacht? (Special Edition)', 'cover': '6fce8655-5745-4ed7-9261-6acc4ff968e6', 'video_cover': None, 'duration': 5845, 'available': True, 'num_tracks': 27, 'num_videos': 0, 'num_volumes': 1, 'copyright': 'ASD', 'version': None, 'explicit': False, 'universal_product_number': '4056813148596', 'popularity': 11, 'type': 'ALBUM', 'artists': [<tidalapi.artist.Artist object at 0x10268f550>], 'release_date': datetime.datetime(2003, 3, 28, 0, 0), 'tidal_release_date': datetime.datetime(2019, 9, 9, 0, 0, tzinfo=tzutc()), 'user_date_added': None}
{'session': <tidalapi.session.Session object at 0x102d40c50>, 'requests': <tidalapi.request.Requests object at 0x10519c5d0>, 'artist': <tidalapi.artist.Artist object at 0x1051bced0>, 'id': 117485440, 'name': 'Wer hätte das gedacht? (Special Edition)', 'cover': '6fce8655-5745-4ed7-9261-6acc4ff968e6', 'video_cover': None, 'duration': None, 'available': None, 'num_tracks': None, 'num_videos': None, 'num_volumes': None, 'copyright': None, 'version': None, 'explicit': None, 'universal_product_number': None, 'popularity': None, 'type': None, 'artists': [<tidalapi.artist.Artist object at 0x1051bced0>], 'release_date': None, 'tidal_release_date': None, 'user_date_added': None} The song is from the exact same album. If I get the album object and dump it, everything is fine. If I create the track object instead first and try to dump EDIT: My fault. It should be I usually create python-tidal/tidalapi/session.py Lines 846 to 849 in 979e6cc
Also if I do something like this the album = session.album("117485440")
tracks = album.tracks()
tracks[0].album.available # None There are cases, where I get the track from an album and need to access the album information, but at this stage |
@exislow The python-tidal/tidalapi/media.py Line 263 in 979e6cc
python-tidal/tidalapi/media.py Line 205 in 979e6cc
I assume this works correctly, if you pick a different track that has this field populated? Have you observed the contents of the json response in these two cases?
This sounds like a bug. The album ID never propagates to the newly created Track object so I guess the assumption is the individual track has this information. python-tidal/tidalapi/album.py Line 170 in 979e6cc
It could be interesting to see the json response when getting the track using the endpoint. I suspect that only one of them contains the album id. |
First of all: Have you tried to re-produce it with the script I have provided above? I am curious if you have the same results or maybe this is something depending on the users region?
I am a little bit confused: The album ID gets propagated to the album object according to my output above. What do you exactly mean? Out of python-tidal/tidalapi/media.py Line 263 in 979e6cc
{
"id":117485441,
"title":"Intro",
"duration":90,
"replayGain":-9.55,
"peak":0.97998,
"allowStreaming":true,
"streamReady":true,
"adSupportedStreamReady":true,
"djReady":true,
"stemReady":false,
"streamStartDate":"2019-09-09T00:00:00.000+0000",
"premiumStreamingOnly":false,
"trackNumber":1,
"volumeNumber":1,
"version":"None",
"popularity":4,
"copyright":"ASD",
"url":"http://www.tidal.com/track/117485441",
"isrc":"DELZ31500001",
"editable":false,
"explicit":false,
"audioQuality":"LOSSLESS",
"audioModes":[
"STEREO"
],
"mediaMetadata":{
"tags":[
"LOSSLESS"
]
},
"artist":{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
},
"artists":[
{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
}
],
"album":{
"id":117485440,
"title":"Wer hätte das gedacht? (Special Edition)",
"cover":"6fce8655-5745-4ed7-9261-6acc4ff968e6",
"vibrantColor":"#a9c3d7",
"videoCover":"None"
},
"mixes":{
"TRACK_MIX":"00164a565b48f835e59b20eed02904"
}
} This is the output of python-tidal/tidalapi/media.py Line 205 in 979e6cc
{
"session":<tidalapi.session.Session object at 0x1051a4e90>,
"requests":<tidalapi.request.Requests object at 0x1062f1990>,
"artist":<tidalapi.artist.Artist object at 0x106355890>,
"id":117485440,
"name":"Wer hätte das gedacht? (Special Edition)",
"cover":"6fce8655-5745-4ed7-9261-6acc4ff968e6",
"video_cover":"None",
"duration":"None",
"available":"None",
"num_tracks":"None",
"num_videos":"None",
"num_volumes":"None",
"copyright":"None",
"version":"None",
"explicit":"None",
"universal_product_number":"None",
"popularity":"None",
"type":"None",
"artists":[
<tidalapi.artist.Artist object at 0x106355890>
],
"release_date":"None",
"tidal_release_date":"None",
"user_date_added":"None"
}
#1
Valid (RFC 8259)
Fixer/Validator Output
Info: Replaced incorrect quotes.
Info: Converted true to lowercase.
Info: Converted false to lowercase.
Info: Inserted missing quotes.
Formatted JSON Data
{
"id":117485441,
"title":"Intro",
"duration":90,
"replayGain":-9.55,
"peak":0.97998,
"allowStreaming":true,
"streamReady":true,
"adSupportedStreamReady":true,
"djReady":true,
"stemReady":false,
"streamStartDate":"2019-09-09T00:00:00.000+0000",
"premiumStreamingOnly":false,
"trackNumber":1,
"volumeNumber":1,
"version":"None",
"popularity":4,
"copyright":"ASD",
"url":"http://www.tidal.com/track/117485441",
"isrc":"DELZ31500001",
"editable":false,
"explicit":false,
"audioQuality":"LOSSLESS",
"audioModes":[
"STEREO"
],
"mediaMetadata":{
"tags":[
"LOSSLESS"
]
},
"artist":{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
},
"artists":[
{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
}
],
"album":{
"id":117485440,
"title":"Wer hätte das gedacht? (Special Edition)",
"cover":"6fce8655-5745-4ed7-9261-6acc4ff968e6",
"vibrantColor":"#a9c3d7",
"videoCover":"None"
},
"mixes":{
"TRACK_MIX":"00164a565b48f835e59b20eed02904"
}
} Does this looks correct?
{
"id":117485441,
"title":"Intro",
"duration":90,
"replayGain":-9.55,
"peak":0.97998,
"allowStreaming":true,
"streamReady":true,
"adSupportedStreamReady":true,
"djReady":true,
"stemReady":false,
"streamStartDate":"2019-09-09T00:00:00.000+0000",
"premiumStreamingOnly":false,
"trackNumber":1,
"volumeNumber":1,
"version":"None",
"popularity":4,
"copyright":"ASD",
"url":"http://www.tidal.com/track/117485441",
"isrc":"DELZ31500001",
"editable":false,
"explicit":false,
"audioQuality":"LOSSLESS",
"audioModes":[
"STEREO"
],
"mediaMetadata":{
"tags":[
"LOSSLESS"
]
},
"artist":{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
},
"artists":[
{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
}
],
"album":{
"id":117485440,
"title":"Wer hätte das gedacht? (Special Edition)",
"cover":"6fce8655-5745-4ed7-9261-6acc4ff968e6",
"vibrantColor":"#a9c3d7",
"videoCover":"None"
},
"mixes":{
"TRACK_MIX":"00164a565b48f835e59b20eed02904"
}
}
{
"id":117485441,
"title":"Intro",
"duration":90,
"replayGain":-9.55,
"peak":0.97998,
"allowStreaming":true,
"streamReady":true,
"adSupportedStreamReady":true,
"djReady":true,
"stemReady":false,
"streamStartDate":"2019-09-09T00:00:00.000+0000",
"premiumStreamingOnly":false,
"trackNumber":1,
"volumeNumber":1,
"version":"None",
"popularity":4,
"copyright":"ASD",
"url":"http://www.tidal.com/track/117485441",
"isrc":"DELZ31500001",
"editable":false,
"explicit":false,
"audioQuality":"LOSSLESS",
"audioModes":[
"STEREO"
],
"mediaMetadata":{
"tags":[
"LOSSLESS"
]
},
"artist":{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
},
"artists":[
{
"id":3510038,
"name":"Asd",
"type":"MAIN",
"picture":"b145f5e1-bd84-4aa2-aad4-13ed205ac872"
}
],
"album":{
"id":117485440,
"title":"Wer hätte das gedacht? (Special Edition)",
"cover":"6fce8655-5745-4ed7-9261-6acc4ff968e6",
"vibrantColor":"#a9c3d7",
"videoCover":"None"
},
"mixes":{
"TRACK_MIX":"00164a565b48f835e59b20eed02904"
}
} If I understand the outputs correctly the correct album id is propagated but the album information are never fetched, are they?
For me, this is the case for all the tracks currently. As I like to access |
Not yet but I will try when time allows.
I am referring to the issue that you described where you stated that the album is unpopulated and needs to be populated manually
I am talking about the Track object associated with a parent Album. When looking at the code for I will try to test when I have time and see if this issue also occurs in my end. |
Thank you. Let me know, if I can help somehow. |
I have tested with this script, with your additions. import tidalapi
from tidalapi import Quality
from pathlib import Path
session_file1 = Path("tidal-session-pkce.json")
session = tidalapi.Session()
session.login_session_file(session_file1)
session.audio_quality = Quality.hi_res_lossless
album = session.album("117485440")
tracks = album.tracks()
print(vars(album))
track = session.track("117485441")
print(vars(track.album))
track = session.track("117485441", with_album=True)
print(vars(track.album))
#
album = session.album("117485440")
tracks = album.tracks()
alb1 = tracks[0].album Output:
So the output for the track.album only has selected fields set. The documentation for the Album class states:
So it looks like this is the expected behaviour. |
That is a bummer. This means, I need to re-create each Album track with What do you think about this proposal: Lets extend this method python-tidal/tidalapi/album.py Line 157 in 979e6cc
.items([...]) with a parameter like enrich and if it is set to True the method copies all album information to the newly retrieved tracks, which are lacking of album information due to TIDALs reduction of network load.
Or is there any other easy way to retrieve all album information for a |
I'm not sure why you do not keep the album object for accessing the album related fields, then you do not need the extra requests. But I guess it is easier for your use case to work directly with the track objects.
Yes, I think this is the way forward. Since we already have the Album information on hand, we should be able to pass on the album fields to the track when calling
No, I think this is the only way until we add the functionality that you suggest. Feel free to create a PR, otherwise I will look at it as soon as I have some time. |
Closing, moved to a new issue. |
I have experienced a very rare occasion, where one user from GB is not getting
Album.name
norTrack.album.name
.We did some analysis here: exislow/tidal-dl-ng#35
Have you seen something like this? This is actually not possible and I cannot re-produce it. In my case, I can build a workaround but this would be suuuper hacky and actually not necessary, since TIDAL must provide album names.
The text was updated successfully, but these errors were encountered: