Posts: 186
Joined: Apr 2006
Reputation:
0
DrDDT
Senior Member
Posts: 186
Is it possible to somehow use custom categories?
The reason I'm still using file view, is that I cannot sort movies/series the way I want.
It would be nice if I could add one or more categories to a library item and sort by that category.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
possible, sure. if somebody do the code. (it won't be me as i have no use for it)
Posts: 186
Joined: Apr 2006
Reputation:
0
DrDDT
Senior Member
Posts: 186
The current library nodes are essentially a SQL query to one of the databases, with added logic, is it not?
For me, it would be a great addition to the library to be able to add a node, just like the 'add source' button in file mode.
The 'add node' button could then provide a menu where the user can enter a sql query, something like 'select * from videodb where genre='western' and year > 1950', or provide a easy select menu for people without sql knowledge.
The results can then be saved in a sources.xml like file, and automaticcally loaded the next start of XBMC.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
2008-06-16, 15:47
(This post was last modified: 2008-06-16, 15:50 by kraqh3d.)
they are basically ad-hoc queries. it's rather powerful. i just cross-reference the types with allowed fields. (the fields are self explanatory). i would be grateful if someone would put add this to the wiki for reference.
1) type="songs"
genre
album
artist
albumartist
title
year
time
tracknumber
filename
playcount
lastplayed
rating
comment
playlist
2) type="albums"
genre
album
artist
albumartist
year
review
themes
moods
styles
type
label
rating
playlist
3) type="tvshows"
tvshow
plot
status
votes
rating
year
genre
director
actor
numepisodes
numwatched
playcount
playlist
4) type="episodes"
episodetitle
plot
votes
rating
time
writers
airdate
playcount
genre
year
director
actor
episode
season
playlist
5) type="movies"
title
plot
plotoutline
tagline
votes
rating
time
writers
playcount
genre
year
director
actor
mpaarating
top250
studio
playlist
6) type="musicvideos"
title
genre
album
year
artist
filename
playcount
time
director
studio
plot
playlist
(the "playlist" field is special. it's used to combine smart playlists together for advanced queries.)
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
yeah, that's a bit of an annoyance. when you open a playlist, xbmc loads it into the now playing window which is skinned differently, and the views are part of the skin. personally, i think smartplaylists should be treated as directories so that you remain in the library. in additional to the playlists node, a smart playlists node could be added which only shows the xsp files and handles them like folders.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
the only reason it would be loading it into now playing and switching to that window is if you treat playlists as files, a "feature" i've wanted to take out for a while....
if you aren't able to use them views, it might be the fact that they are based on container.content and i guess that might not be set correctly for the xsp or something
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Yeah, I can't remember if I made 'em set content or not, though it sounds like something I would have remembered to do, but who knows.
And obviously I always have "Treat playlists as folders" turned on, given that it's the only sane way to do things :p
Cheers,
Jonathan
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
I checked last night. The "FileDirectory" factory treats xsp's as folders so they shouldn't be loaded into the Now Playing window and there are view states for Smart Playlist folders based on the content type.