Private GIT

Skip to content
Snippets Groups Projects
Commit d5ff98a7 authored by Vince Valenti's avatar Vince Valenti
Browse files

Fix an issue with quality pill title

In cases where initial and preferred qualities were the same, the title
of the span incorrectly showed 'None' as the preferred quality.
parent 923e3d9b
Branches
Tags
No related merge requests found
...@@ -3,13 +3,6 @@ ...@@ -3,13 +3,6 @@
from sickbeard.common import Quality, qualityPresets, qualityPresetStrings from sickbeard.common import Quality, qualityPresets, qualityPresetStrings
%> %>
<%def name="renderQualityPill(quality, showTitle=False, overrideClass=None)"><% <%def name="renderQualityPill(quality, showTitle=False, overrideClass=None)"><%
iQuality = quality & 0xFFFF
pQuality = quality >> 16
# If initial and preferred qualities are the same, show pill as initial quality
if iQuality == pQuality:
quality = iQuality
# Build a string of quality names to use as title attribute # Build a string of quality names to use as title attribute
if showTitle: if showTitle:
iQuality, pQuality = Quality.splitQuality(quality) iQuality, pQuality = Quality.splitQuality(quality)
...@@ -29,6 +22,13 @@ ...@@ -29,6 +22,13 @@
else: else:
title = "" title = ""
iQuality = quality & 0xFFFF
pQuality = quality >> 16
# If initial and preferred qualities are the same, show pill as initial quality
if iQuality == pQuality:
quality = iQuality
if quality in qualityPresets: if quality in qualityPresets:
cssClass = qualityPresetStrings[quality] cssClass = qualityPresetStrings[quality]
qualityString = qualityPresetStrings[quality] qualityString = qualityPresetStrings[quality]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment