Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds "Manual Snatch" feature #6

Merged
merged 42 commits into from
Mar 18, 2016
Merged

Adds "Manual Snatch" feature #6

merged 42 commits into from
Mar 18, 2016

Conversation

fernandog
Copy link
Contributor

TODO:

Improvements:

  • Convert new variables to snake case
  • Move simple conditionals to the beginning of the checks so if they end the statement sooner, then heavier conditionals don't need to be processed. Instead of if search_mode == 'sponly' and (manualSearch is True or manualSelect is True): if (manualSearch is True or manualSelect is True) and search_mode == 'sponly':. Also if just checking truthy shorten to (manualSearch or manualSelect)
  • Add search button special episodes, and perhaps a naming to search for them. Show.Sxx.Special.Title & Show.S00Exx and even more optionally by Show.Title (Like Sonarr does)
  • Block all other "manual snatch" icon in the current page with JS if user hit one "manual snatch" for one episode
  • Fix: Add explicit PK field to the cache tables, currently as a workaround, the implicit rowid is used.

DONE:

  • with a fresh cache.db on first very first "manual search" you won't see the "searching for ...." message and also the page will never refresh
  • Can't remove Scene number ( PR 116)
  • Added a link in show title to open show page ( PR 108)
  • Erase cached results for a show when enable/disable scene numbering ( PR 87)
  • If no cached results, don't redirect OR show "No cached results found ,please wait until new results" PR 58
  • When no results available in cache a single manual search should be started, with an indication to the user. The page should be updated with results as they become available. (we can use jQuery.load() for now, but would we nice of we could do this based on json). Fix pending: [Manual Search] Changed logic using check on searchThreads for manual episode searches #58
  • Change: When the manualSnatchSelect button is clicked, you should be redirected without a Manual search being started in the background. The user will have the option to force a new manual search for the episode in the background.
  • Fix: Search results are added to cache twice. Happens through backlog searches as also manual
  • Fix: both magnifier icons start spinning in display show when click the second magnifier.
  • Fix when result is multi-ep: Show.S04e11-12.720p.WEB-DL. It adds 11|12 to "episode" column
  • Fix: change the way we're redirecting to manualSelect page. Currently we're redirecting based on a PNotify message, where we extract the season/ep info from. This introduces a bug, where scene numbered shows (anime) won't show results.
  • Fix: When downloading using the manual select, the result should not be a json. But an the user should get an indication that the episode has been succesfully snatched.
  • Fix: doesn't check last provider RSS update
  • Fix: adding same result multiple times to cache.db
  • Fix: OperationalError: unrecognized token
  • Fix: OperationalError: no such table: **** (was using provider name and not provider ID while querying DB
  • Fix: passing rowID to manualselect instead of URL and other params
  • Added: buttons to update the page manually, as well as update the page and start a new manual search in the background.
  • Check unused keys in "result": Passing here: https://github.com/pyMedusa/SickRage/blob/manual-search/sickbeard/search_queue.py#L263
    to here: https://github.com/pyMedusa/SickRage/blob/manual-search/sickbeard/search.py#L94
  • Fixed sorting and sort by Quality then seeders. Quality unknown are moved to bottom
  • Wont fix: add row filter in manualSelect.mako
  • Wont fix: fetch all episode status/action from history and show proper status in "manualSelect". Status colum is the status of the item not the episode itself. So it that item was never snatched/download it should be like "Ignored" or something else.
  • Fix: srRoot base url for reverse proxy not implemented for the manual-search url's
  • Fix: Starting with empty cache, caused a never ending loop while searching with results.
  • Fix: Starting with empty cache, caused a never ending loop while searching without results.
  • Added manual search button for specials (2bcb73c)
12:52:14 INFO::SEARCHQUEUE-MANUAL-SEARCH :: Beginning manual search for: [The Strain - S01E01 - Night Zero]
12:52:14 INFO::SEARCHQUEUE-MANUAL-SEARCH :: Downloading The.Strain.S01E01.Night.Zero.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rartv] from Rarbg
12:52:14 DEBUG::SEARCHQUEUE-MANUAL-SEARCH :: Calling Transmission Client
12:52:14 DEBUG::SEARCHQUEUE-MANUAL-SEARCH :: Transmission: Requested a POST connection to url http://localhost:9091/transmission/rpc with Params: None Data: {"arguments": {}, "method": "session-get"}

Before Snatch

image

After Snatch

download 1

xem_absolute_numbering=get_xem_absolute_numbering_for_show(indexerid, indexer),
title=showObj.name,
controller="home",
action="displayShow"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be changed as this isn't the "displayShow" page it's the "manualSearch" page, once that's done we can add the Javascript for it to a new section in core.js.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OmgImAlexis maybe an idea to start with AngularJs. We can do a local installation, but we can also just start with the Google CDN. I was thinking of switching to Rest for the manual search anyway, this way it's easier to update the page while performing a search.

Additional benefit is that we can get some experience using angular, and eventually it will be easier to port. We could just start with a basic app structure and put in some controllers, directives, services, etc. What do you think?

fernandog and others added 20 commits March 17, 2016 20:00
* Fixed bug where force search didn't work anymore
Note! Refreshing depends on the timestamps (time field) in cache table for results. These are updated now for every search.
As you've already been redirected when this message is shown.
…ved.

* Also fixed endless refresh when no providers enabled.
…the user can't start a second before it's redirected.
@fernandog fernandog changed the title [WIP] Adds "Manual Snatch" feature Adds "Manual Snatch" feature Mar 18, 2016
fernandog added a commit that referenced this pull request Mar 18, 2016
Adds "Manual Snatch" feature
@fernandog fernandog merged commit 5614381 into develop Mar 18, 2016
@fernandog fernandog deleted the manual-search branch March 18, 2016 10:05
@fernandog
Copy link
Contributor Author

@adaur

@adaur
Copy link
Contributor

adaur commented Mar 18, 2016

Good job! Do you want me to test it?

@fernandog
Copy link
Contributor Author

@adaur feel free! thank for your initiative on this!!

@adaur
Copy link
Contributor

adaur commented Mar 18, 2016

I'd be glad to. You're welcome, you guys did much more on this than I was able to :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants