namidaco / namida

A Beautiful and Feature-rich Music & Video Player with Youtube Support, Built in Flutter
Other
2.09k stars 127 forks source link

[QUESTION] Moving Songs Re-Index #134

Closed PlumBlossoms13 closed 4 months ago

PlumBlossoms13 commented 7 months ago

Hello again!

I'm moving a some of my songs from the internal storage of my phone to an SD card, that's included in my list of folders for the music library

When I update the directory path, I noticed that it doesn't update in the pop-up box and re-indexing that particular album doesn't fix it. However, the songs are found again and play normally after I re-index my entire library (though the little heart is reset nbd). Is that intended?

MSOB7YY commented 7 months ago

hello, updating directory path is only meant to update the paths reference inside history, playlists, favorites, queues, etc. totally different from re-indexing.

selecting tracks/album etc and reindexing it only, means refreshing the metadata obtained during first indexing, it will fail if the real path is no longer found

so yah it's intended, in ur case u would have to:

  1. move ur music
  2. update indexer folders (if necessary)
  3. re-index/refresh to update library
  4. "update directory path" to update lost path references in various namida parts
PlumBlossoms13 commented 7 months ago

Ah, got it! Thank you! 🤗

PlumBlossoms13 commented 7 months ago

I've followed the steps you gave me but my library still seems to be broken and I can't figure out why. I had my song files on both my phone and an SD card and have moved all the files to a new, larger SD card. I tried the last step in the advanced settings but all of my play counts and favorites are gone

Edit: I've messed around with it a bit and I noticed that I can update the path for a song individually but it created a duplicate track (in the Track tab only) and some songs lost a majority of their tags somehow

Edit 2: I'm so sorry to keep editing 😔 I've updated the library to the point where the songs play from the Track tab BUT the play counts etc are gone and the playlists are still broken but still have play counts and hearts. Updating the directory path didn't fix it like I assumed and it still displays the old path (pic below). If I update the path from the Playlist tab, the hearts and stuff are restored in the Track tab but I can only update one song at a time and I have a big library

Sent from Yahoo Mail on Android

On Sat, Feb 24, 2024 at 4:58 PM, @.***> wrote:

hello, updating directory path is only meant to update the paths reference inside history, playlists, favorites, queues, etc. totally different from re-indexing.

selecting tracks/album etc and reindexing it only, means refreshing the metadata obtained during first indexing, it will fail if the real path is no longer found

so yah it's intended, in ur case u would have to:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

PlumBlossoms13 commented 7 months ago

Screenshot_20240301-120859

MSOB7YY commented 7 months ago

@PlumBlossoms13 quite interesting, what exactly do u type when updating directory path? i have did this million times without issues, if u got duplicates then just do a refresh/reindex afterwards

PlumBlossoms13 commented 7 months ago

In the directory path, I put in the new directory path on the SD card (/storage/0123-4567/Music). I've copy-pasted and typed it out just in case that might have an effect but it was the same either way.

That was my first thought but, for some reason, the new, duplicated track disappeared too even though I have the new music folder in the list

My friend moved his library without issues as well and I did the same thing as him so it is pretty weird

MSOB7YY commented 7 months ago

yeah thats the new path, what about the old one? what do you type exactly?

PlumBlossoms13 commented 7 months ago

For the old path I typed either "/storage/emulated/0/Music/Songs" or "/storage/D0F6-4C1C/Music" depending on where my music was on my phone

PlumBlossoms13 commented 7 months ago

Sorry to keep bothering you, I'm trying to figure this out on my own because you might be busy.

I've looked through my Playlist tab and noticed that some of the songs from my old "/storage/D0F6-4C1C/Music" directory actually work fine and the play counts are still there but the heart is gone (in the Track tab). The ones from that directory that don't have the new path still have their heart. I'm not sure why some have the updated path and lost their heart while some didn't update at all. Everything from "/storage/emulated/0/Music/Songs" is still broken along with my playlists and my Favorites list that, oddly, still have the hearts from songs that lost them in the Track tab

MSOB7YY commented 7 months ago

@PlumBlossoms13 ur not bothering dw i just don't have a complete image about what's going on wrong.

