Private GIT

Skip to content
Snippets Groups Projects
Commit 8e7d7a15 authored by Vince Valenti's avatar Vince Valenti Committed by Dustyn Gibson
Browse files

Render more specific quality pills on show list

If specific (custom) qualities are selected for a show, the show list
will show the quality column as "Custom", even if only a single quality
is selected. This commit allows rendering the actual quality selected.

In addition to handling cases where just a single quality is selected, we
are also handling cases where both resolutions of a quality type are
selected. For example, if both 720p and 1080p WEB-DL is selected, we'll
render this as simply "WEB-DL" and display the pill with a striped
background to indicate both resolutions. This is done for HDTV, WEB-DL,
and BluRay.

A Mako renderQualityPill() %def was created in a new file named
inc_defs.mako so this pill rendering functionality can be used on other
pages easily. Other such %defs can go into this file also.

A new dictionary (cssClassStrings) was added to the Quality object to
more easily select the correct CSS classes and avoid things like
.replace("720p","HD720p").replace("1080p","HD1080p")...

Apply new quality pills to coming episodes page

Apply new quality pills to history page

Apply new quality pills to manage/mass update page

Apply new quality pills to posters on shows page

This commit modifies the %def to accept an additional parameter,
overrideClass, which will override the pill's class attribute for the
span tag.

Apply new quality pills to displayShow page

Also modified renderQualityPill %def to not output extraneous white
space to avoid unwanted spaces around the comma.

Remove unnecessary import from displayShow

Clean up Quality.cssClassStrings a bit

Rename HDTV to 720p HDTV

Not sure if anyone actually wants to do this, but it makes sense to have
the resolution included in the quality name since there is now a 1080p
version. Makes it clear that HDTV specifically refers to 720p HDTV.
parent 169d07b8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment