Possible improper interpretation of configuration setting

Bug #216566 reported by chapterthree
2
Affects Status Importance Assigned to Milestone
LottaNZB
Fix Released
High
Severin H

Bug Description

This may be up for debate due to the semi-ambiguous nature of HellaNZB's configuration settings. This could also simply be a UI issue (I haven't had a chance to test what functionally happens yet).

In the default install of HellaNZB, the 'Smart Par' setting is commented out:

# Disable SMART_PAR (download all PAR files)
#Hellanzb.SMART_PAR = False

This setting is properly carried over by LottaNZB, but when you go to the UI setting, the checkbox for 'Download PAR recovery files only if necessary' is unchecked, implying that it will always download PARs (I haven't had a chance to test actual functionality on that yet).

Here comes the [possible] debate. It appears that HellaNZB interprets this commented out (unset) setting as True, meaning Smart Par is enabled (it does not download PARs unless it needs some for repair, which I have confirmed with past usage). Now my guess is the hard-coded default value (when no configuration override is given) for this particular setting is 'True.'

Then I wondered if maybe the default logic was to assume 'True' for all unset settings? But this is not the case, because another default configuration option is:

# Skip unraring during post processing
#Hellanzb.SKIP_UNRAR = True

If this were set to 'True' in the engine, then none of my downloads would have been unrar'ed, which is not the case. This unfortunately seems to indicate that HellaNZB has varying hard-coded default settings.

Now the question is how does LottaNZB handle configuration settings that are not defined in the configuration file? Does it assume blanket 'False' for unset settings? If so this would differ from what HellaNZB does. Or is this just a UI interpretation/presentation issue?

Revision history for this message
Sander Tuit (avirulence) wrote :

Thanks for reporting this. This is something we probably wouldn't have caught if not for people testing LottaNZB. The problem is indeed that HellaNZB assumes different default values when some properties aren't set.

I propose that we solve this by setting SMART_PAR to true when we copy the ~/.hellanzb/hellanzb.conf file to the ~/.lottanzb directory.

Changed in lottanzb:
importance: Undecided → High
milestone: none → 0.2.1
status: New → Confirmed
Severin H (severinh)
Changed in lottanzb:
assignee: nobody → lottanzb
Severin H (severinh)
Changed in lottanzb:
milestone: 0.2.1 → 0.3
Severin H (severinh)
Changed in lottanzb:
status: Confirmed → In Progress
Revision history for this message
Severin H (severinh) wrote :

The newest revision aims to partially fix this issue. Both the SMART_PAR and CATEGORIZE_DEST HellaNZB preferences are set to True if they're commented out. They way how it's solved isn't the most elegant one. The HellaPrefs class might deserve a redesign in a future version of LottaNZB to make it more robust.

Revision history for this message
Severin H (severinh) wrote :

LottaNZB's configuration parsing mechanism now incorporates HellaNZB's default values. This issue is hopefully resolved thanks to them.

Changed in lottanzb:
assignee: lottanzb → lantash
status: In Progress → Fix Committed
Severin H (severinh)
Changed in lottanzb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.