{"action":"created","issue":{"url":"https://api.github.com/repos/adafruit/pi_video_looper/issues/4","labels_url":"https://api.github.com/repos/adafruit/pi_video_looper/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/adafruit/pi_video_looper/issues/4/comments","events_url":"https://api.github.com/repos/adafruit/pi_video_looper/issues/4/events","html_url":"https://github.com/adafruit/pi_video_looper/issues/4","id":67407109,"number":4,"title":"Check for file change in directory mode","user":{"login":"thecrazy","id":2411956,"avatar_url":"https://avatars.githubusercontent.com/u/2411956?v=3","gravatar_id":"","url":"https://api.github.com/users/thecrazy","html_url":"https://github.com/thecrazy","followers_url":"https://api.github.com/users/thecrazy/followers","following_url":"https://api.github.com/users/thecrazy/following{/other_user}","gists_url":"https://api.github.com/users/thecrazy/gists{/gist_id}","starred_url":"https://api.github.com/users/thecrazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecrazy/subscriptions","organizations_url":"https://api.github.com/users/thecrazy/orgs","repos_url":"https://api.github.com/users/thecrazy/repos","events_url":"https://api.github.com/users/thecrazy/events{/privacy}","received_events_url":"https://api.github.com/users/thecrazy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-09T17:09:23Z","updated_at":"2015-05-04T04:59:11Z","closed_at":"2015-05-04T04:59:11Z","body":"I see you already thought about this one,\r\n\r\nWhy not use stat on the folder?\r\n\r\nStore the output of \"stat -c %y /path/to/folder/\" and compare it at every loop, if it changes you know the content of the folder was modified and it hardly takes any time:\r\n \r\nreal\t0m0.043s\r\nuser\t0m0.010s\r\nsys\t0m0.000s\r\n\r\nNow, I know what your thinking... but I don't know KungFu... er I mean Python and when I tried modifying a simple text string in usb_drive_mounter.py to change the message that is displayed on screen saying \"insert usb key etc...\" the video looper wouldn't start anymore... So not much luck there :(\r\n\r\nHad to undo the change to get it going again."},"comment":{"url":"https://api.github.com/repos/adafruit/pi_video_looper/issues/comments/98589026","html_url":"https://github.com/adafruit/pi_video_looper/issues/4#issuecomment-98589026","issue_url":"https://api.github.com/repos/adafruit/pi_video_looper/issues/4","id":98589026,"user":{"login":"tdicola","id":1332183,"avatar_url":"https://avatars.githubusercontent.com/u/1332183?v=3","gravatar_id":"","url":"https://api.github.com/users/tdicola","html_url":"https://github.com/tdicola","followers_url":"https://api.github.com/users/tdicola/followers","following_url":"https://api.github.com/users/tdicola/following{/other_user}","gists_url":"https://api.github.com/users/tdicola/gists{/gist_id}","starred_url":"https://api.github.com/users/tdicola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdicola/subscriptions","organizations_url":"https://api.github.com/users/tdicola/orgs","repos_url":"https://api.github.com/users/tdicola/repos","events_url":"https://api.github.com/users/tdicola/events{/privacy}","received_events_url":"https://api.github.com/users/tdicola/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T04:59:11Z","updated_at":"2015-05-04T04:59:11Z","body":"Oh interesting idea--yeah that would be a good way to detect when files are added.  I don't think I'll be able to get to making the change myself, but if someone wants to take a stab at making the change and submitting a pull request, go for it!  Thanks again for suggesting the idea!"}}