Closed carnivorouz closed 8 years ago
Well lets check what CouchPotato is giving back to us. The below URL is what we call to check for status, adjust it for your own IP and API key, and an IMDB ID for a movie that you want to check against.
Assuming the call works, we're looking at the very first entry which should look like below (use something like JSONView Chrome extension to make it more readable).
http://192.168.0.1:5050/api/abcdefg1234567/media.get?id=tt123456
I tested it out with a random movie of my picking, 'Snowpiercer'.
Results of the URL once complete (this is going to get ugly, my apologies removed unused parts --lokenx):
{
"media": {
"status": "done",
...
}
Checks out as "done" from what I see, although the JSON structure appears a bit different than your example.
And here is my request once it had been completed for some time:
Should definitely come up as available then. Are others the same too? Does anyone the test button work in admin settings? Any log errors?
On Aug 18, 2016, 21:41 -0400, carnivorouz notifications@github.com, wrote:
I tested it out with a random movie of my picking, 'Snowpiercer'.
Results of the URL once complete (this is going to get ugly, my apologies):
{ "media": { "status": "done", "info": { "rating": { "imdb": [ 7, 181847 ] }, "genres": [ "Action", "Science Fiction", "Drama", "Sci-Fi", "Thriller" ], "tmdb_id": 110415, "plot": "Set in a future where a failed climate-change experiment kills all life on the planet except for a lucky few who boarded the Snowpiercer, a train that travels around the globe, where a class system emerges.", "tagline": "AD 2031, the passengers in the train are the only survivors on Earth.", "year": 2013, "original_title": "Snowpiercer", "actor_roles": { "Luna Sophia Bar-Cohen": "Magdalena", "Huh Chan": "Plan Tender 1", "Brian Foley": "Soldier A", "Clark Middleton": "Painter", "Marcanthonee Reis": "Tim (as Marcanthonee Jon Reis)", "Griffin Seymour": "Boy", "Emma Levie": "Claude", "Parry Shen": "Voice Actor (voice)", "Miroslav Navrátil": "Giant", "Jim High": "Soldier 1", "Ed Harris": "Wilford", "Magdaléna Weigertová": "Doris", "Paul Lazar": "Paul", "Vlad Ivanov": "Franco The Elder", "Kenny Doughty": "News Reporter", "Jamie Bell": "Edgar", "Tyler Williams": "Young Wilford", "Kang-ho Song": "Namgoong Minsu", "Sean Renwick": "Sergio", "Eunkyung Song": "Korean Translator Voice (voice)", "John Hurt": "Gilliam", "Tómas Lemarquis": "Egg-Head", "Seisuke Tsukahara": "Old Man", "Chris Evans": "Curtis", "Luke Pasqualino": "Grey", "Tilda Swinton": "Mason", "Jonny Loquasto": "Voice Actor (voice)", "Haruna Honcoopova": "Female Officer", "Ewen Bremner": "Andrew", "Alison Pill": "Teacher", "Adnan Haskovic": "Franco The Younger", "Robert Russell": "Gerald", "Steve Park": "Fuyu (as Stephen Park)", "Lucie Burianová": "Plan Tender 2", "Ana Braun": "Ylfa", "Dana Green": "Voice Actor (voice)", "Tomáš Diankiška": "Dark Voice", "Ko Ah-Sung": "Yona", "Park Sungtaek": "Chan", "Octavia Spencer": "Tanya", "Peter Hallin": "Soldier 2", "Kendrick Ong": "Soldier B", "Joseph Bertot": "Voice Actor (voice)", "Karel Veselý": "Andy" }, "via_imdb": true, "images": { "disc_art": [ ], "poster": [ "http://ia.media-imdb.com/images/M/MV5BMTQ3NzA1MTY3MV5BMl5BanBnXkFtZTgwNzE2Mzg5MTE@._V1_SX300.jpg" ], "backdrop": [ "https://image.tmdb.org/t/p/w1280/GY6RVLqDjaDMnT06DL61MVlbgS.jpg" ], "extra_thumbs": [ ], "poster_original": [ "https://image.tmdb.org/t/p/original/oP0ZWr6MsaQ1TV7xvnZJMKSfz0H.jpg" ], "actors": { "Kang-ho Song": "https://image.tmdb.org/t/p/w185/1JL0Shq6js9Ox2FEIW2vHqIISv9.jpg", "Steve Park": "https://image.tmdb.org/t/p/w185/o0OEyfHM4IJ7PFMk9X87hivxtJs.jpg", "John Hurt": "https://image.tmdb.org/t/p/w185/rpuH2YRLpxJjMxHq4T1QdOSVtlN.jpg", "Tómas Lemarquis": "https://image.tmdb.org/t/p/w185/6qWyGbPWE020wTezwoWx1wIPuPQ.jpg", "Octavia Spencer": "https://image.tmdb.org/t/p/w185/aii7wrNglEH07xjQvtRBEGSUEvT.jpg", "Clark Middleton": "https://image.tmdb.org/t/p/w185/3rk5aqlLHdQBdlmWaNoTr8hvSaH.jpg", "Luke Pasqualino": "https://image.tmdb.org/t/p/w185/t2QXFtNxLL0KgUXSNnFhJqcNIA.jpg", "Chris Evans": "https://image.tmdb.org/t/p/w185/kRlx7PxXkom7Daj8Z2HmcbPQB1o.jpg", "Vlad Ivanov": "https://image.tmdb.org/t/p/w185/zZn7WAHQeignC0WPfhA5d0SNqjZ.jpg", "Parry Shen": "https://image.tmdb.org/t/p/w185/eFuN9NvWDCXAbsjx9eTiAqN5DP1.jpg", "Tilda Swinton": "https://image.tmdb.org/t/p/w185/eGNo9qwlunvAi4kCVUEFtQFM5X.jpg", "Kenny Doughty": "https://image.tmdb.org/t/p/w185/7toqP6Xv8pk4PX9er3ddzrz3wbx.jpg", "Jim High": "https://image.tmdb.org/t/p/w185/2WWlIuaMbSTvbi6Vmh9sR4wmGl0.jpg", "Ed Harris": "https://image.tmdb.org/t/p/w185/a9ITc3shCAWjV4qKf3rgR0Opu3y.jpg", "Ewen Bremner": "https://image.tmdb.org/t/p/w185/7CQBnBHSNDcbY2LucqWqEpKWsCH.jpg", "Alison Pill": "https://image.tmdb.org/t/p/w185/1jeDJlSfVFoPMCHLkTqsFKLR9Gu.jpg", "Jamie Bell": "https://image.tmdb.org/t/p/w185/7HgepK5YE8u0xrv3lJZjaEoENwl.jpg", "Paul Lazar": "https://image.tmdb.org/t/p/w185/8Aj1kAid7DQoLx76v7yn0pQdo90.jpg", "Ko Ah-Sung": "https://image.tmdb.org/t/p/w185/ypLzFARDiB0S8eV8YWj0mi5vmJW.jpg" }, "backdrop_original": [ "https://image.tmdb.org/t/p/original/GY6RVLqDjaDMnT06DL61MVlbgS.jpg" ], "clear_art": [ ], "logo": [ ], "banner": [ ], "landscape": [ ], "extra_fanart": [ ] }, "directors": [ "Joon-ho Bong" ], "titles": [ "Snowpiercer", "Le Transperceneige", "末日列車", "雪国列车", "Seolgug Yeolcha", "Снігобур", "Snowpiercer - Túlélők viadala", "Hólyukasztó", "Expresso do Amanhã", "قطار یخ شکن", "スノーピアサー" ], "imdb": "tt1706620", "mpaa": "R", "via_tmdb": true, "actors": [ "Chris Evans", "Kang-ho Song", "Ed Harris", "John Hurt" ], "writers": [ "Joon-ho Bong (screenplay)", "Kelly Masterson (screenplay)", "Joon-ho Bong (screen story)", "Jacques Lob (based on Le Transperceneige by)", "Benjamin Legrand (based on Le Transperceneige by)", "Jean-Marc Rochette (based on Le Transperceneige by)" ], "runtime": 126, "type": "movie", "released": "2013-08-01" }, "_t": "media", "releases": [ { "status": "ignored", "info": { "seeders": 17, "protocol": "torrent", "description": "", "name": "Snowpiercer 2013 LIMITED 1080p BluRay X264-AMIABLE", "url": "https://www.torrentleech.org/download/527045/Snowpiercer.2013.LIMITED.1080p.BluRay.X264-AMIABLE.torrent", "age": 0, "seed_ratio": 5.0, "leechers": 0, "score": 287, "provider": "TorrentLeech", "seed_time": 24, "provider_extra": "", "detail_url": "https://www.torrentleech.org/torrent/527045", "type": "movie", "id": "527045", "size": 7884.8 }, "download_info": { "status_support": true, "id": "287be8cc8d37b205a5977a9854295e5b2908db4d", "downloader": "Transmission" }, "_id": "56ea2daf5cf846af81baebcee50c7c4a", "media_id": "860b4306387744c2a52013c987d350a9", "_rev": "00062437 (tel:00062437)", "_t": "release", "is_3d": 0, "last_edit": 1471566731 (tel:1471566731), "identifier": "f6b88fc09681a6fa0504618d328b93d6", "quality": "1080p" }, { "status": "seeding", "info": { "seeders": 10, "protocol": "torrent_magnet", "description": "", "name": "Snowpiercer.2013.1080p.BluRay.X264-AMIABLE (2016) AMIABLE 1080p x264 10 seeders", "url": "magnet:?xt=urn:btih:e12858fae0b58c115847f3858f9563616be2c9aa&dn=Snowpiercer.2013.1080p.BluRay.X264-AMIABLE&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce", "age": 10, "seed_ratio": "", "leechers": 6, "score": 197, "provider": "Rarbg", "seed_time": "", "provider_extra": "", "detail_url": "https://torrentapi.org/redirect_to_info.php?token=65vyhjmx07&p=1_1_0_7_4_7_4__e12858fae0", "type": "movie", "id": 9105, "size": 7880 }, "download_info": { "status_support": true, "id": "e12858fae0b58c115847f3858f9563616be2c9aa", "downloader": "Transmission" }, "_id": "824a44bc5c254d5c87c96a3d656146f9", "media_id": "860b4306387744c2a52013c987d350a9", "_rev": "0006c88e", "_t": "release", "is_3d": 0, "last_edit": 1471569606 (tel:1471569606), "identifier": "3d0cc9a4161a0676bd2fd06a252a3ff0", "quality": "1080p" }, { "status": "available", "info": { "seeders": 2, "protocol": "torrent_magnet", "description": "", "name": "Snowpiercer.2013.1080p.BluRay.x264.DTS-RARBG (2014) RARBG 1080p x264 2 seeders", "url": "magnet:?xt=urn:btih:9a9e5a731f5884fb768e8d201ee23cedc05aad03&dn=Snowpiercer.2013.1080p.BluRay.x264.DTS-RARBG&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce", "age": 879, "seed_ratio": "", "leechers": 3, "score": 128, "provider": "Rarbg", "seed_time": "", "provider_extra": "", "detail_url": "https://torrentapi.org/redirect_to_info.php?token=65vyhjmx07&p=5_8_5_5_3_3__9a9e5a731f", "type": "movie", "id": 2481, "size": 8710 }, "_id": "96bd6a6eed044bda8b831262eef13d95", "media_id": "860b4306387744c2a52013c987d350a9", "_rev": "00023c92", "_t": "release", "is_3d": 0, "last_edit": 1471568535 (tel:1471568535), "identifier": "94e53f0247e8df857d73580e897cc7da", "quality": "1080p" }, { "status": "done", "files": { "nfo": [ "/mnt/Media/Movies/Snowpiercer.2013.1080p.cd2.orig.nfo", "/mnt/Media/Movies/Snowpiercer.2013.1080p.cd1.orig.txt" ], "movie": [ "/mnt/Media/Movies/Snowpiercer.2013.1080p.mkv" ] }, "_id": "54defc4b006f4c7cbed72d3014b0d2b0", "media_id": "860b4306387744c2a52013c987d350a9", "_rev": "0002dfa4", "_t": "release", "is_3d": false, "last_edit": 1471569768 (tel:1471569768), "identifier": "tt1706620.AC3.1080p", "quality": "1080p" } ], "title": "Snowpiercer", "_rev": "00065107 (tel:00065107)", "profile_id": "b5864f182d804680abc3fd46fb83a8b2", "_id": "860b4306387744c2a52013c987d350a9", "tags": [ "recent" ], "last_edit": 1471563965 (tel:1471563965), "category_id": null, "type": "movie", "files": { "image_poster": [ ] }, "identifiers": { "imdb": "tt1706620" } }, "success": true }
Checks out as "done" from what I see, although the JSON structure appears a bit different than your example.
And here is my request once it had been completed for some time:
— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/lokenx/plexrequests-meteor/issues/398#issuecomment-240905722), or mute the thread (https://github.com/notifications/unsubscribe-auth/AJ1eTBabXNQFx9eswWpaxabCTmoXMZKzks5qhQmxgaJpZM4JnIc2).
Others I checked from the URL all were the same with "done". Test button for CouchPotato returns a Success! Plex requests is very light on logging or at least it seems so to me as I've only ever seen auth failures in there or errors when something is not found in IMDB. If there are more verbose logs I should be looking at please let me know. As of right now under Logs it's just "No logs found!"
It is rather light, bad design decisions. Out of curiosity is this a relatively new install or has it been update for awhile? Just wondering if there's a db scheme miss match or silent error.
On Aug 18, 2016, 21:51 -0400, carnivorouz notifications@github.com, wrote:
Others I checked from the URL all were the same with "done". Test button for CouchPotato returns a Success! Plex requests is very light on logging or at least it seems so to me as I've only ever seen auth failures in there or errors when something is not found in IMDB. If there are more verbose logs I should be looking at please let me know. As of right now under Logs it's just "No logs found!"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/lokenx/plexrequests-meteor/issues/398#issuecomment-240907078), or mute the thread (https://github.com/notifications/unsubscribe-auth/AJ1eTGdU3rSVjGCVmt9SfzK8of9L4WPGks5qhQwlgaJpZM4JnIc2).
Relatively new: [20:54 root /opt]# ls -ltrh | grep request drwxr-xr-x 11 root root 4.0K Jul 6 10:20 plexrequests-meteor
So something is failing silently or not getting written to the database correctly. What happens if you add a movie that is done
as far as CouchPotato is concerned?
It shouldn't let you add the movie and say that it's already available.
Ok..interesting, it does the lookup correctly then. I get "Movie is already on Plex!" And it automatically shows as available in Requests
Huh well that makes even less sense, they both make calls to the same end-point! The only difference is that we manually mark the movie as done when requesting, but when auto-checking we just populate whatever CP gives back.
What's more likely is that maybe the auto-checker isn't running every hour. I don't know how to check CP logs for API calls it receives, and we don't log making the calls. I assume the app has been restarted at some point?
I've been deep into the CP logs for a while and I've seen 0 mentions of API calls so methinks no logging there unfortunately.
You say "auto-checker isn't running every hour" so at least I know it's an hourly cron type task. Is that top of the hour or based on when the PID was started?
On that note, I cron restart CP daily as I've found some items will sit waiting for interaction if it found several matches, that is until a restart which always then snatches the 'Best'.
I don't usually restart Plex Requests as that is the internet facing side of things, but that's my next test:
Requested a new movie and if it does not mark it as available within an hour of 'done' I'll manually bounce Plex Requests and check.
Thanks for working with me on this
Yep the config file can be found here. It does seem we write to console but not to the logger, I'll see if we can change that so at least you'd see it being run. We don't but I'll see if we can to at least help you see if its running.
Are you updating via Git?
I've done everything through Git. In fact I just did a git pull to show it was up to date and pulled 1.15.1. CP found and pulled 'Now You See Me 2' tonight and after I verified it would not mark Available after a restart of Plex Requests. Now that I have 1.15.1 I'll continue tests with that build.
{"media": {"status": "done", "info": {"rating": {"imdb": [6.8, 45554]}, "genres": ["Action", "Adventure", "Comedy", "Crime", "Mystery", "Thriller"], "tmdb_id": 291805, "plot": "One year after outwitting the FBI and winning the public\u2019s adulation with their mind-bending spectacles, the Four Horsemen resurface only to find themselves face to face with a new enemy who enlists them to pull off their most dangerous heist yet.", "tagline": "You Haven't Seen Anything Yet", "year": 2016, "original_title": "Now You See Me 2",...
You should see a log entry on admin page (under logs) informing that it's Updating download status
every hour indicating it's doing the check. If it doesn't, well then something is up with the cron job.
Confirmed new log entry. No change to the Available status.
OK, I'll see if I can make a new branch and add some log outputs to help see what's up. The CouchPotato stuff is actually a separate package so need to figure that out as well without messing up everyone's installs with verbose logs!
sure thing, thanks
I just want to add to this by saying I am seeing the same behavior as @carnivorouz. I just installed it yesterday. Doing a Request on something I have it says that it is already in Plex Library. But when getting it from Couch it won't update the status as Available
Instead of polling, what if CouchPotato updated Plex Requests through its custom webhook notification? Just an idea.
It just started happening on my installation (well at least people complained, since I don't actively use Plex) so something is being funky. I should have some time tonight or this weekend to have a look and see what's up.
Can you let me know your Plex Requests and Couch Potato versions @carnivorouz @RobertKozak please?
CouchPotato: Version 4a0999d9 (9/16/2016, 4:53:22 AM)
Plex Requests: Branch: master Version: 1.15.2
CouchPotato: 4a0999d9 (9/6/2016 2:53:22 AM) - very hard to copy and paste since hovering over it causes it change to 'check for updates' :)
Plex Requests: Branch: master Version: 1.15.2
You da man loken Thanks
Keep in mind it only runs once an hour, and I don't believe on startup so confirm after an hour if they haven't updated. Should also fix TV shows episode status as well.
I can't seem to get this piece working for some reason and google searches haven't provided the right answer yet. Even though movies are successfully snatched in couchpotato after being requested, they will never appear as 'Available'. I have automation of couchpotato and sonarr setup and it will successfully pull what is requested, but will never update that one checkbox. I have verified that the movies requested do show up under Manage in couchpotato and immediately populated in Plex.
System OS: Korora release 23 (Coral) kernel: 4.6.6-200.fc23.x86_64 Mono: Mono JIT compiler version 4.4.2 (Stable 4.4.2.11/f72fe45 Fri Jul 29 09:49:37 UTC 2016) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com plexrequests: 1.15.0 couchpotato: 3.0.1 sonarr: 2.0.0.4230
Latest change to fix this was adjusting couchpotato 'Best' quality to not wait at all before considering a movie complete: Wait 0 day(s) for a better quality and keep searching 0 day(s) for a better (checked) quality. This did not help, obviously.
I am at a loss and any help would be much appreciated. Thanks