Merge pull request #374 from aceinnolab/feature/#373

fix showing only single feed
This commit is contained in:
Ace
2024-08-27 15:11:29 +02:00
committed by GitHub
3 changed files with 4 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ jobs:
echo $HOME echo $HOME
whoami whoami
cd /home/inky cd /home/inky
sudo apt update
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install git zlib1g libjpeg-dev libatlas-base-dev rustc libopenjp2-7 python3-dev scons libssl-dev python3-venv python3-pip git libfreetype6-dev wkhtmltopdf libopenblas-dev -y sudo apt-get install git zlib1g libjpeg-dev libatlas-base-dev rustc libopenjp2-7 python3-dev scons libssl-dev python3-venv python3-pip git libfreetype6-dev wkhtmltopdf libopenblas-dev -y
echo $PWD && ls echo $PWD && ls

View File

@@ -37,6 +37,7 @@ jobs:
# get kernel info # get kernel info
uname -srm uname -srm
cd /home/inky cd /home/inky
sudo apt update
sudo apt-get update -y sudo apt-get update -y
# sudo apt-get dist-upgrade -y # sudo apt-get dist-upgrade -y

View File

@@ -114,7 +114,7 @@ class Feeds(inkycal_module):
# if "description" in posts: # if "description" in posts:
if parsed_feeds: if parsed_feeds:
parsed_feeds = [i.split("\n") for i in parsed_feeds][0] parsed_feeds = [i.split("\n") for i in parsed_feeds]
parsed_feeds = [i for i in parsed_feeds if i] parsed_feeds = [i for i in parsed_feeds if i]
# Shuffle the list to prevent showing the same content # Shuffle the list to prevent showing the same content
@@ -129,7 +129,7 @@ class Feeds(inkycal_module):
filtered_feeds, counter = [], 0 filtered_feeds, counter = [], 0
for posts in parsed_feeds: for posts in parsed_feeds:
wrapped = text_wrap(posts, font=self.font, max_width=line_width) wrapped = text_wrap(posts[0], font=self.font, max_width=line_width)
counter += len(wrapped) counter += len(wrapped)
if counter < max_lines: if counter < max_lines:
filtered_feeds.append(wrapped) filtered_feeds.append(wrapped)