[PR #25] [CLOSED] Metadata-based Duplication Checking #160

Closed
opened 2026-02-27 04:57:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Googolplexed0/zotify/pull/25
Author: @MihaiStreames
Created: 6/16/2025
Status: Closed

Base: mainHead: main


📝 Commits (3)

  • 901173e proper duplicate checks + pycharm linting
  • b9513c4 Revert "proper duplicate checks + pycharm linting"
  • 48f8eb9 duplicate check

📊 Changes

1 file changed (+117 additions, -107 deletions)

View changed files

📝 zotify/track.py (+117 -107)

📄 Description

I noticed, while downloading playlists where I would update the order of songs (by adding or removing songs), that despite songs being the same, if their filenames weren't identical, the songs would be re-downloaded.

  • It would verify if a file with the exact same filename already exists and is not empty (i.e., its size is greater than zero), even though the IDs would be in the .song_ids or .song_archive files.

I decided to modify that logic by simply checking metadata:

  • We use music_tag to check that if a file with the same name exists, then we read the tracktitle and artist tags and compare them to the new song's metadata

This should normally work


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Googolplexed0/zotify/pull/25 **Author:** [@MihaiStreames](https://github.com/MihaiStreames) **Created:** 6/16/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`901173e`](https://github.com/Googolplexed0/zotify/commit/901173ea14640c9ed74eee1bd6cc8d12c0faa067) proper duplicate checks + pycharm linting - [`b9513c4`](https://github.com/Googolplexed0/zotify/commit/b9513c498d8f67781b18115dfc9f50f033bfe689) Revert "proper duplicate checks + pycharm linting" - [`48f8eb9`](https://github.com/Googolplexed0/zotify/commit/48f8eb99439bcc9dbc8c93eb409ae91302a2d715) duplicate check ### 📊 Changes **1 file changed** (+117 additions, -107 deletions) <details> <summary>View changed files</summary> 📝 `zotify/track.py` (+117 -107) </details> ### 📄 Description I noticed, while downloading playlists where I would update the order of songs (by adding or removing songs), that despite songs being the same, if their filenames weren't identical, the songs would be re-downloaded. - It would verify if a file with the exact same filename already exists and is not empty (i.e., its size is greater than zero), even though the IDs would be in the .song_ids or .song_archive files. I decided to modify that logic by simply checking metadata: - We use music_tag to check that if a file with the same name exists, then we read the tracktitle and artist tags and compare them to the new song's metadata _This should normally work_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 04:57:52 +03:00
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/zotify#160
No description provided.