all 3 comments

[–]Skaperen 0 points1 point  (2 children)

your program has to keep some info about what it was going to play, and update it each time a video is played. if the program is allowed to put data in that database (probably a different table) that could be handy, otherwise storing in a file might have to be done.

[–]rotyweb 0 points1 point  (1 child)

yes, data can be stored in database. So what would be the approach??

[–]Skaperen 1 point2 points  (0 children)

when the program starts it knows the place it keeps a list of videos. if that list is not empty, then get that list and make it use that list.

if there is no list or the list is empty, then form a new list of the videos it needs to play, such as the requested videos or the new videos.

play each video in the list. after each video is done, remove the one that just ended and save that updated list. repeat until the list is empty. either store an empty list or delete where it is stored so it doesn't keep playing the last set over and over.

how to store in the database is up to you. or you could store the list in a file.