More > JRiver Media Center 33 for Windows
New function request - timestamp (updated)
Moe:
I would like the ability to capture the time that a field has been updated. Much like [Date Tagged] but I want to be able to specify a specific field. I am thinking something like this:
timestamp(fieldname, mode)
Available mode values:
0 write time value if empty
1 write time value any time field is updated
Examples
timestamp([TMDB Rating], 1)
Writes the date that the TMDB Rating was last updated.
fomatdate(timestamp([Awards], 1),date)
Writes the date that the Awards field was last updated.
Thank you for your consideration.
zybex:
This would require MC to essentially double the number of existing fields in order to store the [<field_name>_last_updated] value for each field on each file. This would slow down DB write operations and potentially double the DB size.
A single [last updated] field that gets updated whenever any metadata changes for a given file is better, but it's also tricky as it would also get updated when a file is played (because [number plays] changes).
Moe:
Fair enough. Then maybe we can come up with a different solution to the problem I want to solve.
I wanted this function primarily so that I could capture the date that an item was added to a playlist. Here is why.
I have a watchlist playlist that I add movies to that I want to watch. For example, I am scrolling through my movies and see a movie I have been meaning to watch, but I am not in the mood for at the moment, I add it to my watchlist playlist. I then have a smartlist that uses that watchlist and filters it by number of plays, if the number of plays is zero, display the movie, if it's greater than zero, hide it. This works pretty great except that if I want to re-watch a movie then the number of plays is not zero and it won't display. This old thread has details of my current setup if the above isn't sufficient.
One solution I came up with was the timestamp idea. I wanted to use timestamp to capture the date a movie was added to a playlist so that I could compare that date against the date that a movie was last played, if the date added to playlist was later than last played then it would appear on my watchlist.
Maybe an alternative solution would be a function that could be used in an after playback expression that removes an item from a playlist. Or a new date/time function such as:
timestamp()
The timestamp() function returns a floating-point value representing the current system date and time. Very similar to the now() function except that the value is static.
Example
if(isequal(FilePlaylists(), Watchlist, 8), formatdate(timestamp(), date),)
I am open to any kind of solution.
lepa:
I think that to tackle what Moe is wanting to achieve is best solved with pair of new functions:
AddFileToPlaylist(path, mode 0,1)
- return value probably doesn't add value in context these are used
RemoveFileFromPlaylist(path)
- return value probably doesn't add value in context these are used
maybe mode 1 to addfiletoplaylist function to create new playlist like path given if it doesn't exist already.
Add is not required so solve this particular task but could be useful for some other tasks and when doing remove it is logical to implement also add. MCWS already have these so shouldn't be too big of a task
E:
so workflow would be:
1. add some movie to your MyLists\WatchList playlist like you do today
2. watch the movie
3. When playback is completed after playback expression kicks in with expression: RemoveFileFromPlaylist(MyLists\WatchList)
4. movie just watched is removed from MyLists\WatchList
zybex:
Nice idea.
When adding a file to a playlist there's usually the option to allow adding duplicates. If these functions are added, they should NOT add duplicates as the expression functions can sometimes be executed many times per second (specially while testing), so that would be dangerous.
Navigation
[0] Message Index
[#] Next page
Go to full version