[Bug] Fen - CAM/SCR/TELE qualities not showing when "Highlight Results Based On" setting is on "Quality" #11

Closed
opened 2024-01-26 17:42:28 +00:00 by TwilightMercy · 2 comments
TwilightMercy commented 2024-01-26 17:42:28 +00:00 (Migrated from github.com)

Hi Tikipeter,

I've noticed the following issue:
FEN version: latest 3.2.20
(EDIT: Same issue applies also to Fen Light)

The default settings of FEN in Results tab:
Sorting and Filtering - Include Pre-Release Results (CAM/SCR/TELE) - On
Results Color Highlights - Highlight Results Based On - Provider

By default it works well and CAM/SCR/TELE sources shows up in results:

image


When configuring Highlight Results Based On to Quality

image
image

The CAM/SCR/TELE sources disappear:

image


I've added traceback logging to the except: pass section in resources\lib\windows\sources.py line 193 to check the error in the log:

except Exception as e:
	import traceback
	kodi_utils.logger("FEN", f"{type(e).__name__}: {str(e)}\n{traceback.format_exc()}")
	pass

Results in log for CAM/SCR/TELE sources:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Kodi\addons\plugin.video.fen\resources\lib\windows\sources.py", line 164, in builder
    set_property('highlight', self.info_highlights_dict[key])
KeyError: 'cam'

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Kodi\addons\plugin.video.fen\resources\lib\windows\sources.py", line 164, in builder
    set_property('highlight', self.info_highlights_dict[key])
KeyError: 'tele'

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Kodi\addons\plugin.video.fen\resources\lib\windows\sources.py", line 164, in builder
    set_property('highlight', self.info_highlights_dict[key])
