BiglySoftware / BiglyBT-plugin-rssfeed

An RSS feed parser that allows unattended, automated download of torrents by means of advanced feed filter configurability.
GNU General Public License v2.0
4 stars 4 forks source link

Exports/IMports not working #3

Closed raymondjstone closed 6 years ago

raymondjstone commented 6 years ago

Since the latest update there is still a problem with the pass/fail field when exporting and importing the JSON file

New items set as pass are exporting with a value of '0' not pass/fail and then import in with no error but are treated as fail despite showing pass on screen

example from an exported file (first item is correct, 2nd if not(

  {
    "@id":54377,
    "@type":"org.kmallan.azureus.rssfeed.FilterBean",
    "name":"^desus",
    "storeDir":"",
    "expression":"^desus",
    "exclude":"",
    "category":"",
    "type":"TVShow",
    "mode":"Fail",
    "excludes":{
      "@type":"java.util.ArrayList"
    },
    "state":0,
    "rateUpload":0,
    "rateDownload":0,
    "startSeason":0,
    "startEpisode":0,
    "endSeason":0,
    "endEpisode":0,
    "filtId":1496780893128,
    "urlId":1161063264953,
    "isRegex":true,
    "isFilename":false,
    "matchTitle":true,
    "matchLink":true,
    "moveTop":false,
    "customRate":false,
    "renameFile":false,
    "renameIncEpisode":false,
    "disableAfter":false,
    "cleanFile":false,
    "enabled":true,
    "smartHistory":true,
    "exprLower":"^desus",
    "exprPat":{
      "pattern":".*^desus.*",
      "flags":0
    },
    "minTorrentSize":0,
    "maxTorrentSize":0
  },
  {
    "@id":54365,
    "@type":"org.kmallan.azureus.rssfeed.FilterBean",
    "name":"Deception",
    "storeDir":"",
    "expression":"^Deception",
    "exclude":"",
    "category":"",
    "type":"0",
    "mode":"0",
    "excludes":{
      "@type":"java.util.ArrayList"
    },
    "state":0,
    "rateUpload":0,
    "rateDownload":0,
    "startSeason":1,
    "startEpisode":10,
    "endSeason":0,
    "endEpisode":0,
    "filtId":1357483585100,
    "urlId":1161063264953,
    "isRegex":true,
    "isFilename":false,
    "matchTitle":true,
    "matchLink":true,
    "moveTop":false,
    "customRate":false,
    "renameFile":false,
    "renameIncEpisode":false,
    "disableAfter":false,
    "cleanFile":false,
    "enabled":true,
    "smartHistory":true,
    "exprLower":"^deception",
    "exprPat":{
      "pattern":".*^deception.*",
      "flags":0
    },
    "minTorrentSize":0,
    "maxTorrentSize":0
  },
raymondjstone commented 6 years ago

The type field is also affected it is exporting as 0 rather than TVShow for new items.

parg commented 6 years ago

You should not expect values to be exported as English text for 'type' and 'mode' for new items. Since the plugin was internationalized (a few versions ago) a bug was introduced as internally the plugin was comparing against the English values (hard-coded) whereas the saved values were localized. To fix this I switched to exporting values in a locale-invariant way (0=TVShow, 1=Movie, 2=Other, 3=None / 0=Pass, 1=Fail). However, to migrate people's old configuration support was added to also treat the persisted English values appropriately.

That being said, there is obviously still a bug if imported Pass values are being treated as Fail...

raymondjstone commented 6 years ago

Not sure what the issue is but the 2nd example I had above is never getting triggered, could be that it is not being treated as a TVShow rather than being treated as fail perhaps

raymondjstone commented 6 years ago

Given that the numeric fields are now the correct values btw I will amend the .NET application I use to resort my filters to use them and to update the old settings I have as well. Not sure why the 'deception' filter is not kicking in however

parg commented 6 years ago

If you figure out it definitely is a bug then it would help if you could give details on how to reproduce it - thanks

raymondjstone commented 6 years ago

Might not be a bug after all just a combination of things

Initially I thought having values of Pass and 0 was a bug but you have indicated that this is now by design, one of the affected items was included above but looking at the history beans it looks like it was triggered in the past by a show of the same name (or some other match in the past)

{
    "@id":5887,
    "@type":"org.kmallan.azureus.rssfeed.HistoryBean",
    "fileData":"E:\\My Music - Incoming\\_being_downloaded\\in\\Deception.S01E10.HDTV.x264-LOL",
    "location":"{removed for security reasons}",
    "filtType":"TVShow",
    "filtName":"Deception",
    "histId":1363057596029,
    "filtId":1357483585100,
    "title":null,
    "year":0,
    "seasonStart":1,
    "seasonEnd":1,
    "episodeStart":10,
    "episodeEnd":10,
    "proper":false
  },

so this would in this case explain the item not being triggered now and in fact is not related to the export items encoding.

parg commented 6 years ago

Thanks!