just notice that favourites is also a playlist saved by path too, if u moved a track, it means it will no longer be in favorite playlist

alr so what i get is:

  1. ur favorite playlist & other playlists still have the old paths
  2. history also still has old paths, am i right?

have you tried pressing on any track that is lost (a track u moved) and choose advanced from dialog > update directory path, then check if it was properly updated? would be better if u video recorded it too. if it worked then proceed with the old way (from settings page) and see

PlumBlossoms13 commented 7 months ago

The history list still have the old path and so do my playlists. The favorite playlist isn't one I made, it's the one in the playlist tab at the top

If I press a track and go through the advanced dialogue about updating the path, it works and restores everything. Doing it from the advanced settings doesn't update the paths

https://github.com/namidaco/namida/assets/109384939/ca253431-658e-48cf-b665-1e7ac2a518d0

I think this video shows everything you might need but let me know!

MSOB7YY commented 7 months ago

@PlumBlossoms13 yeah uh.. have u tried to restart app? like force stopping also u may check disabling "update missing tracks only" (if you moved everything in the folder)

this really is weird but i remember having a similar issue and just restarted lemme know

PlumBlossoms13 commented 7 months ago

I've tried restarting and clearing the cache a few times but it stays the same along with disabling "updating missing tracks only"

MSOB7YY commented 7 months ago

@PlumBlossoms13 ughhh.. can you please backup your history+playlists+database+queues and send me the file (here or in telegram/discord), i will try to update paths myself

PlumBlossoms13 commented 7 months ago

@MSOB7YY sure I can do that! Namida Backup - 2024-03-04 07.24.03.zip

MSOB7YY commented 7 months ago

i can confirm this has an issue, the only place where it gets updated is queues. while history/playlists/favs are not updated, gonna see whats going wrong

PlumBlossoms13 commented 7 months ago

Okay! There's no rush so please take your time! Thanks for all your help so far! ❤️

MSOB7YY commented 6 months ago

@PlumBlossoms13 sorry i forgot to give updates, so the updating actually worked fine, but i had to disable "update missing tracks only", this option actually checks if the new file exists before replacing. if this still didnt work for you, the new "missing tracks page" in next update should help a bit

also can u try the latest build from here? leaving open till we see results.

PlumBlossoms13 commented 6 months ago

No problem! Disabling the "update missing tracks didn't change anything" like before

For the latest build, what exactly should I be looking for? It installed as a new app

Edit: Oh wait, I have backups. Should I try that?

MSOB7YY commented 6 months ago

@PlumBlossoms13 yep u import ur backup and try to update directory path from there. lemme know the results

PlumBlossoms13 commented 6 months ago

Okay updating the directory didn't work. The new missing track option did! But it seems like it only worked for the History and Most Played lists. Favorites still has the old path

PlumBlossoms13 commented 5 months ago

@MSOB7YY Hi again! No rush or anything with this issue but I figured I should bring this up. I updated to the latest version to use the missing tracks feature since it mostly worked but it seems to get stuck here Screenshot_20240417-102305

MSOB7YY commented 5 months ago

@PlumBlossoms13 thanks for the "no rush" i really wish i can make things go as intended but it's hard without being able to reproduce. as for the stuck issue, how many tracks+history+playlists tracks have you got? it might take longer if u have many, but steps 2-5 shouldn't take so long. can u also provide logs? might be a bug that throws without being handled

MSOB7YY commented 5 months ago

update: i checked and it throws at some point, gonna check and fix sorry for that

PlumBlossoms13 commented 5 months ago

@MSOB7YY You're welcome ❤️ I have about 2300 tracks but some of them I've added recently. I thought that the amount of tracks I have would be a factor but I let it go for like 15 minutes so I wasn't sure just how long I should wait 😅

No need for sorry, take your time! ❤️

