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

Updates to core.py for newer python versions #3358

Open
wants to merge 9 commits 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
67 changes: 67 additions & 0 deletions README-ORG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## ![Headphones Logo](https://github.com/rembo10/headphones/raw/master/data/images/headphoneslogo.png) Headphones

[![Build Status](https://travis-ci.org/rembo10/headphones.svg?branch=master)](https://travis-ci.org/rembo10/headphones)
[![Build Status](https://img.shields.io/travis/rembo10/headphones/develop.svg?label=develop%20branch%20build)](https://travis-ci.org/rembo10/headphones)

Headphones is an automated music downloader for NZB and Torrent, written in Python. It supports SABnzbd, NZBget, Transmission, µTorrent, Deluge and Blackhole.

## Support & Discuss
You are free to join the Headphones support community on IRC where you can ask questions, hang around and discuss anything related to HP.

1. Use any IRC client and connect to the Freenode server, `irc.freenode.net`.
2. Join the `#headphones` channel.

## Installation and Notes

* [Installation page](../../wiki/Installation) shows you how to install Headphones.
* [Usage guide](../../wiki/Usage-guide) introduces you to Headphones.
* [Troubleshooting page](../../wiki/TroubleShooting) in the wiki can help you with common problems.

**Issues** can be reported on the GitHub issue tracker considering these rules:

1. Analyze your log, you just might find the solution yourself!
2. You read the wiki and searched existing issues, but this is not solving your problem.
3. Post the issue with a clear title, description and the HP log and use [proper markdown syntax](https://help.github.com/articles/github-flavored-markdown) to structure your text (code/log in code blocks).
4. Close your issue when it's solved! If you found the solution yourself, please comment so that others benefit from it.

**Feature requests** can be reported on the GitHub issue tracker too:

1. Search for similar existing 'issues', feature requests can be recognized by the label 'Request'.
2. If a similar Request exists, post a comment (+1, or add a new idea to the existing request), otherwise you can create a new one.

If you **comply with these rules** you can [post your request/issue](http://github.com/rembo10/headphones/issues).

**Support** the project by implementing new features, solving support tickets and provide bug fixes.

## Screenshots

Homepage (Artist Overview):

![preview thumb](http://i.imgur.com/LZO9a.png)

One of the many settings pages:

![preview thumb](http://i.imgur.com/xcWNy.png)

It might even know you better than you know yourself:

![preview thumb](http://i.imgur.com/R7J0f.png)

Import Your Favorite Artists:

![preview thumb](http://i.imgur.com/6tZoC.png)

Search Results:

![preview thumb](http://i.imgur.com/rIV0P.png)

Artist Page with Bio & Album Overview:

![preview thumb](http://i.imgur.com/SSil1.png)

Album Page with track overview:

![preview thumb](http://i.imgur.com/kcjES.png)

## License
This is free software under the GPL v3 open source license. Feel free to do with it what you wish, but any modification must be open sourced. A copy of the license is included.
68 changes: 3 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,5 @@
## ![Headphones Logo](https://github.com/rembo10/headphones/raw/master/data/images/headphoneslogo.png) Headphones
Anyway, for those seeing this I'm just doing this as I regularly use this product and I find it useful and wanted the latest version of the Headphones application avaialble in a docker image again so I can deploy it to my TrueNAS server.

[![Build Status](https://travis-ci.org/rembo10/headphones.svg?branch=master)](https://travis-ci.org/rembo10/headphones)
[![Build Status](https://img.shields.io/travis/rembo10/headphones/develop.svg?label=develop%20branch%20build)](https://travis-ci.org/rembo10/headphones)
I simply renamed the original README.md as README-ORG.md so please DON'T believe anything contained in it reflects to this project!

Headphones is an automated music downloader for NZB and Torrent, written in Python. It supports SABnzbd, NZBget, Transmission, µTorrent, Deluge and Blackhole.

## Support & Discuss
You are free to join the Headphones support community on IRC where you can ask questions, hang around and discuss anything related to HP.

1. Use any IRC client and connect to the Freenode server, `irc.freenode.net`.
2. Join the `#headphones` channel.

## Installation and Notes

* [Installation page](../../wiki/Installation) shows you how to install Headphones.
* [Usage guide](../../wiki/Usage-guide) introduces you to Headphones.
* [Troubleshooting page](../../wiki/TroubleShooting) in the wiki can help you with common problems.

**Issues** can be reported on the GitHub issue tracker considering these rules:

1. Analyze your log, you just might find the solution yourself!
2. You read the wiki and searched existing issues, but this is not solving your problem.
3. Post the issue with a clear title, description and the HP log and use [proper markdown syntax](https://help.github.com/articles/github-flavored-markdown) to structure your text (code/log in code blocks).
4. Close your issue when it's solved! If you found the solution yourself, please comment so that others benefit from it.

**Feature requests** can be reported on the GitHub issue tracker too:

1. Search for similar existing 'issues', feature requests can be recognized by the label 'Request'.
2. If a similar Request exists, post a comment (+1, or add a new idea to the existing request), otherwise you can create a new one.

If you **comply with these rules** you can [post your request/issue](http://github.com/rembo10/headphones/issues).

**Support** the project by implementing new features, solving support tickets and provide bug fixes.

## Screenshots

Homepage (Artist Overview):

![preview thumb](http://i.imgur.com/LZO9a.png)

One of the many settings pages:

![preview thumb](http://i.imgur.com/xcWNy.png)

It might even know you better than you know yourself:

![preview thumb](http://i.imgur.com/R7J0f.png)

Import Your Favorite Artists:

![preview thumb](http://i.imgur.com/6tZoC.png)

Search Results:

![preview thumb](http://i.imgur.com/rIV0P.png)

Artist Page with Bio & Album Overview:

![preview thumb](http://i.imgur.com/SSil1.png)

Album Page with track overview:

![preview thumb](http://i.imgur.com/kcjES.png)

## License
This is free software under the GPL v3 open source license. Feel free to do with it what you wish, but any modification must be open sourced. A copy of the license is included.
For now the only way to get the updated version is to clone this repository, do a docker build on the code and then create a custom yaml file to reference the new image. I'm currently testing this on my TrueNAS system and have it working well with a few minor issues that need sorting out.
6 changes: 3 additions & 3 deletions lib/gntp/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@

#GNTP/<version> <messagetype> <encryptionAlgorithmID>[:<ivValue>][ <keyHashAlgorithmID>:<keyHash>.<salt>]
GNTP_INFO_LINE = re.compile(
'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)' +
'GNTP/(?P<version>\\d+\\.\\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\\-OK|\\-ERROR)' +
' (?P<encryptionAlgorithmID>[A-Z0-9]+(:(?P<ivValue>[A-F0-9]+))?) ?' +
'((?P<keyHashAlgorithmID>[A-Z0-9]+):(?P<keyHash>[A-F0-9]+).(?P<salt>[A-F0-9]+))?\r\n',
re.IGNORECASE
)

GNTP_INFO_LINE_SHORT = re.compile(
'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)',
'GNTP/(?P<version>\\d+\\.\\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\\-OK|\\-ERROR)',
re.IGNORECASE
)

GNTP_HEADER = re.compile('([\w-]+):(.+)')
GNTP_HEADER = re.compile('([\\w-]+):(.+)')

GNTP_EOL = gntp.shim.b('\r\n')
GNTP_SEP = gntp.shim.b(': ')
Expand Down