update requested condition, add jetbrains editors to gitignore

This commit is contained in:
Simon Fischer 2023-06-28 14:27:52 +02:00
parent c436b5f549
commit 12d9d394b7
No known key found for this signature in database
GPG Key ID: DDD127D49F3F424A
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ __pycache__
# editor
.vscode
.idea

View File

@ -164,8 +164,8 @@ class Show:
def _get_ta_channel(self) -> TAChannel | None:
"""get ta channel metadata"""
episodes: list[JFEpisode] = self._get_all_episodes(limit=1)
if(len(episodes) == 0):
return None
if not episodes:
return
episode: JFEpisode = episodes[0]
youtube_id: str = os.path.split(episode["Path"])[-1][9:20]
path = f"/video/{youtube_id}"