Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiko2k committed Feb 5, 2018
1 parent 6488124 commit ac03a9c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ v2.6.4

- Added right click menu for canceling imports and transcodes
- Improved quick playing artist search function, moved shortcut to F4
- Improved error handling for folder mover function
- Added size limit for folder delete function
- Fixed not being able to step further back in random mode if previous track were missing
- Fixed stream recording incorrectly giving an error message
- Fixed folder mover not using album-artist as title
- Fixed crash when left clicking empty album art
Expand Down
28 changes: 24 additions & 4 deletions tauon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,7 @@ def test_progress(self):
self.playing_time = 0


def advance(self, rr=False, quiet=False, gapless=False):
def advance(self, rr=False, quiet=False, gapless=False, inplace=False):

# Temporary Workaround
quick_d_timer.set()
Expand All @@ -2283,6 +2283,9 @@ def advance(self, rr=False, quiet=False, gapless=False):

gui.update_spec = 0

old = self.queue_step

# Force queue (middle click on track)
if len(self.force_queue) > 0:

target_index = self.force_queue[0][0]
Expand Down Expand Up @@ -2316,6 +2319,11 @@ def advance(self, rr=False, quiet=False, gapless=False):
# if album_mode:
# goto_album(self.playlist_playing)

if inplace and self.queue_step > 1:
del self.track_queue[old]
self.queue_step -= 1


# If not random mode, Step down 1 on the playlist
elif self.random_mode is False and len(self.playing_playlist()) > 0:

Expand Down Expand Up @@ -2384,6 +2392,8 @@ def advance(self, rr=False, quiet=False, gapless=False):
# if album_mode:
# goto_album(self.playlist_playing)



self.render_playlist()

self.notify_update()
Expand Down Expand Up @@ -3944,12 +3954,13 @@ def replay_gain(stream):
pctl.master_library[pctl.track_queue[pctl.queue_step]].found = True
else:
pctl.master_library[pctl.track_queue[pctl.queue_step]].found = False
old_index = pctl.master_library[pctl.track_queue[pctl.queue_step]].index
gui.pl_update = 1
gui.update += 1
print("Missing File: " + pctl.master_library[pctl.track_queue[pctl.queue_step]].fullpath)
pctl.playerCommandReady = False
pctl.playing_state = 0
pctl.advance()
pctl.advance(inplace=True)
continue

if pctl.join_broadcast and pctl.broadcast_active:
Expand Down Expand Up @@ -9520,6 +9531,7 @@ def lightning_paste():


move_jobs.append((move_path, os.path.join(artist_folder, move_track.parent_folder_name), move, move_track.parent_folder_name, load_order))

break
else:
show_message("Could not find a folder with the artist's name to match level at.")
Expand All @@ -9534,7 +9546,11 @@ def lightning_paste():
def paste(playlist=None, position=None):

if gui.lightning_copy:
lightning_paste()
try:
lightning_paste()
except OSError as e:
show_message("An error was encountered", 'warning', str(e))

return
# items = None
# if system == 'windows':
Expand Down Expand Up @@ -9749,6 +9765,10 @@ def delete_folder(index):
show_message("Woah, careful there!", 'warning', "I don't think we should delete that folder.")
return

if directory_size(old) > 1500000000:
show_message("Folder size safety limit reached! (1.5GB)", 'warning', old)
return

try:


Expand Down Expand Up @@ -14862,7 +14882,7 @@ def render(self):

if input.mouse_click and coll_point(mouse_position, (
self.volume_bar_position[0] - right_offset, self.volume_bar_position[1], self.volume_bar_size[0],
self.volume_bar_size[1])) or \
self.volume_bar_size[1] + 4)) or \
self.volume_bar_being_dragged is True:
clicked = True

Expand Down

0 comments on commit ac03a9c

Please sign in to comment.