|
Timestamp of RecentlyPlayed change during rollover
|
|
10-02-2024, 23:28
Post: #1
|
|||
|
|||
|
Timestamp of RecentlyPlayed change during rollover
Hi @simoncn,
I'm using played-files.txt to keep a history of everything that's played, which is generally working well except that when the log rolls over (based on the recentPlayed= option) the timestamp of previously played tracks changes, that throws of my diff logic. In the following example I had set recentPlayed to 5 to speed up testing. Code: ...It's a strange one. |
|||
|
11-02-2024, 08:28
Post: #2
|
|||
|
|||
|
RE: Timestamp of RecentlyPlayed change during rollover
This might be caused by multiple reads of the same file by the renderer in a short space of time. For example, some renderers read the file and then immediately close it and read it again. In this case, MinimServer writes the time of the first read when it happens and also stores this time in memory. When the second read happens, MinimServer updates the last played time in memory but does not write a second entry to the played-files.txt file.
If something then happens to cause MinimServer to completely rewrite the played-files.txt file, the time of the second read will be written. As the purpose of this file is to enable recently played files to be sorted in the order of playing, a small difference in the timestamps doesn't matter. |
|||
|
12-02-2024, 12:53
Post: #3
|
|||
|
|||
|
RE: Timestamp of RecentlyPlayed change during rollover
Ok that makes sense.
In real-world use removing the time element for diff purposes should suffice - although annoyingly it's trivial to create scenarios (looping the same tracks over and over) where the logic would break down without the addition of extra, messy checks. Thanks Simon. |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help



