Skip to content
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

[BUG] Genres in French when downloading from Qobuz #618

Open
disconnect78 opened this issue Feb 4, 2024 · 2 comments
Open

[BUG] Genres in French when downloading from Qobuz #618

disconnect78 opened this issue Feb 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@disconnect78
Copy link
Contributor

disconnect78 commented Feb 4, 2024

Describe the bug

When downloading from Qobuz, the genre tag is populated with a list of genres in French. Take for example:

https://www.qobuz.com/gb-en/album/katy-j-pearson-friends-presents-songs-from-the-wicker-man-katy-j-pearson/celzwtj750ojc

The genre on the page is Alternative & Indie. However the download files have the genre listed as Pop, Rock, Alternatif et Indé. I can see that this is being pulled from genres_list in the response; if instead it's taken from genres.name then it will be a single genre in English (as displayed on the album page)

I made the following change to metadata/album.py in a local copy which does this. I haven't raised a PR however as I don't know if there's some cases where this wouldn't work.

    def from_qobuz(cls, resp: dict) -> AlbumMetadata:
        album = resp.get("title", "Unknown Album")
        tracktotal = resp.get("tracks_count", 1)
        genre = [safe_get(resp, "genre", "name")] or resp.get("genre") or []
        date = resp.get("release_date_original") or resp.get("release_date")
        ...

Command Used

rip -vvv url https://www.qobuz.com/nz-en/album/katy-j-pearson-friends-presents-songs-from-the-wicker-man-katy-j-pearson/celzwtj750ojc

Debug Traceback

...
[14:06:05] DEBUG    Pending tracks: [PendingTrack(id=232060106,                album.py:92
                    album=AlbumMetadata(info=AlbumInfo(id='232060105',                    
                    quality=3, container='FLAC', label='Heavenly Recordings',             
                    explicit=False, sampling_rate=48, bit_depth=24,                       
                    booklets=None), album='Katy J Pearson & Friends Presents              
                    Songs From The Wicker Man', albumartist='Katy J Pearson',             
                    year='2023', genre=['Alternatif et Indé', 'Rock', 'Pop'],             
                    covers=Covers(('original',                                            
                    'https://static.qobuz.com/images/covers/jc/0o/celzwtj750oj            
                    c_org.jpg', './Katy J Pearson - Katy J Pearson & Friends              
                    Presents Songs From The Wicker Man (2023) [FLAC]                      
                    [24B-48kHz] [232060105]/cover.jpg')                                   
                    ('large',                                                             
                    'https://static.qobuz.com/images/covers/jc/0o/celzwtj750oj            
                    c_600.jpg', './Katy J Pearson - Katy J Pearson & Friends              
                    Presents Songs From The Wicker Man (2023) [FLAC]                      
                    [24B-48kHz]                                                           
                    [232060105]/__artwork/cover-7571210534207939033.jpg')                 
                    ('small',                                                             
                    'https://static.qobuz.com/images/covers/jc/0o/celzwtj750oj            
                    c_230.jpg', None)                                                     
                    ('thumbnail',                                                         
                    'https://static.qobuz.com/images/covers/jc/0o/celzwtj750oj            
                    c_50.jpg', None)), tracktotal=9, disctotal=1,                         
                    albumcomposer='Paul Giovanni', comment=None,                          
                    compilation=None, copyright='2023 Heavenly Recordings                 
                    Under Exclusive License to [PIAS] 2023 Heavenly Recordings            
                    Under Exclusive License to [PIAS]', date='2023-10-31',                
                    description=None, encoder=None, grouping=None,                        
                    lyrics=None, purchase_date=None),                                     
                    client=<streamrip.client.qobuz.QobuzClient object at                  
                    0x120e1d610>, config=<streamrip.config.Config object at               
                    0x104634c50>, folder='./Katy J Pearson - Katy J Pearson &             
                    Friends Presents Songs From The Wicker Man (2023) [FLAC]              
                    [24B-48kHz] [232060105]',                                             
                    db=Database(downloads=<streamrip.db.Dummy object at                   
                    0x120e06d10>, failed=<streamrip.db.Failed object at                   
                    0x120e06bd0>), cover_path='./Katy J Pearson - Katy J                  
                    Pearson & Friends Presents Songs From The Wicker Man                  
                    (2023) [FLAC] [24B-48kHz]                                             
                    [232060105]/__artwork/cover-7571210534207939033.jpg'),                
...
[14:06:19] DEBUG    Tagging with [('TITLE', 'Fire Leap'), ('ARTIST', 'Katy J tagger.py:253
                    Pearson'), ('ALBUM', 'Katy J Pearson & Friends Presents               
                    Songs From The Wicker Man'), ('ALBUMARTIST', 'Katy J                  
                    Pearson'), ('COMPOSER', 'Paul Giovanni'), ('YEAR',                    
                    '2023'), ('GENRE', 'Alternatif et Indé, Rock, Pop'),                  
                    ('COPYRIGHT', '2023 Heavenly Recordings Under Exclusive               
                    License to [PIAS] 2023 Heavenly Recordings Under                      
                    Exclusive License to [PIAS]'), ('TRACKNUMBER', '01'),                 
                    ('DISCNUMBER', '01'), ('TRACKTOTAL', '09'),                           
                    ('DISCTOTAL', '01'), ('DATE', '2023-10-31'), ('ISRC',                 
                    'GBPVV2300370')]

Config File

n/a [not dependent on config]

Operating System

macOS

streamrip version

2.0.5

Screenshots and recordings

No response

Additional context

No response

@disconnect78 disconnect78 added the bug Something isn't working label Feb 4, 2024
@gaddarkerim
Copy link

gaddarkerim commented Feb 23, 2024

Have same issue with Deezer. Where "Various Artists" showed as "Çeşitli Sanatçılar" in metadata which is translation to TR. Alternative becomes Alternatif.

@laurensspitzner
Copy link

Same here, running version 2.0.5 on macOS.
I have tried the workaround from disconnect78, which does work fine.
Although I would love be able to get multiple genres listed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants