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

addition of two Bulgarian trackers: zamunda and zelka and correction of custom filter keywords code to allow use of cyrillic #54

Merged
merged 8 commits into from
Jul 12, 2018

Conversation

dbarev
Copy link
Contributor

@dbarev dbarev commented Jun 25, 2018

Updates to settings.xml and providers.json for the new trackers
Addition of icons for the new trackers
import unquote function in burst.py to enable conversion of torrent filename to torrent name as in those trackers the release keywords are only contained in the file name
adding unicode parameter to custom filter keywords import to enable cyrillic support

dbarev added 8 commits June 19, 2018 12:21
 Correcting filter_ts to filter_telesync
add settings for two newly added parsers: zamunda.net and zelka.org
Add definitions for Bulgarian trackers zamunda.net and zelka.org
Importing urllib.unquote for use in the zelka and zamunda parsers to unquote torrent names parsed from .torrent file names.
urllib.unquote is used in the parser.name definition.
Add unicode parameter to get_setting function to ensure additional filter keywords are unicode. Otherwise adding cyrillic or other keywords crashes burst.
@elgatito
Copy link
Owner

import unquote function in burst.py to enable conversion of torrent filename to torrent name as in those trackers the release keywords are only contained in the file name

I don't see any usage of unquote and how it should work?

@dbarev
Copy link
Contributor Author

dbarev commented Jun 25, 2018

It is used in the name parser definitions e.g.:

"name": "item(tag='a', order=2) + ' | ' + unquote(re.sub('/download\.php/\d+/','',item.take_with_root(('class', 'fa fa-download'))[0].attr['href'].replace('.torrent', '')))",

The reason is in both trackers the torrent name listed in the html table does not contain any release keywords, it's just the name of the film/series often in Bulgarian etc. The release keywords are only contained in the torrent filename itself which I add to the name definition as can be seen. As this often contains spaces and other symbols that are escaped I could not find an easier way to normalize the name and make it user-friendly for display. I know this can be done with regular expressions and lambdas but this seems too complicated, making code much unreadable. Please have in mind I am not a professional developer and I have only basic understanding of Python, maybe there is a better way I am not aware about.

@elgatito
Copy link
Owner

I will will review and merge this PR in few weeks, will not have access in the near days.

@dbarev
Copy link
Contributor Author

dbarev commented Jun 29, 2018

Cool, thanks!

@elgatito elgatito merged commit 9205de7 into elgatito:master Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants