Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 404 Early Return and FLAC Metadata Bug Fix #51

Merged
merged 104 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
b044f4e
Change fLaC metadata tags from track_number to TRACKNUMBER
ebb-earl-co Dec 15, 2023
5af5a7a
Merge in trunk
ebb-earl-co Dec 15, 2023
2a75110
Merge branch 'trunk' into develop to incorporate hotfix
ebb-earl-co Dec 18, 2023
bd7b57c
Revamp media.py:
ebb-earl-co Dec 18, 2023
b279f50
Same change as the hotfix, just not as a merge commit
ebb-earl-co Dec 18, 2023
ab70166
Update with upstream change
ebb-earl-co Dec 18, 2023
00bbae7
Update pyproject.toml to 2023.12.4
ebb-earl-co Dec 18, 2023
9618454
Merge branch 'trunk' into develop
ebb-earl-co Dec 18, 2023
fb7180f
Add artist bio functionality:
ebb-earl-co Dec 18, 2023
7997193
Bump version to 2023.12.5
ebb-earl-co Dec 18, 2023
82c0b51
Merge branch 'trunk' into develop
ebb-earl-co Dec 19, 2023
e01bc9d
Replace tempfile.NamedTemporaryFile due to Windows permission error
ebb-earl-co Dec 19, 2023
eed76b8
Merge in Downloading of Videos Feature (#8)
ebb-earl-co Dec 19, 2023
70466a8
Update README.md and main.py to do with video downloading
ebb-earl-co Dec 19, 2023
b763ee5
Fix a bug in models.VideosContributorsResponseJSON that omitted contr…
ebb-earl-co Dec 19, 2023
de8f846
Merge branch 'trunk' into develop
ebb-earl-co Dec 19, 2023
15df282
Implement playlist feature completely: (#11)
ebb-earl-co Dec 20, 2023
32f08ee
Fix and enhance:
ebb-earl-co Dec 20, 2023
24a8441
Add supplemental file saving to cleanup process
ebb-earl-co Dec 20, 2023
117cec5
Fix merge conflicts from upstream
ebb-earl-co Dec 20, 2023
85a9988
Format with Black
ebb-earl-co Dec 20, 2023
ce8dfa6
Bring in hotfix from 'trunk'
ebb-earl-co Dec 22, 2023
ba3793c
Defensive programming:
ebb-earl-co Dec 22, 2023
504dac5
Format with Black
ebb-earl-co Dec 22, 2023
024b8c0
Merge branch 'trunk' into develop
ebb-earl-co Dec 22, 2023
82f7c92
Code structure (#16)
ebb-earl-co Dec 25, 2023
4f1f0ca
Add Docker support in the form of a Dockerfile!
ebb-earl-co Dec 27, 2023
18be902
Merge branch 'trunk' into develop
ebb-earl-co Dec 27, 2023
5a831b0
Change session.send() to session.get() in track.py
ebb-earl-co Dec 30, 2023
a70eb55
Remove unnecessary dependencies from Dockerfile
ebb-earl-co Dec 30, 2023
0d75aef
Remove 'git-core' dependence in Dockerfile
ebb-earl-co Dec 30, 2023
e99f5f9
Add examples to README.md and bump version
ebb-earl-co Dec 30, 2023
7db5d27
Add support for TIDAL mixes! (#19)
ebb-earl-co Jan 1, 2024
ebae9df
Fix merge conflict in README.md
ebb-earl-co Jan 1, 2024
e0bae61
Format with Black
ebb-earl-co Jan 1, 2024
0b94760
Add logic for songs to always have audio as first track
ebb-earl-co Jan 1, 2024
43a3f64
Format with Black
ebb-earl-co Jan 1, 2024
35cca50
Add artist URLs as top-level program option (#21)
ebb-earl-co Jan 2, 2024
02350d6
Merge in trunk before PR merge
ebb-earl-co Jan 2, 2024
671e149
Fix merge conflict from upstream
ebb-earl-co Jan 3, 2024
a148dcb
Fix multiple:
ebb-earl-co Jan 3, 2024
cde6e92
Remove '..' in Playlist and Mix names as well as Album and Artist names
ebb-earl-co Jan 3, 2024
067c091
Fix name <-> self.name error
ebb-earl-co Jan 3, 2024
1ac6b9a
Format track.py with Black
ebb-earl-co Jan 3, 2024
dd596f2
Merge upstream into this branch
ebb-earl-co Jan 3, 2024
edc44cd
Remove sleep_to_mimic_human_activity in favor of exp. backoff
ebb-earl-co Jan 3, 2024
b08ca53
Remove utils.sleep_to_mimic_human_activity()
ebb-earl-co Jan 4, 2024
8aaab6c
Remove sleep_to_mimic_human_activity() from artist.py
ebb-earl-co Jan 4, 2024
eb3712a
Format with Black
ebb-earl-co Jan 4, 2024
a65663a
Add file with instructions for release artifacts
ebb-earl-co Jan 4, 2024
06684a3
Merge in upstream
ebb-earl-co Jan 4, 2024
198be7e
Update album URL matching to accept between 5, 9 digits
ebb-earl-co Jan 4, 2024
5c3121b
Update README.md with new help output
ebb-earl-co Jan 4, 2024
8fe7f05
Format with Black
ebb-earl-co Jan 4, 2024
f2bfd5f
Bump version to 2024.1.3
ebb-earl-co Jan 4, 2024
39b6d5f
Merge in upstream
ebb-earl-co Jan 4, 2024
a672101
First commit tinkering with Pyinstaller process
ebb-earl-co Jan 4, 2024
5506cfb
Fix errors arisen from 'flake8 . --count --select=E9,F63,F7,F82 --sho…
ebb-earl-co Jan 4, 2024
de4e497
Clean up based on flake8 suggestions
ebb-earl-co Jan 4, 2024
6bb6f41
Make some mypy-inspired changes
ebb-earl-co Jan 5, 2024
5980673
Merge in upstream
ebb-earl-co Jan 5, 2024
0ebac07
Merge branch 'develop' into mypy
ebb-earl-co Jan 5, 2024
f291ed9
Fix empty files with Sony 360 Reality Audio codec
ebb-earl-co Jan 6, 2024
54574cd
Update docker-image.yml to only build on releases
ebb-earl-co Jan 6, 2024
40fb872
Edit docker-image.yml, following https://docs.github.com/en/actions/
ebb-earl-co Jan 6, 2024
a86ebe3
Merge in upstream
ebb-earl-co Jan 6, 2024
1cbd200
New workflow YML files
ebb-earl-co Jan 6, 2024
b9f1502
Fix indent errors in workflow YAMLs
ebb-earl-co Jan 6, 2024
44d5d51
Add caching to docker-image.yml
ebb-earl-co Jan 6, 2024
031e391
Add cache to Python YAMLs
ebb-earl-co Jan 6, 2024
4589c24
Fix indentation in python-build.yaml
ebb-earl-co Jan 6, 2024
422a407
Remove on-pull-request in pyapp-linux.yml
ebb-earl-co Jan 6, 2024
f3c1bc2
Merge upstream branch 'trunk' into develop
ebb-earl-co Jan 7, 2024
da6ebcb
Changes to track downloading:
ebb-earl-co Jan 7, 2024
052fc72
Merge in upstream branch 'trunk' into develop
ebb-earl-co Jan 7, 2024
59a6028
Merge in upstream branch 'trunk' into develop
ebb-earl-co Jan 7, 2024
00f1bf2
Merge in upstream branch 'trunk' into develop
ebb-earl-co Jan 7, 2024
7fd0ebb
Add multiple org.opencontainers LABELs to Dockerfile
ebb-earl-co Jan 7, 2024
e9ddaa1
Format with Black
ebb-earl-co Jan 7, 2024
3f40785
Add creation of .m3u8 file for Playlists (#37)
ebb-earl-co Jan 7, 2024
a5497a9
In playlist.py, change Playlist.craft_m3u8_text() to per-codec
ebb-earl-co Jan 8, 2024
ef34634
Format with Black
ebb-earl-co Jan 8, 2024
10646f3
Merge in upstream branch 'trunk' into develop
ebb-earl-co Jan 8, 2024
a0df5b9
Merge in upstream branch 'trunk' into develop
ebb-earl-co Jan 8, 2024
439a3cd
Refactor to appease flake8:
ebb-earl-co Jan 9, 2024
111ed4a
Add docstrings to various methods
ebb-earl-co Jan 9, 2024
bfe051b
Merge in upstream branch 'trunk' into 'develop'
ebb-earl-co Jan 10, 2024
22765b1
Change Dockerfile and README.md:
ebb-earl-co Jan 10, 2024
9b97250
Remove duplicated section and fix typos in README.md
ebb-earl-co Jan 10, 2024
287dc69
Sharpen up README.md, including two typos
ebb-earl-co Jan 10, 2024
80a9485
Bump actions/checkout from 3 to 4 (#44)
dependabot[bot] Jan 10, 2024
8e4686d
Bump docker/metadata-action (#43)
dependabot[bot] Jan 10, 2024
49ba530
Bump docker/setup-buildx-action from 2 to 3 (#42)
dependabot[bot] Jan 10, 2024
edd8dfa
Bump docker/login-action (#40)
dependabot[bot] Jan 10, 2024
2460834
Bump actions/setup-python from 3 to 5 (#41)
dependabot[bot] Jan 10, 2024
8b99d35
Merge in upstream 'trunk' into 'develop'
ebb-earl-co Jan 11, 2024
5e0c18a
Update TIDAL track ID matching to b/w 5, 9 digits
ebb-earl-co Jan 11, 2024
1424fe8
Update .github/workflows:
ebb-earl-co Jan 11, 2024
c34f70f
Merge upstream branch 'trunk' into develop
ebb-earl-co Jan 11, 2024
b22672e
Merge upstream branch 'trunk' into develop
ebb-earl-co Jan 12, 2024
2916017
Add -j flag to 'make' command in Dockerfile
ebb-earl-co Jan 13, 2024
570a831
Handle album 404 (#50)
ebb-earl-co Jan 17, 2024
2bbf1f2
Fix .flac metadata bug:
ebb-earl-co Jan 17, 2024
936c3ce
Fix botched DISC, DISCTOTAL swap
ebb-earl-co Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -47,5 +50,6 @@ jobs:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64, linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN cd ~/ffmpeg_sources && \
--extra-libs="-lpthread -lm" \
--ld="g++" \
--bindir="$HOME/bin" && \
PATH="$HOME/bin:$PATH" make && \
PATH="$HOME/bin:$PATH" make -j$(nproc) && \
make install && \
hash -r

Expand All @@ -31,6 +31,7 @@ LABEL org.opencontainers.image.authors "colinho <github@colin.technology>"
LABEL org.opencontainers.image.description "Waving at the TIDAL music service with Python"
LABEL org.opencontainers.image.documentation "https://github.com/ebb-earl-co/tidal-wave/blob/trunk/README.md"
LABEL org.opencontainers.image.source "https://github.com/ebb-earl-co/tidal-wave"
LABEL org.opencontainers.image.licenses "LGPL-2.1-only AND Apache-2.0"

ENV PIP_DEFAULT_TIMEOUT=100 \
# Allow statements and log messages to immediately appear
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = ["setuptools", "wheel"]
universal = 0 # Make the generated wheels have "py3" tag
[project]
name = "tidal-wave"
version = "2024.1.9"
version = "2024.1.10"
description = "A tool to wave at the TIDAL music service."
authors = [
{name = "colinho", email = "pypi@colin.technology"}
Expand Down
4 changes: 4 additions & 0 deletions tidal_wave/album.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ def get(
self.get_metadata(session)
else:
self.metadata = metadata

if self.metadata is None:
self.track_files = {}
return

self.get_items(session)
self.save_cover_image(session, out_dir)
Expand Down
4 changes: 4 additions & 0 deletions tidal_wave/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def get(
5. get_albums
"""
self.set_metadata(session)

if self.metadata is None:
return

self.set_dir(out_dir)
self.save_artist_image(session)
self.get_videos(session, out_dir)
Expand Down
9 changes: 9 additions & 0 deletions tidal_wave/mix.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def get_metadata(self, session: Session):
self.metadata: Optional[PlaylistsEndpointResponseJSON] = request_mixes(
session=session, mix_id=self.mix_id
)

if self.metadata is None:
return

self.name = (
self.metadata.title.replace("/", "_")
.replace("|", "_")
Expand Down Expand Up @@ -233,6 +237,11 @@ def get(self, session: Session, audio_format: AudioFormat, out_dir: Path):
- self.flatten_playlist_dir()
"""
self.get_metadata(session)

if self.metadata is None:
self.files = {}
return

self.set_items(session)
self.set_dir(out_dir)
self.save_cover_image(session, out_dir)
Expand Down
9 changes: 9 additions & 0 deletions tidal_wave/playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def get_metadata(self, session: Session):
self.metadata: Optional[PlaylistsEndpointResponseJSON] = request_playlists(
session=session, identifier=self.playlist_id
)

if self.metadata is None:
return

self.name = (
self.metadata.title.replace("/", "_")
.replace("|", "_")
Expand Down Expand Up @@ -297,6 +301,11 @@ def get(self, session: Session, audio_format: AudioFormat, out_dir: Path):
- self.flatten_playlist_dir()
"""
self.get_metadata(session)

if self.metadata is None:
self.files = {}
return

self.set_items(session)
self.set_dir(out_dir)
self.save_cover_image(session, out_dir)
Expand Down
5 changes: 2 additions & 3 deletions tidal_wave/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ def craft_tags(self):

if self.codec == "flac":
# track and disk
tags["DISCTOTAL"] = f"{self.metadata.volume_number}"
tags["DISC"] = f"{self.album.number_of_volumes}"
tags["DISCTOTAL"] = f"{self.album.number_of_volumes}"
tags["DISC"] = f"{self.metadata.volume_number}"
tags["TRACKTOTAL"] = f"{self.album.number_of_tracks}"
tags["TRACKNUMBER"] = f"{self.metadata.track_number}"
# instrument-specific
Expand Down Expand Up @@ -463,7 +463,6 @@ def get(
self.metadata = metadata

if self.metadata is None:
# self.failed = True
self.outfile = None
return

Expand Down
1 change: 0 additions & 1 deletion tidal_wave/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def get(
else:
self.metadata = metadata

# check for 404 error with metadata
if self.metadata is None:
return None

Expand Down