The repos refresh only updates the paths in the repository.xml but not in the favorites.xml. Thus after external rearrange I cannot play any favorites anymore and have to re-add them again. (In my case >2k files )
I try this issue hard to fix, given how the refresh process is done: refresh don't detect if a file has been moved, and if it would do, how to detect its new location?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I imagine the pseudo-code for an update function could be:
//contains compares only tags, not file location
if found = repository.containsWithSameTags(audiofile)
if found exists on harddrive
found.setPath(audiofile.gethPath)
else
repository.add(audiofile)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
oh darn my last comment lost formatting
//contains compares only tags, not file location
if (found = repository.containsWithSameTags(audiofile) ){
if (found exists on harddrive) found.setPath(audiofile.gethPath)}
}else repository.add(audiofile)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That means that two files are equals if have the same tags, which is not the current behaviour of favorites, so I think we must change that before, so when setting a song as favorite, all songs with same tag will be favorite too.
That is in fact the behaviour of option "import favorites from last.fm", where all songs with same tag are marked as favorite.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
xmls just for reference
I try this issue hard to fix, given how the refresh process is done: refresh don't detect if a file has been moved, and if it would do, how to detect its new location?
I imagine the pseudo-code for an update function could be:
//contains compares only tags, not file location
if found = repository.containsWithSameTags(audiofile)
if found exists on harddrive
found.setPath(audiofile.gethPath)
else
repository.add(audiofile)
oh darn my last comment lost formatting
//contains compares only tags, not file location
if (found = repository.containsWithSameTags(audiofile) ){
if (found exists on harddrive) found.setPath(audiofile.gethPath)}
}else repository.add(audiofile)
That means that two files are equals if have the same tags, which is not the current behaviour of favorites, so I think we must change that before, so when setting a song as favorite, all songs with same tag will be favorite too.
That is in fact the behaviour of option "import favorites from last.fm", where all songs with same tag are marked as favorite.