Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiko2k committed Apr 13, 2019
1 parent 08d5f9a commit b963ac0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 97 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changelog-------------------------------------

v4.1.1

- Added progress bar for transcoding
- Fixed transcode stalling when duplicate tracks present
- Fixed transcode not producing thumbnail
- Fixed being able to enter mini-mode in full-screen
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Designed to be simple and streamlined while putting the user in control of their
#### File type compatibility :milky_way:

- [x] FLAC, APE, TTA, WV, MP3, M4A(aac, alac), OGG, OPUS
- [x] XSPF, CUE (automatic detection)
- [x] XSPF, CUE (automatic detection), LRC


### Dark theme:
Expand Down
3 changes: 3 additions & 0 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ plex-servname=
### Use logarithmic volume instead of linear. (Provides wider range of control for lower volumes) (Bass Only)
#log-volume-scale

### Don't buffer large chuncks of the audio file (so source does not sleep and uses slightly less RAM)
#short-buffering

### --- Media Keys --------------------------------------------------------------------------------------

#disable-mediakey (gnome media keys)
Expand Down
1 change: 1 addition & 0 deletions extra/com.github.taiko2k.tauonmb.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
</categories>

<releases>
<release version="4.1.1" date="2019-04-13"/>
<release version="4.1.0" date="2019-04-10"/>
<release version="4.0.0" date="2019-03-23"/>
<release version="3.9.1" date="2019-03-17"/>
Expand Down
121 changes: 25 additions & 96 deletions tauon.py
Original file line number Diff line number Diff line change
Expand Up @@ -14563,7 +14563,6 @@ def cache_paths():
loaderThread = threading.Thread(target=transcode_single, args=agg)
loaderThread.daemon = True
loaderThread.start()
# transcode_single([folder_items[q], folder_name])
q += 1
gui.update += 1
time.sleep(0.05)
Expand All @@ -14575,96 +14574,8 @@ def cache_paths():
gui.update += 1
break

# else:
# # this code section is no longer used
#
# for item in folder_items:
#
# if os.path.isfile(full_wav_out_p):
# os.remove(full_wav_out_p)
# if os.path.isfile(full_target_out_p):
# os.remove(full_target_out_p)
#
# command = user_directory + "/encoder/ffmpeg "
#
# if system != 'windows':
# command = "ffmpeg "
#
# if not pctl.master_library[item].is_cue:
# command += '-i "'
# command += pctl.master_library[item].fullpath
# command += '" '
# command += full_wav_out
# # command += ' -'
# else:
# command += '-ss ' + str(pctl.master_library[item].start_time)
# command += ' -t ' + str(pctl.master_library[item].length)
#
# command += ' -i "'
# command += pctl.master_library[item].fullpath
# command += '" '
# command += full_wav_out
#
# # command += " -"
#
# transcode_state = "(Decoding)"
# gui.update += 1
#
# # print(shlex.split(command))
# startupinfo = None
# if system == 'windows':
# startupinfo = subprocess.STARTUPINFO()
# startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
# subprocess.call(shlex.split(command), stdout=subprocess.PIPE, shell=False,
# startupinfo=startupinfo)
#
# transcode_state = "(Encoding)"
# gui.update += 1
#
# if prefs.transcode_codec == 'mp3':
#
# command = user_directory + '/encoder/lame --silent --abr ' + str(
# prefs.transcode_bitrate) + ' '
#
# if system != 'windows':
# command = 'lame --silent --abr ' + str(prefs.transcode_bitrate) + ' '
#
# if pctl.master_library[item].title != "":
# command += '--tt "' + pctl.master_library[item].title.replace('"', "").replace("'",
#
# "") + '" '
# if len(str(pctl.master_library[item].track_number)) < 4 and str(
# pctl.master_library[item].track_number).isdigit():
# command += '--tn ' + str(pctl.master_library[item].track_number) + ' '
#
# if len(str(pctl.master_library[item].date)) == 4 and str(
# pctl.master_library[item].date).isdigit():
# command += '--ty ' + str(pctl.master_library[item].date) + ' '
#
# if pctl.master_library[item].artist != "":
# command += '--ta "' + pctl.master_library[item].artist.replace('"', "").replace("'",
# "") + '" '
#
# if pctl.master_library[item].album != "":
# command += '--tl "' + pctl.master_library[item].album.replace('"', "").replace("'",
# "") + '" '
# command += full_wav_out + ' ' + full_target_out
#
# print(shlex.split(command))
# subprocess.call(shlex.split(command), stdout=subprocess.PIPE, startupinfo=startupinfo)
# print('done')
#
# os.remove(full_wav_out_p)
# output_dir = prefs.encoder_output + folder_name + "/"
#
# out_line = os.path.splitext(pctl.master_library[item].filename)[0]
# if pctl.master_library[item].is_cue:
# out_line = str(pctl.master_library[item].track_number) + ". "
# out_line += pctl.master_library[item].artist + " - " + pctl.master_library[item].title
#
# print(output_dir)
# shutil.move(full_target_out_p, output_dir + out_line + "." + prefs.transcode_codec)

else:
print("Codec error")

output_dir = prefs.encoder_output + folder_name + "/"
album_art_gen.save_thumb(folder_items[0], (1080, 1080), output_dir + "cover")
Expand Down Expand Up @@ -17137,7 +17048,7 @@ def render(self):
# if key_ctrl_down and key_c_press:
# del transcode_list[1:]
# gui.tc_cancel = True
if right_click and coll([x, y, 180 * gui.scale, 18 * gui.scale]):
if right_click and coll([x, y, 280 * gui.scale, 18 * gui.scale]):
cancel_menu.activate(position=(x + 20 * gui.scale, y + 23 * gui.scale))


Expand All @@ -17147,17 +17058,35 @@ def render(self):

if gui.transcoding_batch_total:

# c1 = [40, 40, 40, 255]
# c2 = [60, 60, 60, 255]
# c3 = [130, 130, 130, 255]
#
# if colours.lm:
# c1 = [100, 100, 100, 255]
# c2 = [130, 130, 130, 255]
# c3 = [180, 180, 180, 255]

c1 = [40, 40, 40, 255]
c2 = [100, 59, 200, 200]
c3 = [150, 70, 200, 255]

if colours.lm:
c1 = [100, 100, 100, 255]
c2 = [170, 140, 255, 255]
c3 = [230, 170, 255, 255]

yy = y + 4 * gui.scale
h = 9 * gui.scale
box = [x, yy, w, h]
ddt.rect_r(box, [100, 100, 100, 255])
#ddt.rect_r(box, [100, 100, 100, 255])
ddt.rect_r(box, c1, True)

done = round(gui.transcoding_bach_done / gui.transcoding_batch_total * 100)
doing = round(core_use / gui.transcoding_batch_total * 100)

ddt.rect_r([x, yy, done, h], [80, 80, 80, 255], True)

ddt.rect_r([x + done, yy, doing, h], [69, 69, 69, 100], True)
ddt.rect_r([x, yy, done, h], c3, True)
ddt.rect_r([x + done, yy, doing, h], c2, True)

x += w + 8 * gui.scale

Expand Down

0 comments on commit b963ac0

Please sign in to comment.