[TIP] HOW-TO workaround separating (example) your Music DVD's from your Movie Library

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dasim Offline
Junior Member
Posts: 3
Joined: Dec 2008
Reputation: 0
Location: Portugal
Post: #1
Hi,

As many users, I miss the flexibility of Meedio that allowed us to freely define views and libraries of our media. For instance, it was very easy to setup menu options for Music DVD's, documentaries, home movies, adult films, etc.

While similar capabilities are not (yet) available to XBMC, I wrote a quick hack that allows me to hide genres that I don't want to be shown in the normal movie view (what you get when you hit return in Movies in the main menu). This way I can set up favorites for those 'special' genres (in this case Music DVD's), and hide them when I'm browsing my movies in library view.

If you want to try this, you'll have to compile XBMC from SVN, adding this line of code to Videodatabase.cpp:

Code:
else where = FormatSQL("join genrelinkmovie on genrelinkmovie.idmovie=movieview.idmovie join genre on genrelinkmovie.idgenre=genre.idgenre where genre.strGenre<>'Music Performance'");

The line above should be added just before the return sentence in function CVideoDatabase::GetMoviesNav
Of course, you should replace 'Music Performance' by whatever name you use to call your music dvd's. Other genres could easily be added to the filter.

After adding the line and saving, compile XBMC as usual and enjoy!Big Grin


How it works:
in my VERY limited (as in none) knowledge of xbmc code, I believe GetMoviesNav is called everytime the user selects a movie view in a menu option. According to the user's choice, the function builds an appropriate WHERE string and passes it to GetMoviesByWhere, which then applies it to he movieview db view.
When there are no filters in the user request, control falls through the IF and no where string is generated before GetMoviesByWhere gets called. That's where the hack steps in, by creating a where clause that filters out the unwanted genres.


A (way) better way of doing this would be to add a new field "Visible" to the genre table, and build the query based on that. Users would have an option in Video Settings to manage genre visibility. If changing the data model is unwanted, maybe the same goal could be achieved by using simple strings in Settings, and passing them to the query. Of course, this goes beyond my knowledge of the code, so I'm saying this as a kind of request in hope that some willing developer finds this idea useful Wink

Cheers,
David
(This post was last modified: 2009-06-08 05:08 by dasim.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 176
Post: #2
A smartplaylist could also be used to do that, with no code changes.

Only disadvantage is you have to go into playlists to get to it.

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
dasim Offline
Junior Member
Posts: 3
Joined: Dec 2008
Reputation: 0
Location: Portugal
Post: #3
Yeap, but if you use a playlist you would still get all the movies when you choose Movies in the menu - that's what I was trying to avoid.

This way we completely separate Music DVD's from the actual movie collection - when I select Movies in the menu I get only my movies, without my concerts mixed in.

Thanks for looking into this Smile


1 more thing - could you please change "Movie DVD's" in the thread title to "Music DVD's" (my bad, sorry)
find quote
dasim Offline
Junior Member
Posts: 3
Joined: Dec 2008
Reputation: 0
Location: Portugal
Post: #4
Following jmarshall's idea of using smartplaylists, I managed to achieve what I proposed above, with no code changes necessary.

The alternate method works as follows (using the same example):
1. Create a smartplaylist in the video section that filters out Music DVD's (I named the file "MoviesWithoutMusicPerformances.xsp")
2. Edit your skin of choice's home.xml, and replace the action in my movies button with:
Code:
<onclick>XBMC.ActivateWindow(MyVideoLibrary,special://profile/playlists/video/MoviesWithoutMusicPerformances.xsp,return)</onclick>


3. Now your concerts will not be shown when you're browsing your movie collection. You can reach them by using favorites or browsing genres. Enjoy!


Hope this is useful for someone, I will provide further details if need be.


Cheers,
David
(This post was last modified: 2009-06-17 05:11 by dasim.)
find quote
MARKD1505 Offline
Junior Member
Posts: 17
Joined: Dec 2009
Reputation: 0
Post: #5
hiu guys can anyone help me trying to configure hdmi audio
find quote
JiiJii Offline
Junior Member
Posts: 23
Joined: Apr 2011
Reputation: 0
Post: #6
dasim Wrote:Following jmarshall's idea of using smartplaylists, I managed to achieve what I proposed above, with no code changes necessary.

The alternate method works as follows (using the same example):
1. Create a smartplaylist in the video section that filters out Music DVD's (I named the file "MoviesWithoutMusicPerformances.xsp")
2. Edit your skin of choice's home.xml, and replace the action in my movies button with:
Code:
<onclick>XBMC.ActivateWindow(MyVideoLibrary,special://profile/playlists/video/MoviesWithoutMusicPerformances.xsp,return)</onclick>


3. Now your concerts will not be shown when you're browsing your movie collection. You can reach them by using favorites or browsing genres. Enjoy!


Hope this is useful for someone, I will provide further details if need be.


Cheers,
David

Does this work with Dharma? I didn't get it to work. I'm using Windows 7.
find quote
newphreak Offline
Donor
Posts: 180
Joined: Oct 2010
Reputation: 0
Location: sofa @ Norway
Post: #7
Haha, i can't believe how old this thread really was. However it made me want to poke around about this. And i found in Aeon Nox you can use favourites.xml to adjust defaults on menubuttons. I haven't looked at it in Confluence, but i would assume it's about the same there. Oh, and i use EDEN, so this might not be possible for you.

So i created smart playlists excluding and including it how i wanted.

Then added the one with just movies to favourites.xml

Then found these options in Aeon Nox.
[Image: ENShG.jpg]
[Image: uqWFS.jpg]
[Image: x1VeI.jpg]

I can probably clean this up and see if it's the same for confluence if a howto is wanted.

Samsung ES7005 55" led tv - Denon AVR-3313 - NAD C275BEE - B&W DM683 - B&W HTM61 - B&W 686
Asus EB1501P ION2 - OCZ Vertex 2 64gb ssd - Built in IR Receiver
And a Logitech Harmony Touch to control it all. http://www.OpenELEC.tv
find quote
JiiJii Offline
Junior Member
Posts: 23
Joined: Apr 2011
Reputation: 0
Post: #8
Is there a better solution? All Ï want is that I can exclude stuff from my movies library.
find quote
newphreak Offline
Donor
Posts: 180
Joined: Oct 2010
Reputation: 0
Location: sofa @ Norway
Post: #9
JiiJii Wrote:Is there a better solution? All Ï want is that I can exclude stuff from my movies library.
Depends on what skin you use. As far as i can see this is not possible at all in confluence. I use Aeon nox, and there it's possible. I'm sure allot of other skins also has this feature.

Samsung ES7005 55" led tv - Denon AVR-3313 - NAD C275BEE - B&W DM683 - B&W HTM61 - B&W 686
Asus EB1501P ION2 - OCZ Vertex 2 64gb ssd - Built in IR Receiver
And a Logitech Harmony Touch to control it all. http://www.OpenELEC.tv
find quote