[TIP] HOW-TO workaround separating (example) your Music DVD's from your Movie Library
#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
Reply
#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
Reply
#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)
Reply
#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
Reply
#5
hiu guys can anyone help me trying to configure hdmi audio
Reply
#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.
Reply
#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
Image
Image

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
Intel NUC D34010WYK - 128GB Crucial ssd, Built in IR Receiver
And a Logitech Harmony Touch to control it all. https://libreelec.tv
Retired: Asus EB1501P ION2 - OCZ Vertex 2 64gb ssd - Built in IR Receiver
Reply
#8
Is there a better solution? All Ï want is that I can exclude stuff from my movies library.
Reply
#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
Intel NUC D34010WYK - 128GB Crucial ssd, Built in IR Receiver
And a Logitech Harmony Touch to control it all. https://libreelec.tv
Retired: Asus EB1501P ION2 - OCZ Vertex 2 64gb ssd - Built in IR Receiver
Reply

Logout Mark Read Team Forum Stats Members Help
[TIP] HOW-TO workaround separating (example) your Music DVD's from your Movie Library0