![]() |
|
Recreating a *RecentAdded List in MinimServer - Printable Version +- MinimServer Forum (https://forum.minimserver.com) +-- Forum: MinimServer (/forumdisplay.php?fid=1) +--- Forum: Music Tagging (/forumdisplay.php?fid=9) +--- Thread: Recreating a *RecentAdded List in MinimServer (/showthread.php?tid=7530) |
Recreating a *RecentAdded List in MinimServer - adriaan - 10-05-2025 11:06 Is it possible to recreate the list of recently added albums in MinimServer (*RecentAdded tag)? Due to various reasons, my current list of recently added content is either incomplete or contains too much. As an alternative, I’m considering populating a custom tag like AddedDate, using the file creation date via a script or tool. Has anyone tried this, or are there better approaches for achieving a reliable "recently added" list? RE: Recreating a *RecentAdded List in MinimServer - simoncn - 10-05-2025 11:59 MinimServer stores its list of recently added files in the added-dates.txt file. The location of this file depends on whch platform you are using to run MinimServer. This file is updated every time MinimServer rescans your library. It is a plain text file, so you can edit it with a text editor to correct any problems with its contents. If the added-dates.txt file contains fewer files than your recentAdded setting (default 300, maximum 1000), additional files are shown in the Recently Added index. These additional files are selected based on the "last modified" dates in your files. You can look at the added-files.txt file to see which additional files have been selected. RE: Recreating a *RecentAdded List in MinimServer - adriaan - 10-05-2025 16:02 Thanks, I used the following script: #!/bin/bash find /media -type f -printf '%T@ %p\n' 2>/dev/null | \ sort -nr | head -n 100000 | while IFS= read -r line; do epoch=$(echo "$line" | awk '{print $1}') file=$(echo "$line" | cut -d' ' -f2-) timestamp=$(date -d @"$epoch" '+%Y-%m-%d %H:%M:%S.%3N') printf "%s %s\n" "$timestamp" "$file" done > added-dates.txt RE: Recreating a *RecentAdded List in MinimServer - simoncn - 10-05-2025 22:23 I tried this script on a test library. It appears to be putting all files in the library in "last modified" order. This is equivalent to deleting the contents of the added-dates.txt file, as this will cause MinimServer to show recently added files in "last modified" order (see my previous post). Also, I was unable to start Minimserver when using the output from this script as the added-dates.txt file. This appears to be caused by a charset issue with files that have non-ASCII filenames. RE: Recreating a *RecentAdded List in MinimServer - simoncn - 11-05-2025 09:45 I have found the reason for the MinimServer startup error when using the added-dates.txt file produced by the script. The added-dates.txt file needs to be in the UTF-8 character set. The file created by the script is in the ISO-8859-1 character set and this character set mismatch causes Java to produce an error when MinimServer tries to read the file. RE: Recreating a *RecentAdded List in MinimServer - adriaan - 11-05-2025 17:56 Thanks Simon. I took your advice and removed the added-dates.txt and restarted minimserver. It seems most Linux filesystems (e.g. ext4) store both the creation date as well as the change date. Most likely minimserver now uses the change date. So, if I change a FLAC file it will be added to the recently added list. Not sure though about this conclusion, most likely you already knew this.... RE: Recreating a *RecentAdded List in MinimServer - simoncn - 11-05-2025 21:32 This is exactly why MinimServer uses the added-dates.txt file. This file is updated on a rescan to record the time a new file was added to the library. If the file is changed after it was added (and therefore has a newer "last modified" time), MinimServer uses the time recorded in the added-dates.txt file in preference to the "last modified" time. Using the creation date (where available) could be an alternative solution but this wouldn't handle the case of a file created some time before it was added to the library. |