Skip to content

Commit

Permalink
Merge branch 'main' into rtl-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
guyhoffman committed Apr 25, 2022
2 parents b3108ee + aaa7cf8 commit e85c438
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools twine pep517
pip install setuptools twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PODPULLER_TOKEN }}
run: |
python -m pep517.build .
python -m build .
twine upload dist/*
15 changes: 8 additions & 7 deletions podpuller/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def tag_mp3file(filepath, episode):
if t.version != eyed3.id3.ID3_V2_4:
t.version = eyed3.id3.ID3_V2_4

# Sanitize title
encoded_title = episode.title.encode(encoding="ascii", errors="ignore")

t.title = encoded_title.decode()
t.artist = episode.publisher
t.album = episode.podcast
if not t.title:
t.title = episode.title
if not t.artist:
t.artist = episode.publisher
if not t.album:
t.album = episode.podcast

# Add album art
type = eyed3.id3.frames.ImageFrame.FRONT_COVER
Expand All @@ -117,7 +117,8 @@ def tag_mp3file(filepath, episode):
try:
t.save()
except Exception as e:
logging.warn(f"Couldn't save ID3 Tag: {e.message}")
msg = ': ' + e.message if hasattr(e, 'message') else ''
logging.warn(f"Couldn't save ID3 Tag {msg}")


def download_enclosure(episode):
Expand Down

0 comments on commit e85c438

Please sign in to comment.