Small hack to automatically advance a counter of how many episodes of a series have been watched. Creates a markerfile in the folder named e.g. "seen42" and handles automatic advancement. Also easy selection and starting of the next episode is possible.
- put it in your path at e.g. "/usr/bin/seen"
- make it executable
sudo chown 0:0 /usr/bin/seen; sudo chmod 755 /usr/bin/seen - call it from the directory containing the episodes:
seento advance counter by one or initially create itseen --openorseen oto automatically open the next episode and advance the counter if it was opened for more than 4 minutes (can be changed)seen --allorseen -aor ``seen a``` after you have finished all episodes to set a "seenAll" marker--verboseor-v`` orv```: give especially detailed output (aka be verbose)seen --regexdebugorseen -rdorseen rddebug the regExs you use in your script (e.g. forces ignoring of "break" in them and displays the result of every single one separately). If you find new RegEx that work particularly well, please open an issue and share :)
- Every
seenXYmarker is a copy of the script. Thus simply copying the script to e.g. "seen0" and executing with./seen0 --openwill be fine, albeit cumbersome.
The script contains 3 settings variables to store basic settings:
LIMIT=300: sets the maximum number of episodes this script will work for. Does not really make a difference as long as it is higher than the highest numbered episode.PLAYER=smplayer: sets the player used to play a file ifseen --openis used. Must be blocking otherwise automatic advancement of counter will not work. Can be more complex. Execution will be like$PLAYER $FILE_PATH.SECONDS_TO_ASSUME_SEEN=240: if player is open for less than the given number of seconds automatic counter advancement will not be triggered. (Only applies ifseen --openis used)