Repository: yt-dlp/yt-dlp

Issue:
[RUTV] resolution extraction is wrong, resulting in wrong sorting
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.03.08.1**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched 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

_No response_

### Description

RUTV extractor returns same resolution for all HTTP formats, causing 720p to be preferred over 1080p.

Example URL: https://smotrim.ru/video/2338386 (redirects to RUTV extractor)

### Verbose log

```shell
$ yt-dlp -vF https://smotrim.ru/video/2338386
[debug] Command-line config: ['-vF', 'https://smotrim.ru/video/2338386']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.03.08.2 [e491d06d3]
[debug] Python version 3.9.10 (CPython 64bit) - Linux-5.13.0-30-generic-x86_64-with-glibc2.34
[debug] exe versions: ffmpeg 4.4 (setts), ffprobe 4.4
[debug] Optional libraries: Crypto, sqlite
[debug] Proxy map: {}
[debug] [generic] Extracting URL: https://smotrim.ru/video/2338386
[generic] 2338386: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] 2338386: Downloading webpage
[generic] 2338386: Extracting information
[debug] Looking for video embeds
[debug] [RUTV] Extracting URL: https://player.vgtrk.com/iframe/video/id/2338386/start_zoom/true/showZoomBtn/false/sid/smotrim/isPlay/true/mute/true/?acc_video_id=2456439
[RUTV] 2338386: Downloading JSON
[RUTV] 2338386: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] Available formats for 2338386:
ID        EXT RESOLUTION │   FILESIZE   TBR PROTO  │ VCODEC    VBR ACODEC  ABR
──────────────────────────────────────────────────────────────────────────────
hls-400   mp4 unknown    │ ~152.00MiB  400k m3u8_n │ unknown  400k unknown  0k
hls-800   mp4 unknown    │ ~304.00MiB  800k m3u8_n │ unknown  800k unknown  0k
hls-1200  mp4 unknown    │ ~456.01MiB 1200k m3u8_n │ unknown 1200k unknown  0k
hls-1800  mp4 unknown    │ ~684.01MiB 1800k m3u8_n │ unknown 1800k unknown  0k
hls-4050  mp4 unknown    │ ~  1.50GiB 4050k m3u8_n │ unknown 4050k unknown  0k
http-1080 mp4 1920x1080  │                  https  │ unknown       unknown
http-234  mp4 1920x1080  │                  https  │ unknown       unknown
http-360  mp4 1920x1080  │                  https  │ unknown       unknown
http-540  mp4 1920x1080  │                  https  │ unknown       unknown
http-720  mp4 1920x1080  │                  https  │ unknown       unknown
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/rutv.py b/yt_dlp/extractor/rutv.py
--- a/yt_dlp/extractor/rutv.py
+++ b/yt_dlp/extractor/rutv.py
@@ -181,7 +181,6 @@ def _real_extract(self, url):
                         'rtmp_live': True,
                         'ext': 'flv',
                         'vbr': str_to_int(quality),
-                        'quality': preference,
                     }
                 elif transport == 'm3u8':
                     formats.extend(self._extract_m3u8_formats(
@@ -192,9 +191,10 @@ def _real_extract(self, url):
                         'url': url
                     }
                 fmt.update({
-                    'width': width,
-                    'height': height,
+                    'width': int_or_none(quality, default=height, invscale=width, scale=height),
+                    'height': int_or_none(quality, default=height),
                     'format_id': '%s-%s' % (transport, quality),
+                    'source_preference': preference,
                 })
                 formats.append(fmt)
 


Test patch: