Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project Design? #1

Open
RayRCaringal opened this issue Mar 21, 2020 · 2 comments
Open

Project Design? #1

RayRCaringal opened this issue Mar 21, 2020 · 2 comments

Comments

@RayRCaringal
Copy link

Let's sort out how we're doing this for everyone, I'm making an issue since I keep having to repeat myself in the chat. We've established we're using C#, .NET, and PostgresSQL. I believe we're also making this a plugin/extension correct? It could also function as a website so let's decide that.

Anyways, how are we doing this, do we just tell the user whenever they come to a playlist like. "Yo this got deleted, it was titled [This Video]". Or do we just let them ask for specific videoes, like have them copy and paste the deleted video link into a field and then tell them "It was [This Video]"

If we take the 1st approach we could store a copy of the list and get what's difference right, but if we do the 2nd approach we don't need to store a copy of each playlist to see which is deleted, cause we're given the link so if the user uses multiple playlists, we can just store the video ID which is unique and then the title.

There's also the possibility that we might not even need to store anything in a DB, someone is exploring that tomorrow. I will get back with the results.

@austinbaccus
Copy link
Member

austinbaccus commented Mar 21, 2020 via email

@saffaura
Copy link
Contributor

If this were a browser extension, it would be cool if a user could just enter their youtube channel and the plugin would automatically scan their playlists and start mapping video ids to titles.

YouTube's api allows you to get the playlists for a channel or authenticated user:
https://developers.google.com/youtube/v3/docs/playlists/list

There's also more info about PlayListItems that contain the video title and video id:
https://developers.google.com/youtube/v3/docs/playlistItems

This could also be done server-side if it's just going to be a separate webpage.

Either way, the approach would be

  • Determine if the api can retrieve all playlists for a given user
  • Retrieve all PlayListItems from each playlist
  • For each PlayListItem, insert the video id and video title pair into the database

I believe that the PlayListItem object can be explored further. There might be some flag in the object that indicates whether or not the video resource was deleted. If that is the case, and the videoId is still present in the object, it would be trivial to scan a playlist for deleted items and then retrieve the title mapping from the database.

Since the data being stored is fairly small (video ids are a max of 11 characters, video titles are a max of 100 characters), there shouldn't be much scalability required for a small pilot. If storage is a concern, we can limit the maximum playlist size and inform the user if their playlist exceeds the limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants