Repository: yt-dlp/yt-dlp

Issue:
[Jiosaavn] Extract more metadata
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

India

### Example URLs

https://www.jiosaavn.com/song/love-me-again/OgFZRER2A3c

### Provide a description that is worded well enough to be understood

Please add the option to include metadata when songs are downloaded froom Jiosaavn. I am able to add metadata when downloading from youtube music. Please do something similar for Jiosaavn

### Provide verbose output that clearly demonstrates the problem

- [ ] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['--verbose', 'https://www.jiosaavn.com/song/love-me-again/OgFZRER2A3c']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.03.10 from yt-dlp/yt-dlp [615a84447] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-112207-g8eb094adb2-20230928 (setts), ffprobe N-112207-g8eb094adb2-20230928
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1803 extractors
[JioSaavnSong] Extracting URL: https://www.jiosaavn.com/song/love-me-again/OgFZRER2A3c
[JioSaavnSong] OgFZRER2A3c: Downloading webpage
[JioSaavnSong] OgFZRER2A3c: Downloading format info for 128
[JioSaavnSong] OgFZRER2A3c: Downloading format info for 320
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] OgFZRER2A3c: Downloading 1 format(s): 320
[debug] Invoking http downloader on "https://ac.cf.saavncdn.com/593/23d333a3c1c0f706b6c57629f756f059_320.mp4?Expires=1712173385&Signature=fheCPEBOGuUsngOaUjck3xkTBBIyGE9jHg50kaEmIuzpD5DVzGw~7RDZEUO2ZeCk7UUvxsM1N7svIPh3V7cEfi3BCLjkiYqKwxh044TorkWad-GC-1P4oOcovsfAf0GxwCVQg3syVwza3QQJLWeUrcUS36B~rhqJg5~4AzaK8z~sinByrUCG5~BENyvLNsCGUN5gVnLQH3QN9MaavJ742Vn9Ew7DrddQkQuRD25j84hvBtPQsUuD3VAUX9zg5h1~bZ3~fWdrXJbCMPUy4Wq4b6KZexmMPu7tO8IjpwGXDpTdgB94N9R2UrAqc7S7HghmXEwESbNXNiC-iX-VSBUpCw__&Key-Pair-Id=APKAJB334VX63D3WJ5ZQ"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Love Me Again [OgFZRER2A3c].mp4
[download] 100% of    9.20MiB in 00:00:01 at 5.19MiB/s
```



Discussion:
Adding `--embed-metadata` to your command doesn't work? Or are there particular metadata fields missing that you would like added?
> Adding `--embed-metadata` to your command doesn't work? Or are there particular metadata fields missing that you would like added?

--embed-metadata doesn't work. It works great with YouTube music though. The audio file from YouTube music itself doesn't have metadata when I downloaded raw .m4a file but using --embed-metadata adds metadata which means yt-dlp is using song page to add those metadata details.

Hope something similar can be done for jiosaavn songs too.
I can't reproduce the issue:
```shell
$ yt-dlp --embed-metadata "https://www.jiosaavn.com/song/love-me-again/OgFZRER2A3c"
[JioSaavnSong] Extracting URL: https://www.jiosaavn.com/song/love-me-again/OgFZRER2A3c
[JioSaavnSong] OgFZRER2A3c: Downloading webpage
[JioSaavnSong] OgFZRER2A3c: Downloading format info for 128
[JioSaavnSong] OgFZRER2A3c: Downloading format info for 320
[info] OgFZRER2A3c: Downloading 1 format(s): 320
[download] Destination: Love Me Again [OgFZRER2A3c].mp4
[download] 100% of    9.20MiB in 00:00:05 at 1.56MiB/s
[Metadata] Adding metadata to "Love Me Again [OgFZRER2A3c].mp4"

$ ffprobe -hide_banner "Love Me Again [OgFZRER2A3c].mp4"
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Love Me Again [OgFZRER2A3c].mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    title           : Love Me Again
    album           : Tribute
    encoder         : Lavf60.16.100
    comment         : https://www.jiosaavn.com/song/love-me-again/OgFZRER2A3c
  Duration: 00:03:59.94, start: 0.000000, bitrate: 321 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 320 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
```

`title`, `album` and `comment` are being embedded.

Is the issue that it is downloading as an mp4 instead of m4a? (this will be fixed by #9609)
Or is there a particular field you're looking for that is missing (such as "Artist")?
Yeah 'artist' would be great and album art too.

Resolving patch:
diff --git a/yt_dlp/extractor/jiosaavn.py b/yt_dlp/extractor/jiosaavn.py
--- a/yt_dlp/extractor/jiosaavn.py
+++ b/yt_dlp/extractor/jiosaavn.py
@@ -2,6 +2,7 @@
 from ..utils import (
     int_or_none,
     js_to_json,
+    orderedSet,
     url_or_none,
     urlencode_postdata,
     urljoin,
@@ -31,6 +32,7 @@ class JioSaavnSongIE(JioSaavnBaseIE):
             'duration': 205,
             'view_count': int,
             'release_year': 2018,
+            'artists': ['Sandesh Shandilya', 'Dhvani Bhanushali', 'Tanishk Bagchi', 'Rashmi Virag', 'Irshad Kamil'],
         },
     }, {
         'url': 'https://www.saavn.com/s/song/hindi/Saathiya/O-Humdum-Suniyo-Re/KAMiazoCblU',
@@ -79,6 +81,7 @@ def _real_extract(self, url):
                 'duration': ('duration', {int_or_none}),
                 'view_count': ('play_count', {int_or_none}),
                 'release_year': ('year', {int_or_none}),
+                'artists': ('artists', ..., 'name', {str}, all, {orderedSet}),
             }),
         }
 


Test patch: