# Cast from kodi: add option to not modify/set watched flag and resume points

**URL:** <https://community.yatse.tv/t/cast-from-kodi-add-option-to-not-modify-set-watched-flag-and-resume-points/2827>\
**Category:** Won't implement\
**Tags:** kodi\
**Created:** [July 18, 2020, 6:03am UTC](https://community.yatse.tv/t/cast-from-kodi-add-option-to-not-modify-set-watched-flag-and-resume-points/2827 "2020-07-18T06:03:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheWeasel](https://community.yatse.tv/user_avatar/community.yatse.tv/theweasel/32/1698_2.png) [@TheWeasel](https://community.yatse.tv/u/TheWeasel)\
**Post date:** [July 18, 2020, 6:03am UTC](https://community.yatse.tv/t/cast-from-kodi-add-option-to-not-modify-set-watched-flag-and-resume-points/2827/1 "2020-07-18T06:03:55Z")

</div>

As the topic title says, I would like an option to disable the updating of the watched status for a video in the library when casting from kodi. In kodi I have the ability to disable setting watched flags and resume points on items in my library by setting in advancedsettings.xml. casting from kodi to local device (android) ignores this setting and sets the watched flag and resume points. For this reason I would like this option added on yatse side.

Thanks!

---

<div class="post-metadata">

**Author:** ![Tolriq](https://community.yatse.tv/user_avatar/community.yatse.tv/tolriq/32/12_2.png) [@Tolriq](https://community.yatse.tv/u/Tolriq)\
**Post date:** [July 18, 2020, 7:35am UTC](https://community.yatse.tv/t/cast-from-kodi-add-option-to-not-modify-set-watched-flag-and-resume-points/2827/2 "2020-07-18T07:35:29Z")

</div>

I suppose you mean by putting wrong values in the options dedicated to control when it’s done?

There’s no plan for such option as those could not work with the rest of things Yatse can support, one day maybe Kodi will expose AdvancedSettings so remotes can get the values and replicate it’s internal.

---

<div class="post-metadata">

**Author:** ![TheWeasel](https://community.yatse.tv/user_avatar/community.yatse.tv/theweasel/32/1698_2.png) [@TheWeasel](https://community.yatse.tv/u/TheWeasel)\
**Post date:** [July 18, 2020, 4:46pm UTC](https://community.yatse.tv/t/cast-from-kodi-add-option-to-not-modify-set-watched-flag-and-resume-points/2827/3 "2020-07-18T16:46:48Z")

</div>

Okay, I was hoping there was a way to just add the option on Yatse side independent to kodi side.  
I will just use triggers on my mysql db to block inserts in bookmark and modify updates in files so that files.playCount and files.lastPlayed are always NULL on updates.

If you can come up with a way to accomplish this with just Yatse, that would be GREAT, but I understand my use case is very rare.

If anybody was interested in the same, these are the mysql triggers I’m using

Trigger - No resume  
DELIMITER $$  
CREATE TRIGGER no\_resume BEFORE INSERT ON bookmark  
FOR EACH ROW  
BEGIN  
signal sqlstate ‘45000’ SET MESSAGE\_TEXT = ‘Blocking resume points’;  
END$$  
DELIMITER ;

Trigger - No watched status/tracking  
DELIMITER $$  
CREATE TRIGGER no\_watch BEFORE UPDATE ON files  
FOR EACH ROW  
BEGIN  
SET NEW.playCount = NULL;  
SET NEW.lastPlayed = NULL;  
END$$  
DELIMITER ;

---

<div class="post-metadata">

**Author:** ![TheWeasel](https://community.yatse.tv/user_avatar/community.yatse.tv/theweasel/32/1698_2.png) [@TheWeasel](https://community.yatse.tv/u/TheWeasel)\
**Post date:** [July 22, 2020, 12:00am UTC](https://community.yatse.tv/t/cast-from-kodi-add-option-to-not-modify-set-watched-flag-and-resume-points/2827/4 "2020-07-22T00:00:31Z")

</div>

Updated trigger to allow for selective watched (count and lastplayed date) blocking. The following will now block playCount and lastPlayed unless the path contains a specific string (“\_Unzipped” in this case):

DELIMITER $$  
CREATE TRIGGER no\_watch BEFORE UPDATE ON files  
FOR EACH ROW  
BEGIN  
IF (SELECT strPath FROM path WHERE path.idPath = New.idPath) NOT LIKE ‘%\_Unzipped%’  
THEN  
#Only block the tracking of files that do not contain “\_Unzipped” in their path  
SET NEW.playCount = NULL;  
SET NEW.lastPlayed = NULL;  
END IF;  
END$$  
DELIMITER ;
