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

[FEATURE REQUEST] Automatically updating missing tracks #117

Closed
z9xx7o0 opened this issue Jan 26, 2024 · 6 comments
Closed

[FEATURE REQUEST] Automatically updating missing tracks #117

z9xx7o0 opened this issue Jan 26, 2024 · 6 comments

Comments

@z9xx7o0
Copy link

z9xx7o0 commented Jan 26, 2024

Currently, in Namida, when I move a track / rename the file, it detects it as a new track, so I have to recreate my playlists, and everything is messed up. So I think there should be an option where if a track is renamed, moved to a different folder, change the file type, or really any change where the track is still the same, instead of considering it as a new track, it should just detect its the same track (just like detecting duplicates). I constantly redownload my songs, which makes it hard to rearrange them and recreate the playlists and everything. I know there is an option where I can manually change the new file location, but that takes time if I have to do multiple or if I moved each track into a separate folder.

@MSOB7YY
Copy link
Member

MSOB7YY commented Jan 26, 2024

well we can't just point tracks to their new path, everything is saved by its path, meaning we need to actually replace all entries with the new path and thats quite a heavy task, a missing track needs to be updated in

  • all playlists
  • all queues
  • all history days
  • player queue and selected tracks
    Future<void> updateTrackPathInEveryPartOfNamida(Track oldTrack, String newPath) async {
    final newtrlist = await Indexer.inst.convertPathToTrack([newPath]);
    if (newtrlist.isEmpty) return;
    final newTrack = newtrlist.first;
    await Future.wait([
    // --- Queues ---
    QueueController.inst.replaceTrackInAllQueues(oldTrack, newTrack),
    // --- Player Queue ---
    Player.inst.replaceAllTracksInQueue(oldTrack, newTrack),
    // --- Playlists & Favourites---
    PlaylistController.inst.replaceTrackInAllPlaylists(oldTrack, newTrack),
    // --- History---
    HistoryController.inst.replaceAllTracksInsideHistory(oldTrack, newTrack),
    ]);
    // --- Selected Tracks ---
    SelectedTracksController.inst.replaceThisTrack(oldTrack, newTrack);
    }

i can think about a separate screen with missing tracks and their suggestions, but automatically identifying seems like a real no

@MSOB7YY MSOB7YY changed the title [FEATURE REQUEST] Identifying tracks [FEATURE REQUEST] Automatically updating missing tracks Jan 26, 2024
@z9xx7o0
Copy link
Author

z9xx7o0 commented Jan 26, 2024

Can't the tracks be identified just like duplicates can? Or provide a new folder for multiple tracks, and each track automatically finds its match. Or at least when manually selecting a new path, there could be a recommended track at the top.

@MSOB7YY
Copy link
Member

MSOB7YY commented Jan 26, 2024

the identification part is easy, but automatically updating is not possible

  • recommended track at top:
    • that already exists, check the video below, the first one has no possible matches while the second has
update.missing.track.mp4
  • providing a new screen with all missing tracks and their possible matches:
    • is what im thinking about

@z9xx7o0
Copy link
Author

z9xx7o0 commented Jan 27, 2024

When adding the missing tracks page, is it possible to add an "update all to recommend" button? So each track that is missing that has a recommended track will get updated to that track. Also, it will be important to be able to delete missing tracks from that page because if I wanted to delete a track for good purposely, I should also be able to remove it from the page.

@MSOB7YY
Copy link
Member

MSOB7YY commented Mar 9, 2024

@z9xx7o0 as mentioned, its now implemented, will be found inside indexer page.
about removing missing tracks, well uhh not now, there should be a way to remove tracks from whole database first.. smth that idk if i should implement

@MSOB7YY
Copy link
Member

MSOB7YY commented Mar 9, 2024

just a note, updating ~200 tracks took around 20 seconds (as for 41k history + 2200 queue + 19 playlist)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants