genial123 / CouchPotatoServer

Automatic Movie Downloading via NZBs & Torrents
couchpota.to
GNU General Public License v3.0
2 stars 0 forks source link

Didn't snatch golden although it was checked #1

Closed xombiemp closed 11 years ago

xombiemp commented 11 years ago

Hey, I love the goal of this, but it didn't seem to work for me. I left the options at the default, to prefer Golden Popcorn, and did a search for The Hobbit to see if it would indeed snatch the Golden Popcorn torrent for me. It ended up grabbing the Scene release instead of the Golden one. Here is my log:

03-08 09:55:00 INFO [ato.core.plugins.searcher] Search for The Hobbit: An Unexpected Journey in 720P
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Login HTTP status 200; seems successful
03-08 09:55:01 INFO [hpotato.core.plugins.base] Opening url: https://tls.passthepopcorn.me/torrents.php?json=noredirect&searchstr=tt0903624&order_by=relevance&resolution=720p&order_way=descending, params: []
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Movie The Hobbit: An Unexpected Journey (2012) has 3 torrents
03-08 09:55:01 DEBUG [tato.core.plugins.quality] Found via identifier "720p" in The Hobbit An Unexpected Journey (2012) - 720p Blu-ray x264 Scene (720p)
03-08 09:55:01 DEBUG [hpotato.core.plugins.base] Setting cache 148c80aacc8301af705265bc2f4ad551
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Checking if torrents field Resolution equals 720p
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Torrent satisfied Resolution == 720p
03-08 09:55:01 INFO [otato.core.providers.base] Found: score(288) on PassThePopcorn: The Hobbit An Unexpected Journey (2012) - 720p Blu-ray x264 Scene (720p)
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Config: Prefer Golden Popcorn is active, awarding torrent 100 points
03-08 09:55:01 DEBUG [tato.core.plugins.quality] Found via identifier "720p" in The Hobbit An Unexpected Journey (2012) - 720p Blu-ray x264 HQ (720p)
03-08 09:55:01 DEBUG [hpotato.core.plugins.base] Setting cache 18502058633cec3268d7ba0cc1d07c7b
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Checking if torrents field Resolution equals 720p
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Torrent satisfied Resolution == 720p
03-08 09:55:01 INFO [otato.core.providers.base] Found: score(177) on PassThePopcorn: The Hobbit An Unexpected Journey (2012) - 720p Blu-ray x264 HQ (720p)
03-08 09:55:01 DEBUG [tato.core.plugins.quality] Found via identifier "720p" in The Hobbit An Unexpected Journey (2012) - 720p Blu-ray x264 Extras (720p)
03-08 09:55:01 DEBUG [hpotato.core.plugins.base] Setting cache 882cd8bb5418ced8b94db1a36007b12c
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Checking if torrents field Resolution equals 720p
03-08 09:55:01 DEBUG [rs.torrent.passthepopcorn] Torrent satisfied Resolution == 720p
03-08 09:55:01 INFO [otato.core.providers.base] Found: score(20) on PassThePopcorn: The Hobbit An Unexpected Journey (2012) - 720p Blu-ray x264 Extras (720p)
03-08 09:55:02 DEBUG [hpotato.core.plugins.base] Waiting for PassThePopcorn, 10 seconds
03-08 09:55:11 INFO [hpotato.core.plugins.base] Opening url: https://tls.passthepopcorn.me/torrents.php?action=download&id=204983&authkey=&torrent_pass=, params: []
03-08 09:55:12 INFO [ato.core.plugins.searcher] Snatched "The Hobbit An Unexpected Journey (2012) - 720p Blu-ray x264 Scene (720p)": The Hobbit: An Unexpected Journey (2012) in 720P

You can see that it finds 3 torrents and it looks to me like it applies that Golden status to the first one, which is the scene release, and ends up snatching the scene release.

The json returned through the api call clearly shows the scene release first with GoldenPopcorn set to false and the other release with GoldenPopcorn set to true.

{"TotalResults":"1","Movies":[{"GroupId":"80759","Title":"The Hobbit: An Unexpected Journey","Year":"2012","Cover":"https:\/\/ptpimg.me\/x8lay2.jpg","Tags":["adventure","fantasy"],"Directors":[{"Name":"Peter Jackson","Id":"473"}],"ImdbId":"0903624","TotalLeechers":25,"TotalSeeders":2606,"TotalSnatched":3695,"MaxSize":65992523776,"LastUploadTime":"2013-03-08 05:35:57","Torrents":[{"Id":204983,"Quality":"High Definition","Source":"Blu-ray","Container":"MKV","Codec":"x264","Resolution":"720p","Scene":true,"Size":"7079303270","UploadTime":"2013-02-28 01:01:15","Snatched":"1670","Seeders":"1147","Leechers":"13","Checked":true,"GoldenPopcorn":false},{"Id":206161,"Quality":"High Definition","Source":"Blu-ray","Container":"MKV","Codec":"x264","Resolution":"720p","Scene":false,"Size":"9360762223","UploadTime":"2013-03-05 23:40:00","Snatched":"116","Seeders":"103","Leechers":"4","Checked":true,"GoldenPopcorn":true},{"Id":206059,"Quality":"Other","Source":"Blu-ray","Container":"MKV","Codec":"x264","Resolution":"720p","Scene":false,"Size":"7813839769","UploadTime":"2013-03-05 09:41:15","RemasterTitle":"Extras","Snatched":"19","Seeders":"16","Leechers":"0","Checked":true,"GoldenPopcorn":false}]}]

Because I checked "Prefere Golden Popcorn" in the preferences I would expect it to always download the Golden Popcorn release if it was available. Can you take a look at this example and see if you can see why this is not the case?

genial123 commented 11 years ago

Upped the bonus-points awarded from config-settings, should be working fine now.

xombiemp commented 11 years ago

Yep, that fixed it. Tested again with The Hobbit and it snatched the Golden Popcorn as expected. Thanks! You should submit a pull request for this.