KeyError: 'scr'`

Since they don't have quality highlight settings / values from:
resources\lib\modules\settings.py - scraping_settings() function
The Highlight Results Based On - Quality setting can't apply, and thus the error in log.

I've managed to make them appear with these changes in scraping_settings() function - look for "CHANGE 1 / CHANGE 2 / CHANGE 3" comments:

def scraping_settings():
	highlight_type = int(get_setting('fen.highlight.type', '0'))
	if highlight_type == 3:
		highlight = get_setting('fen.scraper_single_highlight', 'FF008EB2')
		return {'highlight_type': 2, '4k': highlight, '1080p': highlight, '720p': highlight, 'sd': highlight}
	hoster_highlight, torrent_highlight, furk_highlight, easynews_highlight, debrid_cloud_highlight, folders_highlight = '', '', '', '', '', ''
	#### CHANGE 1: Added 'highlight_CAM_SCR_TELE' ####
	rd_highlight, pm_highlight, ad_highlight, highlight_4K, highlight_1080P, highlight_720P, highlight_SD, highlight_CAM_SCR_TELE = '', '', '', '', '', '', '', ''
	if highlight_type in (0, 1):
		furk_highlight = get_setting('fen.provider.furk_colour', 'FFE6002E')
		easynews_highlight = get_setting('fen.provider.easynews_colour', 'FF00B3B2')
		debrid_cloud_highlight = get_setting('fen.provider.debrid_cloud_colour', 'FF7A01CC')
		folders_highlight = get_setting('fen.provider.folders_colour', 'FFB36B00')
		if highlight_type == 0:
			hoster_highlight = get_setting('fen.hoster.identify', 'FF0166FF')
			torrent_highlight = get_setting('fen.torrent.identify', 'FFFF00FE')
		else:
			rd_highlight = get_setting('fen.provider.rd_colour', 'FF3C9900')
			pm_highlight = get_setting('fen.provider.pm_colour', 'FFFF3300')
			ad_highlight = get_setting('fen.provider.ad_colour', 'FFE6B800')
	elif highlight_type == 2:
		highlight_4K = get_setting('fen.scraper_4k_highlight', 'FFFF00FE')
		highlight_1080P = get_setting('fen.scraper_1080p_highlight', 'FFE6B800')
		highlight_720P = get_setting('fen.scraper_720p_highlight', 'FF3C9900')
		highlight_SD = get_setting('fen.scraper_SD_highlight', 'FF0166FF')
		#### CHANGE 2: Set color for 'highlight_CAM_SCR_TELE' (static, not from addon settings) ####
		highlight_CAM_SCR_TELE = 'FF00FFFF'
	return {'highlight_type': highlight_type, 'hoster_highlight': hoster_highlight, 'torrent_highlight': torrent_highlight,'real-debrid': rd_highlight, 'premiumize': pm_highlight,
			'alldebrid': ad_highlight, 'rd_cloud': debrid_cloud_highlight, 'pm_cloud': debrid_cloud_highlight, 'ad_cloud': debrid_cloud_highlight, 'furk': furk_highlight,
			'easynews': easynews_highlight, 'folders': folders_highlight, '4k': highlight_4K, '1080p': highlight_1080P, '720p': highlight_720P, 'sd': highlight_SD, 'cam': highlight_CAM_SCR_TELE, 'tele': highlight_CAM_SCR_TELE, 'scr': highlight_CAM_SCR_TELE} #### Change 3: added 'cam', 'tele', 'scr' keys with 'highlight_CAM_SCR_TELE' color as value ####

Result:
image

Thank you again : )

Hi Tikipeter, I've noticed the following issue: FEN version: latest 3.2.20 (EDIT: Same issue applies also to Fen Light) The default settings of FEN in Results tab: `Sorting and Filtering - Include Pre-Release Results (CAM/SCR/TELE) - On` `Results Color Highlights - Highlight Results Based On - Provider` By default it works well and **CAM/SCR/TELE** sources shows up in results: ![image](https://github.com/Tikipeter/tikipeter.github.io/assets/29895680/064551b2-df3e-4772-88e0-5b230d5085ab) -------------------------------------------------------- When configuring `Highlight Results Based On` to `Quality` ![image](https://github.com/Tikipeter/tikipeter.github.io/assets/29895680/bbf22a0b-49c8-40b3-9cb7-0c87e09abf9d) ![image](https://github.com/Tikipeter/tikipeter.github.io/assets/29895680/c29efee6-cec9-40de-ba66-341d7196737d) The **CAM/SCR/TELE** sources disappear: ![image](https://github.com/Tikipeter/tikipeter.github.io/assets/29895680/1dd66f38-f6df-48fb-b2dd-89c3ec765f39) -------------------------------------------------------- I've added traceback logging to the `except: pass` section in `resources\lib\windows\sources.py` line **193** to check the error in the log: ``` except Exception as e: import traceback kodi_utils.logger("FEN", f"{type(e).__name__}: {str(e)}\n{traceback.format_exc()}") pass ``` Results in log for CAM/SCR/TELE sources: ``` Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\Kodi\addons\plugin.video.fen\resources\lib\windows\sources.py", line 164, in builder set_property('highlight', self.info_highlights_dict[key]) KeyError: 'cam' Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\Kodi\addons\plugin.video.fen\resources\lib\windows\sources.py", line 164, in builder set_property('highlight', self.info_highlights_dict[key]) KeyError: 'tele' Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\Kodi\addons\plugin.video.fen\resources\lib\windows\sources.py", line 164, in builder set_property('highlight', self.info_highlights_dict[key]) KeyError: 'scr'` ``` Since they don't have quality highlight settings / values from: `resources\lib\modules\settings.py` - **scraping_settings()** function The `Highlight Results Based On - Quality` setting can't apply, and thus the error in log. I've managed to make them appear with these changes in **scraping_settings()** function - look for "CHANGE 1 / CHANGE 2 / CHANGE 3" comments: ``` def scraping_settings(): highlight_type = int(get_setting('fen.highlight.type', '0')) if highlight_type == 3: highlight = get_setting('fen.scraper_single_highlight', 'FF008EB2') return {'highlight_type': 2, '4k': highlight, '1080p': highlight, '720p': highlight, 'sd': highlight} hoster_highlight, torrent_highlight, furk_highlight, easynews_highlight, debrid_cloud_highlight, folders_highlight = '', '', '', '', '', '' #### CHANGE 1: Added 'highlight_CAM_SCR_TELE' #### rd_highlight, pm_highlight, ad_highlight, highlight_4K, highlight_1080P, highlight_720P, highlight_SD, highlight_CAM_SCR_TELE = '', '', '', '', '', '', '', '' if highlight_type in (0, 1): furk_highlight = get_setting('fen.provider.furk_colour', 'FFE6002E') easynews_highlight = get_setting('fen.provider.easynews_colour', 'FF00B3B2') debrid_cloud_highlight = get_setting('fen.provider.debrid_cloud_colour', 'FF7A01CC') folders_highlight = get_setting('fen.provider.folders_colour', 'FFB36B00') if highlight_type == 0: hoster_highlight = get_setting('fen.hoster.identify', 'FF0166FF') torrent_highlight = get_setting('fen.torrent.identify', 'FFFF00FE') else: rd_highlight = get_setting('fen.provider.rd_colour', 'FF3C9900') pm_highlight = get_setting('fen.provider.pm_colour', 'FFFF3300') ad_highlight = get_setting('fen.provider.ad_colour', 'FFE6B800') elif highlight_type == 2: highlight_4K = get_setting('fen.scraper_4k_highlight', 'FFFF00FE') highlight_1080P = get_setting('fen.scraper_1080p_highlight', 'FFE6B800') highlight_720P = get_setting('fen.scraper_720p_highlight', 'FF3C9900') highlight_SD = get_setting('fen.scraper_SD_highlight', 'FF0166FF') #### CHANGE 2: Set color for 'highlight_CAM_SCR_TELE' (static, not from addon settings) #### highlight_CAM_SCR_TELE = 'FF00FFFF' return {'highlight_type': highlight_type, 'hoster_highlight': hoster_highlight, 'torrent_highlight': torrent_highlight,'real-debrid': rd_highlight, 'premiumize': pm_highlight, 'alldebrid': ad_highlight, 'rd_cloud': debrid_cloud_highlight, 'pm_cloud': debrid_cloud_highlight, 'ad_cloud': debrid_cloud_highlight, 'furk': furk_highlight, 'easynews': easynews_highlight, 'folders': folders_highlight, '4k': highlight_4K, '1080p': highlight_1080P, '720p': highlight_720P, 'sd': highlight_SD, 'cam': highlight_CAM_SCR_TELE, 'tele': highlight_CAM_SCR_TELE, 'scr': highlight_CAM_SCR_TELE} #### Change 3: added 'cam', 'tele', 'scr' keys with 'highlight_CAM_SCR_TELE' color as value #### ``` Result: ![image](https://github.com/Tikipeter/tikipeter.github.io/assets/29895680/dbf8a97f-102d-40b6-8fcf-0efd28191cb2) Thank you again : )
Tikipeter commented 2024-01-26 22:31:02 +00:00 (Migrated from github.com)

Thanks Twilight.

I'm on it.

Thanks Twilight. I'm on it.
TwilightMercy commented 2024-01-28 00:45:58 +00:00 (Migrated from github.com)

Thanks Twilight.

I'm on it.

latest FEN 3.2.21 works great, with CAM/SCR/TELE sources defaults to SD highlight color.
Thank you very much!

> Thanks Twilight. > > I'm on it. latest FEN 3.2.21 works great, with CAM/SCR/TELE sources defaults to SD highlight color. Thank you very much!
Sign in to join this conversation.
No description provided.