Adding Music Videos as a new menu item.
#1
I would like to add another video category as separate from movies. I know it has been done in confluence mods but I don't want to do that as I have already modified my confluence skin a great deal already to my liking. I tried just replicating the existing video menu item but all that does is replicate the existing one. I'm after the code modifications (additions?) required to just add it to my confluence.
Reply
#2
You need the button in home.xml with ActivateWindow(music-vids)...
See my git for the real code
- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#3
thanks mate, er, showing my complete ignorance here but where and what is your git? I mean, I know exactly what it means in English slang (I think I'm actually being one at the moment),
Reply
#4
github.com/mad-max

There you see my projects and their code...
Check skin.moddedconfluence/720p/home.xml for the code snippets you need
- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#5
Yes, found the 'activate windows' section:

<item id="17">
<label>40009</label>
<onclick>ActivateWindow(Videos,MusicVideoTitles,return)</onclick>
<icon>special://skin/backgrounds/musicvideos.jpg</icon>
<thumb>$INFO[Skin.String(Home_Custom_Back_MusicVideos_Folder)]</thumb>
<visible>!Skin.HasSetting(HomeMenuNoMusicVideosButton)</visible>
</item>
That label (40009) isn't recognized in confluence but no matter can easily be replaced with :

<label>Music Videos</label>
The real problem is that I have to folders on my NAS drive, one for movies and the other for music videos. When this window is activated it goes directly videos. If I try to only have the Music Video folder as the source and not the Movie folder then that is what appears in both - if I click videos or if I click music videos on the home page I always see the same thing. The ideal solution I think would be to have the ability to navigate to inside the folders and display either the movie genre folders or the music video genre folders by simply clicking movies or music videos
Reply
#6
Sorry but I don't get your point..
Did you already populate the music video section in the library?
- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#7
Yes, already populated. All I really want to do is have a button on the home screen, lets call it Videos that takes me directly to my movie folders and another one, called say, Music Videos, that takes me to my Music Video folders. In both cases those folders are genre folders. Now I tried just replicating the existing code:

<item id="2">
<label>3</label>
<onclick condition="!Skin.HasSetting(HomeVideostoFiles)">ActivateWindow(Videos)</onclick>
<onclick condition="Skin.HasSetting(HomeVideostoFiles)">ActivateWindow(Videos,Files,Return)</onclick>
<icon>special://skin/backgrounds/videos.jpg</icon>
<thumb>$INFO[Skin.String(Home_Custom_Back_Video_Folder)]</thumb>
<visible>!Skin.HasSetting(HomeMenuNoVideosButton)</visible>
</item>

and just changing the label so that I have:
<item id="2">
<label>Movies</label>
<onclick condition="!Skin.HasSetting(HomeVideostoFiles)">ActivateWindow(Videos)</onclick>
<onclick condition="Skin.HasSetting(HomeVideostoFiles)">ActivateWindow(Videos,Files,Return)</onclick>
<icon>special://skin/backgrounds/videos.jpg</icon>
<thumb>$INFO[Skin.String(Home_Custom_Back_Video_Folder)]</thumb>
<visible>!Skin.HasSetting(HomeMenuNoVideosButton)</visible>
</item>
This gave me two active buttons on the home screen and at the moment they quite obviously take me to the same place Smile. I figured that all I would have to do is somehow change the <oncondition=..... bits in each case so that it could navigate to the folders. I don't even know if this can be done
Reply
#8
First: do not use the ID of the button twice. It must be unique!
Second: It does the same because it is exactly the same code...
Third: It shouldn't be onclick condition but only onclick...

And why file mode? If you have already a source with content set as musicvideo and added to database, why file mode?

- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#9
Ok, so I need to create another ID, not sure how to do that, do I just use a number that hasn't been used yet? As for onclick condition? well it is a direct copy from the confluence home.xml but this is what I think I should do

If I create a button like so:
<item id="14">
<label>Music Videos</label>label>
<onclick>ActivateWindow(HuhHuhHuhHuhHuh)</onclick>
<icon>special://skin/backgrounds/MusicVideos.jpg</icon>
</item>
all I need to do is fill in the Huh?.... bit. At least I think that's what I need to do

Look maybe I'm out of my depth here and possibly what I want to do isn't possible. I think I made it pretty clear what I'm trying to achieve (2 buttons, one goes to movies, the other to music videos)
Reply
#10
(2012-08-05, 12:27)pan2 Wrote: Ok, so I need to create another ID, not sure how to do that, do I just use a number that hasn't been used yet?
Yep, just take 666 Big Grin as it should be a free ID...

(2012-08-05, 12:27)pan2 Wrote: If I create a button like so:
<item id="14">
<label>Music Videos</label>label>
<onclick>ActivateWindow(HuhHuhHuhHuh)</onclick>
<icon>special://skin/backgrounds/MusicVideos.jpg</icon>
</item>
all I need to do is fill in the Huh.... bit. At least I think that's what I need to do
Obviously you did NOT check the github page...otherwise you would have found:
Code:
<item id="17">
   <label>40009</label>
   <onclick>ActivateWindow(Videos,MusicVideoTitles,return)</onclick>
   <icon>special://skin/backgrounds/musicvideos.jpg</icon>
   <thumb>$INFO[Skin.String(Home_Custom_Back_MusicVideos_Folder)]</thumb>
   <visible>!Skin.HasSetting(HomeMenuNoMusicVideosButton)</visible>
</item>
So there is a
Code:
<onclick>ActivateWindow(Videos,MusicVideoTitles,return)</onclick>

(2012-08-05, 12:27)pan2 Wrote: Look maybe I'm out of my depth here and possibly what I want to do isn't possible. I think I made it pretty clear what I'm trying to achieve (2 buttons, one goes to movies, the other to music videos)
Nope...it is possible as Confluence has this onclick by default, just as a submenu...

Ouh, and BTW: You were not that clear...because you were speaking about a populated library and database paths and then from folder structures and file views...This is something totally different!!!

mad-max


- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#11
Thanks for all your assistance madmax. Either I'm too dumb or just not explaining myself well. In either case I'm just getting more confused so perhaps I'll leave this until I know a bit more. Thanks again
Reply
#12
(2012-08-06, 13:15)pan2 Wrote: Thanks for all your assistance madmax. Either I'm too dumb or just not explaining myself well. In either case I'm just getting more confused so perhaps I'll leave this until I know a bit more. Thanks again

Huh

You simply need to add the code from the page above to your home.xml...that's all...
No way, you give up now Big Grin

Code:
<item id="17">
   <label>Music Videos</label>
   <onclick>ActivateWindow(Videos,MusicVideoTitles,return)</onclick>
   <icon>special://skin/backgrounds/musicvideos.jpg</icon>
   <thumb>$INFO[Skin.String(Home_Custom_Back_MusicVideos_Folder)]</thumb>
   <visible>!Skin.HasSetting(HomeMenuNoMusicVideosButton)</visible>
</item>

That's all you need to do...
- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#13
bloody hell, it works Smile I was almost going to give up, but you didn't. Thanks so much. Come out to OZ and the beer is on me Smile
Reply
#14
(2012-08-06, 16:00)pan2 Wrote: bloody hell, it works Smile I was almost going to give up, but you didn't. Thanks so much.
Glad it's working now Smile
(2012-08-06, 16:00)pan2 Wrote: Come out to OZ and the beer is on me Smile
That's quite far from here Wink
But my reputation is thirsty, too Big Grin



- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply

Logout Mark Read Team Forum Stats Members Help
Adding Music Videos as a new menu item.0