Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4099 closed Enhancement (fixed)

Add 'not equal' in groups prefrences

Reported by: blumman Owned by: livings124
Priority: Normal Milestone: 2.30
Component: Mac Client Version: 2.22
Severity: Normal Keywords:
Cc:

Description

Transmission: 2.22 (12099) System: Mac Mini OS X 10.6.6

How hard would it be to implement 'not equal' in the groups settings?

E.g. I would like name 'X' to go to folder 'X'. This works perfectly and I am using name 'contains' 'X' for this.

If name 'X' also contains 'Y', say 'XY' then I don't want to 'XY' to be stored in folder 'X'. I would then like to setup a rule that says:

  • 'All of the following are true'
  • Name 'contains' 'X'
  • Name 'not equal/does not contain' 'Y'

I do not see a way to setup this rule today. I can only use the following criterias:

  • contains
  • is
  • begins with
  • ends with
  • matches

Change History (14)

comment:1 Changed 11 years ago by livings124

  • Component changed from Transmission to Mac Client
  • Owner set to livings124

comment:2 Changed 11 years ago by livings124

comment:3 Changed 11 years ago by livings124

  • Milestone changed from None Set to 2.30

comment:4 Changed 11 years ago by blumman

livings124, I gave it a try but it does not work as intended. I wish I could explain the scenario in more detail but I think it would be inappropriate to write it here. I will try to explain the scenario as good as I can.

I am not sure about the logic behind 'contains' but I assume it acts as a wildcard. I.e, if name 'contains' 'X' anywhere in the name it equals true.

What I believe is happening now is that name 'contains' 'X' anywhere in the name and equals true. Then name 'is not' 'Y' and equals true. So it moves folder name 'XY' to folder 'X'.

I would like Transmission to check that name contains 'X' and make sure it does not contain 'Y'. If these criterias are true then the folder should be moved to 'X'. If not then it should move it to the default folder.

One thing that I found out when I tried it was that the folder name contains 'X' but does not always contain 'Y'. However the files in that folder could contain 'XY'. So it would be nice if the rule also could be applied on 'Any File' and not just 'Name'.

Does it make sense? :-)

comment:5 Changed 11 years ago by livings124

Just to make sure I understand, you want "does not contain," while I added "is not equal to"?

comment:6 Changed 11 years ago by livings124

  • Priority changed from Low to Normal
  • Severity changed from Minor to Normal

comment:7 follow-up: Changed 11 years ago by livings124

It appears "does not contain" is not offered by the OS.

Version 0, edited 11 years ago by livings124 (next)

comment:8 Changed 11 years ago by blumman

Without having any coding skills I would say yes. 'does not contain' would be something that I am looking for. To me it means that it would make sure that 'Y' does not exist.

Regular expressions are hard to understand for someone who have not used it before. I know that there are predefined search strings out there so I guess I could Google something that I could use and modify it to my needs.

Would I be able to have one criteria in (name or any file) 'matches' my regex which says contains 'X' but not contains 'Y'?

Just to make it clear, can I use regex code in the criteria field?

comment:9 in reply to: ↑ 7 Changed 11 years ago by smono

Replying to livings124:

It appears "does not contain" is not offered by the OS.

The compound predicate that offers "Any" and "All" "of the following" can be extended to offer "None" - maybe that would cover the OP's request?

To activated it, in GroupRules?.xib, click on the compound rule in the template until it gets selected, then open the Attributes Inspector (Cmd-1) and enable "Not".

comment:10 Changed 11 years ago by livings124

  • Summary changed from Request to add 'not equal' in groups prefrences to Add 'not equal' in groups prefrences

Thanks smono! r12155

blumman, does that cover your needs? You can hold down option to add a new "none of the follow" rows.

#4117 covers the "none of the following" criteria.

Last edited 11 years ago by livings124 (previous) (diff)

comment:11 Changed 11 years ago by livings124

  • Resolution set to fixed
  • Status changed from new to closed

comment:12 Changed 11 years ago by blumman

livings124,

I do not get it. I downloaded the r12155 but I do not get the option "none of the following". What am I doing wrong?

comment:13 Changed 11 years ago by livings124

Are you looking at the top row? You should also make sure you're using the newest nightly currently available.

comment:14 Changed 11 years ago by blumman

I downloaded the latest nightly (12200). After a somewhat complex rule using 'none' (a bit different what I had in mind) I managed to get it working. However, my remote access stopped working. That might be another issue or something with my client.

Anyway, I really appreciate that you took the time to add the functionality.

Note: See TracTickets for help on using tickets.