@@ -911,13 +911,13 @@ def _render_bitrate(self):
911911 br_mode = tags ['bitrate_mode' ]
912912 enc_settings = tags ['encoder_settings' ]
913913 if ('-V 0' in enc_settings or
914- 'preset extereme' in enc_settings ):
914+ 'preset extereme' in enc_settings ):
915915 return 'V0 (VBR)'
916916 elif ('-V 2' in enc_settings or
917- 'preset standard' in enc_settings ):
917+ 'preset standard' in enc_settings ):
918918 return 'V2 (VBR)'
919919 elif br_mode in [mutagen .mp3 .BitrateMode .CBR ,
920- mutagen .mp3 .BitrateMode .UNKNOWN ]:
920+ mutagen .mp3 .BitrateMode .UNKNOWN ]:
921921 if abs (tags ['bitrate' ]- 192000 ) < 100 :
922922 return '192'
923923 elif abs (tags ['bitrate' ]- 256000 ) < 100 :
@@ -934,7 +934,7 @@ def _render_bitrate(self):
934934
935935 @form_field ('media' )
936936 def _render_media (self ):
937- choices = ['CD' , 'DVD' , 'Vinyl' , 'Soundboard' , 'DAT' , 'Web' ]
937+ # choices = ['CD', 'DVD', 'Vinyl', 'Soundboard', 'DAT', 'Web']
938938
939939 media = self ['summary' ]['media' ]
940940 if len (media ) > 1 :
@@ -957,7 +957,7 @@ def _render_mediainfo_path(self):
957957 for dp , dns , fns in os .walk (self ['path' ]):
958958 for fn in fns :
959959 if guess_type (fn )[0 ].startswith ('audio' ):
960- return os .path .join (dp , fn ) #return full path
960+ return os .path .join (dp , fn ) # return full path
961961 raise Exception ('No media file found' )
962962
963963 def _render_tracklist (self ):
@@ -970,13 +970,13 @@ def _render_tracklist(self):
970970 log .debug ('medium {}' , medium .keys ())
971971 title = medium .get ('format' , DEFAULT_FORMAT )
972972 if len (mediumlist ) > 1 :
973- title += " {}" .format (format , medium ['position' ])
973+ title += " {}" .format (medium ['position' ])
974974 if 'title' in medium :
975975 title += ": {}" .format (medium ['title' ])
976976
977977 tracklist = [
978978 (t ['number' ], t ['recording' ]['title' ],
979- timedelta (milliseconds = int (t ['recording' ]['length' ])))
979+ timedelta (milliseconds = int (t ['recording' ]['length' ])))
980980 for t in medium ['track-list' ]]
981981 full_tracklist .append ((title , tracklist ))
982982
@@ -1009,13 +1009,13 @@ def _render_tags(self):
10091009
10101010 def _render_release (self ):
10111011 tags = self ['tags' ]
1012- #print(tags)
1012+ # print(tags)
10131013 if tags ['rid' ]:
10141014 log .info ('Found MusicBrainz release in tags' )
10151015 release = mb .musicbrainzngs .get_release_by_id (
10161016 tags ['rid' ],
10171017 includes = ['release-groups' , 'media' , 'recordings' ,
1018- 'url-rels' , ])['release' ]
1018+ 'url-rels' ])['release' ]
10191019 rg = mb .musicbrainzngs .get_release_group_by_id (
10201020 release ['release-group' ]['id' ],
10211021 includes = ['tags' , 'artist-credits' ])['release-group' ]
@@ -1071,13 +1071,14 @@ def _render_year(self):
10711071
10721072 @form_field ('tags' )
10731073 def _render_form_tags (self ):
1074- _defaults = {'acoustic' , 'alternative' , 'ambient' , 'blues' ,
1075- 'classic.rock' , 'classical' , 'country' , 'dance' , 'dubstep' ,
1076- 'electronic' , 'experimental' , 'folk' , 'funk' , 'hardcore' ,
1077- 'heavy.metal' , 'hip.hop' , 'indie' , 'indie.pop' ,
1078- 'instrumental' , 'jazz' , 'metal' , 'pop' , 'post.hardcore' ,
1079- 'post.rock' , 'progressive.rock' , 'psychedelic' , 'punk' ,
1080- 'reggae' , 'rock' , 'soul' , 'trance' , 'trip.hop' }
1074+ _defaults = {
1075+ 'acoustic' , 'alternative' , 'ambient' , 'blues' , 'classic.rock' ,
1076+ 'classical' , 'country' , 'dance' , 'dubstep' , 'electronic' ,
1077+ 'experimental' , 'folk' , 'funk' , 'hardcore' , 'heavy.metal' ,
1078+ 'hip.hop' , 'indie' , 'indie.pop' , 'instrumental' , 'jazz' , 'metal' ,
1079+ 'pop' , 'post.hardcore' , 'post.rock' , 'progressive.rock' ,
1080+ 'psychedelic' , 'punk' , 'reggae' , 'rock' , 'soul' , 'trance' ,
1081+ 'trip.hop' }
10811082 tags = self ['summary' ]['tags' ]
10821083 if not tags :
10831084 tags = input ('No tags found. Please enter tags:' ).split (',' )
@@ -1115,7 +1116,7 @@ def _render_section_tracklist(self):
11151116
11161117 @form_field ('album_desc' )
11171118 def _render_description (self ):
1118- sections = [("Information" , self ['section_information' ]), ]
1119+ sections = [("Information" , self ['section_information' ])]
11191120
11201121 description = "\n " .join (bb .section (* s ) for s in sections )
11211122 description += bb .release
@@ -1139,11 +1140,9 @@ def _render_release_desc(self):
11391140 if tags ['encoder_settings' ]:
11401141 s += "\n [b]Encoder settings[/b]: " + tags ['encoder_settings' ]
11411142
1142-
11431143 sections = [("Release Information" , s ),
11441144 ("Track list" , self ['section_tracklist' ])]
11451145
1146-
11471146 description = "\n " .join (bb .section (* s ) for s in sections )
11481147 description += bb .release
11491148
0 commit comments