2009-12-21, 18:28
I've seen a lot of posts lately on organizing the video library. Ultimately these generally turn to discussions on some sort of 'category' feature, where you can organize videos that do not fit nicely into the 'Movies' or 'TV Shows' containers.
If implemented, the process would go something like this:
a) I have videos that I want in the library, but are not Movies or TV Shows (or maybe they are but I want them in their own container).
b) First, get them in the library. Set the content (use movies), but have your own NFO's if needed so that their info can be scanned.
c) set the category
d) go to the video library, select the category and see the videos
Ideally you'd also want to be able to set more than one directory to the same category and have them all feed into it.
I'll be honest upfront and tell you that I have no real use for this feature, however I did really want to play around with XBMC source code, so I thought I'd see if I could implement a real basic version of it anyway. Here are some screenshots of what I've come up with. Keep in mind these are not mock-ups. I have fully functioning source code for all of this (see zip file of modified files).
Step 1)
You must already have a folder scanned in to the library. Bring up the context menu in the Files view and you will see the 'Set Category' button. This will only show up if content has been set. Once you set the Category it will flag this source as belonging to this category.
Step 2)
go to the video library overview menu. You will see your custom category listed. Click on it to view all the files in this category.
Step 3)
You might want to remove the category, just go back to the Files view and select 'Remove Category' to remove it. Addionally if no more directories belong to this category it will be removed from the DB.
Problems:
This implementation has several problems that need to get sorted out:
1) currently no way to set the category name. This was just laziness on my part. Ideally you want a dialog to select from previously defined categories, or just type one in on the keyboard and if it exists it will be used, if not added. The code exists to impelement this, but I didn't want to mess around with making a dialog box. Help on this will be needed.
2) When you add or remove a category and you have viewed the library once already you need to restart XBMC for your categories and files to be removed from the list. Not sure why, I'm assuming a cache issue but don't know where it would be.
3) files still show up in Movies. The option to hide Categories from your normal movies view is needed. I'm assuming if you add them to a category it is because you do not want them to show up anywhere else. the SQL queries here will need to get changed to look for files that do not belong to a category.
Changes Made to Source:
For people interested in what was modified on a source level to do this, please check the ZIP file with all the modified files. I have included a README with an overview of what was done.
Hope this is a step in the right direction for this type of feature. I may work on it a little if people are intersted, but to actually include this into XBMC as a working feature I'm sure much more work will need to be done. I'm also not sure how this corresponds to any video library changes that are being planned for future XBMC releases.
If implemented, the process would go something like this:
a) I have videos that I want in the library, but are not Movies or TV Shows (or maybe they are but I want them in their own container).
b) First, get them in the library. Set the content (use movies), but have your own NFO's if needed so that their info can be scanned.
c) set the category
d) go to the video library, select the category and see the videos
Ideally you'd also want to be able to set more than one directory to the same category and have them all feed into it.
I'll be honest upfront and tell you that I have no real use for this feature, however I did really want to play around with XBMC source code, so I thought I'd see if I could implement a real basic version of it anyway. Here are some screenshots of what I've come up with. Keep in mind these are not mock-ups. I have fully functioning source code for all of this (see zip file of modified files).
Step 1)
You must already have a folder scanned in to the library. Bring up the context menu in the Files view and you will see the 'Set Category' button. This will only show up if content has been set. Once you set the Category it will flag this source as belonging to this category.
Step 2)
go to the video library overview menu. You will see your custom category listed. Click on it to view all the files in this category.
Step 3)
You might want to remove the category, just go back to the Files view and select 'Remove Category' to remove it. Addionally if no more directories belong to this category it will be removed from the DB.
Problems:
This implementation has several problems that need to get sorted out:
1) currently no way to set the category name. This was just laziness on my part. Ideally you want a dialog to select from previously defined categories, or just type one in on the keyboard and if it exists it will be used, if not added. The code exists to impelement this, but I didn't want to mess around with making a dialog box. Help on this will be needed.
2) When you add or remove a category and you have viewed the library once already you need to restart XBMC for your categories and files to be removed from the list. Not sure why, I'm assuming a cache issue but don't know where it would be.
3) files still show up in Movies. The option to hide Categories from your normal movies view is needed. I'm assuming if you add them to a category it is because you do not want them to show up anywhere else. the SQL queries here will need to get changed to look for files that do not belong to a category.
Changes Made to Source:
For people interested in what was modified on a source level to do this, please check the ZIP file with all the modified files. I have included a README with an overview of what was done.
Hope this is a step in the right direction for this type of feature. I may work on it a little if people are intersted, but to actually include this into XBMC as a working feature I'm sure much more work will need to be done. I'm also not sure how this corresponds to any video library changes that are being planned for future XBMC releases.