*** Goal ***
In Itunes each item (like a song or a video) has metainformation fields. One of those metafinformation fields is “year”. I would like to store in that field how much time the corresponding item has been played.
Unit of measurement should be 10 seconds. So for example, year=5 would mean the item has been played 50 seconds.
*** Background ***
I am organizing my videos in Itunes. I would like to track how long I have watched each video because, after some time, this becomes a good proxy for how much I like each video.
For my music collection, the field playcount gives this kind of information. However, this doesn’t work for videos for the following reasons.
(1) Playcount is only updated when you play an item till the end and I rarely watch videos till the end.
(2) Videos differ a lot in length. A playcount for a 20 minute video is much more important than a playcount for a 3 minute video. (But this reason is less important than the first reason.)
*** Time schedule ***
There is no hurry. It would be nice if the project is completed somewhere during the summer.
*** Programming idea? ***
I have no experience writing applescripts but I think the program I need should do approximately the following.
(1) Start running when Itunes is started.
(2) Every 10 seconds check if the item that is currently playing is the same as the item that was playing 10 seconds ago. If so, increase the metainformation field “year” by 1.
(3) Stop running when Itunes is stopped.
(Ok, this doesn’t working properly if between those 10 seconds, you were playing something else. But I can live with that.)
However, if this is impossible for some reason or if you a have better idea, suggestions are greatly appreciated.