[GH-ISSUE #43] Use Embedded ISRC Tags #587

Closed
opened 2026-02-28 12:13:21 +03:00 by kerem · 2 comments
Owner

Originally created by @sakgoyal on GitHub (Aug 12, 2025).
Original GitHub issue: https://github.com/afkarxyz/SpotiFLAC/issues/43

Can you use the embedded ISRC tags to scan the output directory for existing files with their tags?
that way you can automatically skip those in the background and only attempt to download the missing ones.

A few songs are failing to download, so automatically skipping those would be nice

Originally created by @sakgoyal on GitHub (Aug 12, 2025). Original GitHub issue: https://github.com/afkarxyz/SpotiFLAC/issues/43 Can you use the embedded ISRC tags to scan the output directory for existing files with their tags? that way you can automatically skip those in the background and only attempt to download the missing ones. A few songs are failing to download, so automatically skipping those would be nice
kerem closed this issue 2026-02-28 12:13:21 +03:00
Author
Owner

@sakgoyal commented on GitHub (Aug 12, 2025):

from pathlib import Path
from mutagen.flac import FLAC

flac_dir = Path(".")
isrc_map = {}

for flac_file in flac_dir.rglob("*.flac"):
    audio = FLAC(flac_file)
    isrc = audio.tags.get("ISRC", [None])[0]
    isrc_map[isrc] = flac_file.name

You can get all the codes here and check if the code already exists. avoids issues with file naming differences and different path locations

<!-- gh-comment-id:3181122345 --> @sakgoyal commented on GitHub (Aug 12, 2025): ```py from pathlib import Path from mutagen.flac import FLAC flac_dir = Path(".") isrc_map = {} for flac_file in flac_dir.rglob("*.flac"): audio = FLAC(flac_file) isrc = audio.tags.get("ISRC", [None])[0] isrc_map[isrc] = flac_file.name ``` You can get all the codes here and check if the code already exists. avoids issues with file naming differences and different path locations
Author
Owner

@sakgoyal commented on GitHub (Oct 12, 2025):

https://github.com/afkarxyz/SpotiFLAC/pull/65#discussion_r2425009638

<!-- gh-comment-id:3395478766 --> @sakgoyal commented on GitHub (Oct 12, 2025): https://github.com/afkarxyz/SpotiFLAC/pull/65#discussion_r2425009638
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SpotiFLAC#587
No description provided.