Skip to content

Commit

Permalink
v1.17.0 make queue items editable
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilNarayana committed Nov 21, 2019
1 parent 772cd13 commit d729125
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ I am always open to help setup the program or fix any techincal issues you may h
## Current Feature Set:
* Upload videos
* Manual or automatic file selection
* Queue and dequeue Videos to upload
* Queue and dequeue Videos to upload (Queue items can be modified)
* Add many relevant YouTube tags
* Make playlists
* Add to a YouTube playlist
Expand Down Expand Up @@ -127,6 +127,8 @@ Queue was built so I could upload VODs after an event because the venue didn't h

Queue refers to the list of upcoming uploads in the status tab. By selecting `Toggle Uploads` you can toggle the uploading function, but continue to add entries to the queue. Once you have finished adding all the VODs you want to upload, selecting `Save Queue` will write the entire queue to your disk to be loaded later on. Finally, using `Load Queue` will load the entire queue file and start uploading immediately.

Items in the queue can also be modified by double clicking the queue item in the queue list and then changing one of the cells in the right column of the window that appears.

### Scoreboard Assistant Websocket - Never retype anything
SA Websocket was built so I could avoid retyping information that I put into Scoreboard Assistant.

Expand Down
8 changes: 6 additions & 2 deletions meleeuploader/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@ def __reset_cred(self):
shutil.copyfile(consts.youtube_file, os.path.join(consts.smash_folder, f"{title}.json"))
if consts.youtube:
os.remove(consts.youtube_file)
if consts.sheets:
os.remove(consts.spreadsheet_file)
sys.exit(0)

def __reset_match(self, menu=True, isadir=False):
Expand Down Expand Up @@ -513,6 +511,12 @@ def __add_to_qview(self, options):
self._qview += (options.p1, options.p2, " ".join((options.mprefix, options.mtype, options.msuffix)))
self._queue.put(options)
self._qview.resize_rows_contents()

def __update_qview(self, row, options):
self._qview.set_value(0, row, options.p1)
self._qview.set_value(1, row, options.p2)
self._qview.set_value(2, row, " ".join((options.mprefix, options.mtype, options.msuffix)))
self._qview.resize_rows_contents()

def __save_queue(self):
if os.path.exists(consts.queue_values):
Expand Down
10 changes: 9 additions & 1 deletion meleeuploader/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,24 @@
class OptionsViewer(BaseWidget):
def __init__(self, pos, options):
super(OptionsViewer, self).__init__(f"Options #{pos}")
self.pos = pos
self.options = options
self._oview = ControlList()
self._oview.readonly = True
self._oview.horizontal_headers = ["Key", "Value"]
self.formset = ["_oview"]
if pos or consts.stop_thread:
self._ignorebutton = ControlButton("Toggle Ignore")
self._ignorebutton.value = self.__ignore_job
self.formset = ["_oview", "=", "_ignorebutton"]
self.__update_o_view()
self._oview.data_changed_event = self.__update_data

def __update_data(self, row, col, item):
if col == 1:
var_name = self._oview.get_value(0, row)
self.options.__dict__[var_name] = item
self.parent._MeleeUploader__update_qview(self.pos, self.options)
print(f"{var_name} in queue item {self.pos} was updated to {item}")

def __ignore_job(self):
self.options.ignore = False if self.options.ignore else True
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from os import path

here = path.abspath(path.dirname(__file__))
version = '1.16.2'
version = '1.17.0'

long_des = ""
with open(path.join(here, 'README.md')) as f:
Expand Down

0 comments on commit d729125

Please sign in to comment.