Edit: Also specific track counts! Tracks: 2462 (I've added songs since the issue has been open. It was 1977) History: 1870 Favorites: 1227 Playlists: I have 3 playlists right now. One playlist has only 5 tracks, one has 17 and the biggest one is technically all of my tracks in one list and it has 1977

MSOB7YY commented 5 months ago

yeah that shouldn't take much time at all, probably only few seconds. the issue happens cuz somehow preparing m3u playlists is called, so i should fix that

MSOB7YY commented 5 months ago

@PlumBlossoms13 yo can u try the one here? https://github.com/namidaco/namida/actions/runs/8862663911

(if your using stable version, u can just import a backup from it then test)

PlumBlossoms13 commented 5 months ago

@MSOB7YY This worked! My Favorites list still looks like this but this happened before so I can wait until you have the time to look into it. Thank you! ❤️ Screenshot_20240427-234207

MSOB7YY commented 5 months ago

yep at least all others are working and the issue is only with favourites, gonna have a look into it

MSOB7YY commented 4 months ago

@PlumBlossoms13 yo i did some changes to the internal playlist manager, i tested again and it worked as intented so this should be fixed. u can try the beta build or wait the stable release. bothways its working as it should be so im not sure if u still got the same issue

PlumBlossoms13 commented 4 months ago

@MSOB7YY I just tried the new beta build you linked! Everything worked like the last build I tested except for the Favorites Tab still 😔

MSOB7YY commented 4 months ago

@PlumBlossoms13 bruh i have nothing more to investigate in. just send me ur favorite list (from backup) again and i will update it for you

PlumBlossoms13 commented 4 months ago

Here's the json file but let me know if you need the whole backup archive. The first two songs have the right path but those are the ones I did individually to see if it would work

favs.json

MSOB7YY commented 4 months ago

@PlumBlossoms13 so u basically want to change all "/storage/emulated/0/" to "/storage/0123-4567/" right?

PlumBlossoms13 commented 4 months ago

Yeah that's the new directory! Also "/storage/D0F6-4C1C/Music" if that's still showing too

(But, if all that needs to be done is editing the file like a text file, I could do that on my own if you'd like. I didn't think it could be something so simple 😅)

PlumBlossoms13 commented 4 months ago

@MSOB7YY YOOO I FIXED IT (Sorry for yelling 😂)

Anyway, I updated to the stable version today and did the missing tracks process and noticed that it went history -> library -> playlist track. I thought maybe it wasn't looking at the Favourites that Namida already makes when you favorite a song so I made a playlist called Favourites and put those songs there, did the missing tracks thing and it fixed it! All the storage paths in the automatic favourites playlist are right and the tracks play and everything!

Edit: Okay so when I deleted the Favourites playlist that I made it deleted the hearts on all the tracks 😅 so good thing I have backups lol. Is there anything I could do about that? Having two Favorites and having to actually mangage one seems a little confusing lol

MSOB7YY commented 4 months ago

@PlumBlossoms13 YOOOO yo frr? lmaoo i already did update it from a clone version but needed to know exact new path for each folder lmao

wdym deleting custom-favourite playlist removed the hearts? the only way is to actually press the heart yourself or select tracks and remove, u cannot delete the default favourite playlist.

as i said i already updated so its working fine (i disabled check "update missing tracks only") so if it still not working for u, then i gotta suggest:

  1. select all tracks in favourite playlist
  2. add to custom playlist (any name)
  3. settings -> advanced -> update directory path
  4. after updating, go the custom playlist, select all, open dialog, add to playlist, (and with the new option) u can add all to default favourite playlist. done
PlumBlossoms13 commented 4 months ago

I'm not sure how it happened tbh lol. But when I deleted my Favourites that I made myself and then deleted it when everything was fixed, all the hearts were gone everywhere else and the default favourite list was empty. I can screen record if you wanna see since it doesn't take long to fix again

I'm kinda lost with the steps, sorry, because what should I update the directory path to when it's already correct?

Edit: HANG ON I HIT THE WRONG THING 😭 I removed the songs and then deleted the playlist instead off just deleting it with the little button. It's fine now!! Lol

MSOB7YY commented 4 months ago

its already correct like no more issues? if thats the case then ur all good lmao otherwise send me screen record or something to grasp the situation better

PlumBlossoms13 commented 4 months ago

Yeah everything's good now! Thank you sooo much for all your help and patience really ❤️ I'll leave a review on the discord channel when I get home from work! 💕

MSOB7YY commented 4 months ago

ahhh finally man that took quite a long run lmaoo, thank you for being patient not me and no need for review lmao just hope u do good in ur job 💗 thank u sm 💝