Posts: 6
Joined: Oct 2008
Reputation:
0
2008-12-31, 12:29
Hi all,
I am peeking around in the XMBC source, I can build and debug it well. I want to see if I can make something to (auto) remove the files that belong to the episode I watched. The reason is that I have a limited disk space, and after I've seen the episode (let's say it ends and returns to the XBMC window) I would like that file moved to a "seen" folder so that I can remove it later. Right now I need to remember which episodes I watched and delete them by hand later.
Any pointers to how this can be done elegantly? I was thinking in finding the exact event that XBMC returns after playing a file, and then perform the move. I am still learning to find my way around the source so maybe there is a more elegant way?
With regards,
- Jorgen
Posts: 6
Joined: Oct 2008
Reputation:
0
Ok, I guess nobody can provide me with an answer on this short notice. I think I will try to do the following.
When the update database function is called (invoked at the beginning of XMBC or manually) I will try to move all watched series to a subdir called "seen". When I am succesful in this, I will come back and ask some more questions on how to make this configurable or maybe provide a patch for it.
This handle seems to be the best, as it belongs to the database update functionality, and there is no user interaction required..
With regards,
- Jorgen
Posts: 6
Joined: Oct 2008
Reputation:
0
Thanks a lot for the pointers! Didn't knew about IRC I will have to find myself a rusty old IRC client I used in the old days and subscribe when I need to know more ;-)
Thanks again!
- Jorgen
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
if that wasn't clear; such a diff would never be accepted in svn. but personal mods is ofc welcome.
Posts: 6
Joined: Oct 2008
Reputation:
0
Hi all,
What would be the most user friendly of course is making a seperate view where all recent played series are shown, and with some checkbox mechanism these attached files can be removed or moved from disk so that the user is always in charge of what needs to be deleted. However I looked into the engine and something like that requires much work as it is a new view, the skins that are out there probably don't support it.
For my own purposes I would settle with a simple move of all files with the extension .avi, .divx, .mpeg, .mkv etc from the dir {some series} to {some series}/seen if the flag is set that they are watched. I do not keep old watched episodes, but I understand that automatic moving might not be desirable, and maybe even a setting per folder.
Trying to do this for myself for example in changing the auto update mechanism for the DB to (re)move my watched series, that's the cheapest effort in coding. Another way maybe is a plugin that does that for me, but although I know python I can't find enough documentation on how the plugin mechanism works, and debugging in C++ seemed more friendly and direct. But who knows maybe a plugin is a better idea, I am not even sure if that is possible in a plugin..
If there are better ways or angles on how to tackle this in a more generic and acceptable way I am all open to suggestions. I am recovering from being ill the holidays (just my luck) so I will probably first start some investigative work and see if I can do what I want, but if I can contribute something that more users like, that would be better. I have had so much pleasure from XBMC back in my XBox times, and now on my Vista HTPC that it would be nice to try to help out ;-)
With regards,
- Jorgen
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
well, to have a recently watched feature, "all" that is needed is storing the playdates in the db. the rest is just a .xsp
personally i dont see what file management has to do in a video library but that's just me
Posts: 147
Joined: Dec 2008
Reputation:
0
junk
Senior Member
Posts: 147
2009-03-06, 17:37
(This post was last modified: 2009-03-06, 17:44 by junk.)
I'm guessing he needs to be able to see in the file system which episodes he has watched to be able to delete them there. A DB-flag would just indicate to XBMC that the episode has been watched.
Maybe there could be a function in XBMC which you could call by clicking a menu item somewhere which looks for episodes with the "Watched"-flag set, and removes them both from DB and file system?
EDIT: After more thoughts, maybe this would be a solution:
The user gets a question after a episode has been watched (could be optional through setting): "Do you want to tag this episode for deletion?". The tagged episodes could later be deleted either by a timer job or through menu choice by user. Alternatively, there could be a question for the whole season when the last episode in the season has been watched (maybe just "You've watched the whole season. Do you want to delete it?").
Just some thoughts about what I would find useful.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
that is really the job for a script imo. if anything is missing to realize it i'll gladly add the missing bits.
Posts: 174
Joined: Jul 2008
Reputation:
0
I just started using the library for shows and this would really help me out getting rid of episodes I have watched.
Are you aware of any scripts that will take care of this?
Posts: 14
Joined: Aug 2010
Reputation:
0
Did this idea die off completely, shame, kind of liked it. Would be very useful to have some kind of automatic(optional) deletion of recently watched tv shows.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
this can be done in an add-on. nothing i'd consider in the core.