You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Thanks for writting this code it's greatly appreciated. I've been searching for years for a good stable way of doing this as I dont have kodi nor do I want to use it.
I had a couple of errors when values did not exist in the data provided by Radarr. I'm not very good at coding but believe I've got it working.
I really only want to mark an item as collected so I just defaulted some of the values in the event that info was missing.
So basically, your issue was that not all files had mediaInfo available for them, right? Because the various pieces of info like scanType, audioCodec, audio_channel_count should all be found in the MI of the file. Either Radarr didn't scan the files for MediaInfo, or there's some malformed files. I'd be curious to see cases where you don't have audioCodec info for example, but do have MediaInfo scanned in. Similarly with ScanType.
Hi
Thanks for writting this code it's greatly appreciated. I've been searching for years for a good stable way of doing this as I dont have kodi nor do I want to use it.
I had a couple of errors when values did not exist in the data provided by Radarr. I'm not very good at coding but believe I've got it working.
I really only want to mark an item as collected so I just defaulted some of the values in the event that info was missing.
As is said I'm really not a very good programmer.
` radarr_resolution = movie['movieFile']['quality']['quality']['resolution']
#scan_type = movie['movieFile']['mediaInfo']['scanType']
resolution_mapping = {
2160:"uhd_4k",
1080:"hd_1080",
720:"hd_720p",
480:"sd_480",
576:"sd_576"
}
resolution = resolution_mapping.get(radarr_resolution, "hd_720p")
if resolution in ["hd_1080", "sd_480", "sd_576"]:
#if scan_type in ['Interlaced', 'MBAFF', 'PAFF']:
# resolution = '{}i'.format(resolution)
#else:
resolution = '{}p'.format(resolution)
#pprint(movie)
The text was updated successfully, but these errors were encountered: