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

Added date field support to Jackett #289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion nova3/engines/jackett.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#VERSION: 4.0
#VERSION: 4.1
# AUTHORS: Diego de las Heras ([email protected])
# CONTRIBUTORS: ukharley
# hannsen (github.com/hannsen)
Expand All @@ -12,6 +12,7 @@
from http.cookiejar import CookieJar
from multiprocessing.dummy import Pool
from threading import Lock
from datetime import datetime

from novaprinter import prettyPrinter
from helpers import download_file
Expand Down Expand Up @@ -197,6 +198,12 @@ def search_jackett_indexer(self, what, category, indexer_id):
# note: engine_url can't be changed, torrent download stops working
res['engine_url'] = self.url

try:
date = datetime.strptime(result.find('pubDate').text, '%a, %d %b %Y %H:%M:%S %z')
res['pub_date'] = int(date.timestamp())
except Exception:
res['pub_date'] = -1

self.pretty_printer_thread_safe(res)

def generate_xpath(self, tag):
Expand Down
2 changes: 1 addition & 1 deletion nova3/engines/versions.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
eztv: 1.14
jackett: 4.0
jackett: 4.1
limetorrents: 4.7
piratebay: 3.3
solidtorrents: 2.2
Expand Down