Skip to content

Commit

Permalink
Merge pull request #78 from MADindustries/transcode-descriptor-fix
Browse files Browse the repository at this point in the history
Fixes the release description on transcoded torrents
  • Loading branch information
karamanolev authored Apr 15, 2017
2 parents 5a0fc5a + cc75632 commit f8abb1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions what_transcode/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def run(self):
self.report_progress('{0} - creating torrent'.format(self.bitrate.upper()))
self.create_torrent()

self.report_progress('{0} - uploading to what.cd'.format(self.bitrate.upper()))
self.report_progress('{0} - uploading to Redacted'.format(self.bitrate.upper()))
self.upload_torrent()

self.report_progress('{0} - moving to destination'.format(self.bitrate.upper()))
Expand Down Expand Up @@ -172,7 +172,7 @@ def directory_name(self):

def upload_torrent(self):
torrent = self.what_torrent
print 'Sending request for upload to what.cd'
print 'Sending request for upload to Redacted'

payload_files = dict()
payload_files['file_input'] = ('torrent.torrent', open(self.torrent_file_path, 'rb'))
Expand All @@ -191,7 +191,7 @@ def upload_torrent(self):
payload['media'] = torrent['torrent']['media']
payload[
'release_desc'] = 'Made with LAME 3.99.3 with -h using karamanolev\'s auto transcoder' \
' from What.CD Torrent ID {0}.'.format(
' from RED Torrent ID {0}.'.format(
torrent['torrent']['id']) + ' Resampling or bit depth change (if needed) ' \
'was done using SoX.'

Expand All @@ -213,7 +213,7 @@ def upload_torrent(self):
except Exception:
errors = ''
exception = Exception(
'Error uploading data to what.cd. Errors: {0}'.format('; '.join(errors)))
'Error uploading data to Redacted. Errors: {0}'.format('; '.join(errors)))
exception.response_text = response.text
with open(TRANSCODER_ERROR_OUTPUT, 'w') as error_file:
error_file.write(response.text.encode('utf-8'))
Expand Down Expand Up @@ -287,10 +287,10 @@ def transcode_torrent(self):
(self.what_torrent['group']['releaseType'] != 13): # 9 is Single, # 13 is Remix
if self.force_warnings:
print 'Warning: This is a single audio file torrent that is not a single or a ' \
'remix in What.cd. Will not transcode.'
'remix in Redacted. Will not transcode.'
else:
raise Exception('This is a single audio file torrent that is not a single or a '
'remix in What.cd. Will not transcode.')
'remix in Redacted. Will not transcode.')

files_created = 0
self.report_progress(
Expand Down

0 comments on commit f8abb1f

Please sign in to comment.