tfabris / CrowCam

A set of Bash scripts to control and maintain a YouTube live cam from a Synology NAS.
GNU General Public License v3.0
3 stars 3 forks source link

Deleted Video appears in custom playlist. #59

Closed tfabris closed 4 years ago

tfabris commented 4 years ago

Occasionally an entry in the custom playlist "CrowCam Archives" appears. The entry is titled "Deleted video" and its description is "This video is unavailable."

At first, I thought it was the CrowCam Cleanup feature which was deleting old videos without cleaning them up out of the playlist. However I added code for CrowCam Cleanup to also delete the video's playlist entry, and that code is correctly running, and the "problem" entry does not correspond to this, I don't think. So in theory that cleanup should be working to also delete the playlist entries at those times.

I need to find out what makes these "Deleted video" entries show up and address the root cause.

The one I'm looking at, where I noticed it, appears in an odd place. I have in my list, in this reverse chronological order:

Important takeaways from the list above: Since I noticed this list issue on 2019-09-29, this wasn't a video being cleaned up at that slot in the time stream. The video dates are only 2-3 days in the past, and my cleanup value is set to 9 at the time. So it's not a cleanup occurring. Also the videos surrounding it were just "CrowCam" and it didn't clean those up. Also the videos surrounding it are all sequential and correct, so this "Deleted video" is an insertion of some kind. It's not supposed to be in that location in the playlist. How did it get there?

The playlist entry for this video in the JSON looks like this:

      { 
         "kind":"youtube#playlistItem",
         "etag":"\"j6xRRd8dTPVVptg711_CSPADRfg/zAt8TVNBOsk4TVLtP_RjP5J44WE\"",
         "id":"UExxaS1McjFoUEJPVXVCZ012c0RNWTJLM2lVZzZuQlpBVi5DM0UwMkNDRTIwQUNDMjE2",
         "snippet":{ 
            "publishedAt":"2019-11-27T00:42:12.000Z",
            "channelId":"UCqPZGFtBau8rm7wnScxdA3g",
            "title":"Deleted video",
            "description":"This video is unavailable.",
            "channelTitle":"Vixy & Tony",
            "playlistId":"PLqi-Lr1hPBOUuBgMvsDMY2K3iUg6nBZAV",
            "position":5,
            "resourceId":{ 
               "kind":"youtube#video",
               "videoId":"hKmQyeInJsM"
            }
         }
      },

Theories to check:

To do:

tfabris commented 4 years ago

Done:

To do:

tfabris commented 4 years ago

Investigation results:

2019-11-28 00:04:27 CrowCam Cleanup - 216 playlistItemIds, 216 videoIds, 216 titles found. Processing.
2019-11-27 16:42:44 CrowCam Keep Alive - No final URL was obtained from /volume1/homes/admin/CrowCam/youtube-dl. Exiting program.
2019-11-27 16:42:43 CrowCam Keep Alive - /volume1/homes/admin/CrowCam/youtube-dl finished with exit code 1.
2019-11-27 16:42:18 CrowCam Controller - We are after our sunset/stop time. YouTube Live Broadcast is up. It should be down at this time. Stopping stream.
2019-11-27 16:18:14 CrowCam Controller - Done bouncing YouTube stream.
2019-11-27 16:18:09 CrowCam Controller - Bouncing stream for 4 seconds.
2019-11-27 16:18:09 CrowCam Controller - Bouncing the YouTube stream for 4 seconds, because the stream was unexpectedly down.
2019-11-27 16:18:09 CrowCam Controller - The configurationIssues contains a bad value. Value retrieved was: videoIngestionFasterThanRealtime.

Investigation conclusion: Comcast bullshit.

OK to implement final version of code in production, which should close this issue if it works.

tfabris commented 4 years ago

Auto-cleanup seems to be working correctly in production.

Note: When a Deleted File is cleaned up, it will still appear in the crowcam-videodata for that particular run, since the cleanup step happens after the videodata was retrieved. But it will be scrubbed on the next automatic run of CrowCamCleanup.sh. This is OK for my purposes.

Closing bug.