Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MalloyDelacroix committed Aug 25, 2023
2 parents d8c80e2 + e2ebd0b commit a0af0ab
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
11 changes: 10 additions & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
FROM gitpod/workspace-mysql
FROM gitpod/workspace-full-vnc

# Install custom tools, runtimes, etc.
# For example "bastet", a command-line tetris clone:
# RUN brew install bastet
#
# More information: https://www.gitpod.io/docs/config-docker/

RUN sudo apt update -y
RUN sudo apt upgrade -y
RUN sudo apt install qtcreator ffmpeg -y
RUN pyenv install 3.8.16 -v
RUN pyenv global 3.8.16
RUN pip install --upgrade pip
COPY . .
RUN pip install -r requirements.txt
8 changes: 5 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
image:
file: .gitpod.Dockerfile

tasks:
- init: pip install -r ./requirements.txt
ports:
- port: 5900
onOpen: ignore
- port: 6080
onOpen: open-browser
21 changes: 19 additions & 2 deletions DownloaderForReddit/gui/database_views/database_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,14 +1249,31 @@ def get_reddit_object_data(self):
query = query.filter(RedditObject.id.in_(self.current_post_attr('significant_reddit_object_id')))
elif self.content_focus:
query = query.filter(RedditObject.id.in_(
[x.post.significant_reddit_object_id for x in self.current_content]))
self.get_significant_reddit_object_ids_from_post_in_list(self.current_content)
))
elif self.comment_focus:
query = query.filter(RedditObject.id.in_(
[x.post.significant_reddit_object_id for x in self.current_comment]))
self.get_significant_reddit_object_ids_from_post_in_list(self.current_comment)
))
final_query = f.filter(self.session, *filter_tups, query=query, order_by=self.reddit_object_order,
desc=self.reddit_object_desc)
return final_query

def get_significant_reddit_object_ids_from_post_in_list(self, item_list):
"""
Helper method to return a list of significant reddit object ids associated with the posts of a list of items.
:param item_list: A list of items from which significant reddit object ids are to be taken. A list of content
or comments.
:return: A list of significant reddit object ids from posts associated with each item in the supplied item list.
"""
id_list = []
for item in item_list:
try:
id_list.append(item.post.significant_reddit_object_id)
except AttributeError:
pass
return id_list

@check_hold
def set_reddit_object_data(self, extend=False):
"""See set download session data."""
Expand Down

0 comments on commit a0af0ab

Please sign in to comment.