Crude Implentation of Video Library Categories

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
robweber Offline
Fan
Posts: 599
Joined: Sep 2009
Reputation: 15
Post: #1
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.

[Image: set-category.png]

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.

[Image: category-in-library.png]

[Image: videos-in-category.png]

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.

[Image: remove-category.png]

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.
find quote
outleradam Offline
Member+
Posts: 1,722
Joined: Sep 2009
Reputation: 20
Location: Louisiana
Post: #2
Sweet! I'm on my iPhone now so this will be short. A folderarked as category should break down contained folders by category. Categories should be removable from library view. If a folder contains nothing then it is not a category. All categories should be filed under a single Main library entry and a user option to flatten categories should be available. That is perfect XBMC work mang! If you could implement those options then it would be a awesome patch!

Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[Image: newsig-1.png]
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #3
Please add a ticket to trac and attach a diff for review.

It's unlikely to be added as-is, but may be useful as a base for a more complete implementation.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
outleradam Offline
Member+
Posts: 1,722
Joined: Sep 2009
Reputation: 20
Location: Louisiana
Post: #4
I would just like to elaborate on what I said earlier since I was typing from a phone I could not really express myself.

This is definitely a step in the right direction. I hope it can make it into Camelot final, but it may be too late for that. Who knows, RC2 may be right around the corner as I have already reported 1 bug with the installer, reported 2 within an hour of setup, reported another last night and came across another today which I'm not sure about the conditions.

This is exactly what XBMC needs. We have plenty of skilled scraping gurus here. I will try to find sites from which data can be scraped about shows in an "other" category.

omages can be scraped on categories:
http://images.google.com/images?q=sports...a=N&tab=vi

Of course, a call can be put out to all of those who would like to help. It would be easy compile a list of all possible current categories and people can submit fan art for lists of categories available. A bit of webspace can be reserved somewhere for that, or categoric art can be included with XBMC. Either way, I firmly believe that to give a good feel to XBMC's library, artwork is a must for every category.

As for scraping other data....

First one that comes to mind is zap2it
The program can be scraped based on the show identifer. Zap2it will work with all mythtv recordings, however it must be supplied a valid program id to get good information about a show
Code:
Program ID:      EP002298270048

If channel data is supplied, then the icon can be scraped from the channel listed on this site. Images for recordings could be provided this way assuming that nothing can be pulled from other resources.
http://tvlistings.zap2it.com/tvlistings/ZCGrid.do [Image: usa.gif]
example listing for zap2it.com
http://tvlistings.zap2it.com/tv/late-sho...EP00076838

tvguide.com is a bit difficult to navigate and may pose problems with scapers.
http://video.tvguide.com/SHOWS/Late%20Ni...0O%27Brien

The best one by far and easiest to get information from would be tv.com
http://www.tv.com/search.php?type=11&sty...South+Park
They have a pretty comprehensive listing of shows and very good data to work with.

Just pm me if I can be of any assistance with this project. I don't mind being given a task in the name of XBMC.

Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[Image: newsig-1.png]
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
find quote
sho Offline
Team-XBMC Member
Posts: 4,133
Joined: May 2004
Reputation: 3
Post: #5
This is definitely interesting, also do not let any other possible developments deter you, since IF they materialize they are probably at least several releases off. (Jonathan correct me if you see it differently).

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
pecinko Offline
Member+
Posts: 3,032
Joined: Dec 2008
Reputation: 27
Location: Prague / Belgrade
Thumbs Up    Post: #6
robweber Wrote: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.

Thanks for your effort, I really appreciate it. Here are few ideas, I hope they could be useful in remedying some of the problems you posted about. Could it help if this would be done in such a way that when you're adding item to DB you could have a choice to use source name as custom category:

[Image: picture1bv.png]

[Image: picture2qhn.png]

[Image: picture6gji.png]

Afterward, this category could be edited through existing library dialog (edit source), where you could again check radio button to use it as category, or you would leave it unchecked, which would remove it from library. Those dialogs already have option to change source name, so maybe problem with seting/renaming category name would be solved.

I'm not trying to be an ass but maybe adding two additional radio buttons:

- Create new genre
- Create new set

below 'create new library category' I suggested in a screenshot 2, could provide for a hassle-free way of using custom genres and sets, without a need for editing NFOs?

Final suggestion if you don't mind - if categories would end up as to hard to implement, please consider custom genres and sets as this would be very useful. Of course, if any of my ideas makes sense and you are willing to play with code some more.

Again, thanks for your efforts so far!

My skins:

Quartz
Amber
(This post was last modified: 2009-12-22 12:39 by pecinko.)
find quote
robweber Offline
Fan
Posts: 599
Joined: Sep 2009
Reputation: 15
Post: #7
thanks for the comments on here. There is a lot to think about and many different directions something like this could go.

I do think that there should be a separate node for categories (as suggested above). that way skinners could point submenus to the category node in a standard way, much like how you can jump to movie titles and movie genres directly.

I'm going to try to clean up a few things and will post the progress here. Eventually I'll get to making a trac for it as Jonathan mentions but I'd like to tinker with it for a while first.
find quote
robweber Offline
Fan
Posts: 599
Joined: Sep 2009
Reputation: 15
Post: #8
I've posted a trac ticket on this with a patch containing the changes you should need to get it working. If anyone is interested in testing this and providing feedback I'm willing to do some more work on it (within my C++ limits!).

http://trac.xbmc.org/ticket/8310
find quote
pecinko Offline
Member+
Posts: 3,032
Joined: Dec 2008
Reputation: 27
Location: Prague / Belgrade
Post: #9
Would it be to much to ask to upload patched XBMC somewhere (rapidshare, mediafire, dropbox...) so I can test? Preferably windows, but Mac or Linux will also do.

My skins:

Quartz
Amber
find quote
CrashX Offline
Posting Freak
Posts: 1,216
Joined: Jan 2009
Reputation: 2
Post: #10
Doesn't smart playlist do this ?

The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
find quote
Post Reply