• 1
  • 4
  • 5
  • 6
  • 7
  • 8(current)
Is this advanced Home Screen View Mod function idea possible in XBMC Skinning-Engine?
Nuka1195: You're stripping the user and pass off of smb:// urls at the end of _getmedia. Not sure why exactly - XBMC doesn't do this. If the user and pass are in the db, then the computation for the thumb includes them.

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
Reply
@buges, you already can on .Title and .ShowTitle.

@jmarshall, fixed, i had to remove username/password in the HT plugin (i thought) to get it to work. not sure why.

i did notice i had to manually add the username/password in sources.xml for it to be in the db. where are they saved? without manually adding it in. the path in the db did not have them, but still worked.

http://xbmc-addons.googlecode.com/svn/pa...lyAdded.py
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
Thanks! It usually uses the default username and password from Settings->Network->SMB Client if it's not specified.

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
Reply
here is the code i'm using to get the extra library information (totals) for Movies, TV Shows, and Music

i'm not 100% sure it's the best way to do it but it works Smile

i added this code to my Recently added.py
PHP Code:
def __init__self ):
        
self._fetch_totals() 
PHP Code:
def _fetch_totalsself ):
        
# query the database
        
movies_count_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plus"select COUNT(*) from movieview" ), )
        
movies_played_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plus"select COUNT(*) from movieview where playCount is not null" ), )
        
episodes_count_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plus"select COUNT(*) from episodeview" ), )
        
episodes_played_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plus"select COUNT(*) from episodeview where playCount is not null" ), )
        
tvshows_count_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plus"select COUNT(DISTINCT strTitle) from episodeview" ), )
        
songs_count_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plus"select COUNT(*) from songview" ), )
        
songs_artist_count_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plus"select COUNT(DISTINCT idArtist) from songview" ), )
        
album_count_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plus"select COUNT(DISTINCT idAlbum) from albumview" ), )
        
album_artist_count_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plus"select COUNT(DISTINCT idArtist) from albumview" ), )
        
# separate the records
        
movies_count movies_count_xml.replace('<record><field>','').replace('</field></record>','')
        
movies_played movies_played_xml.replace('<record><field>','').replace('</field></record>','')
        
episodes_count episodes_count_xml.replace('<record><field>','').replace('</field></record>','')
        
episodes_played episodes_played_xml.replace('<record><field>','').replace('</field></record>','')
        
tvshows_count tvshows_count_xml.replace('<record><field>','').replace('</field></record>','')
        
songs_count songs_count_xml.replace('<record><field>','').replace('</field></record>','')
        
songs_artist_count songs_artist_count_xml.replace('<record><field>','').replace('</field></record>','')
        
album_count album_count_xml.replace('<record><field>','').replace('</field></record>','')
        
album_artist_count album_artist_count_xml.replace('<record><field>','').replace('</field></record>','')
        
# set properties
        
self.WINDOW.setProperty"Movie.Count" movies_count )
        
self.WINDOW.setProperty"Movie.Played" movies_played )
        
self.WINDOW.setProperty"Episodes.Count" episodes_count )
        
self.WINDOW.setProperty"Episodes.Played" episodes_played )
        
self.WINDOW.setProperty"TVShows.Count" tvshows_count )
        
self.WINDOW.setProperty"Songs.Count" songs_count )
        
self.WINDOW.setProperty"Songs.ArtistCount" songs_artist_count )
        
self.WINDOW.setProperty"Album.Count" album_count )
        
self.WINDOW.setProperty"Album.ArtistCount" album_artist_count 
Image
Reply
PHP Code:
select COUNT(movie.idfile), COUNT(files.playcount>0from movie join files on (movie.idFile files.idFile

nice,

with my limited testing. the above should be faster. you're only making one call for both total and number played.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
thanks Nuka 1195

here is my new code
PHP Code:
def _fetch_totalsself ):
        
# query the database
        
movies_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plus"select COUNT(movie.idfile), COUNT(files.playcount>0) from movie join files on (movie.idFile = files.idFile)" ), )
        
episodes_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plus"select COUNT(DISTINCT strTitle), COUNT(*), COUNT(playCount>0) from episodeview" ), )
        
songs_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plus"select COUNT(*), COUNT(DISTINCT idArtist) from song" ), )
        
album_xml xbmc.executehttpapi"QueryMusicDatabase(%s)" quote_plus"select COUNT(DISTINCT idAlbum), COUNT(DISTINCT idArtist) from albumview" ), )
        
# separate individual fields
        
movies_fields re.findall"<field>(.*?)</field>"movies_xmlre.DOTALL )
        
episodes_fields re.findall"<field>(.*?)</field>"episodes_xmlre.DOTALL )
        
songs_fields re.findall"<field>(.*?)</field>"songs_xmlre.DOTALL )
        
album_fields re.findall"<field>(.*?)</field>"album_xmlre.DOTALL )
        
# set properties
        
self.WINDOW.setProperty"Movie.Count" movies_fields [0] )
        
self.WINDOW.setProperty"Movie.Played" movies_fields [1] )
        
self.WINDOW.setProperty"Episodes.Count" episodes_fields [1] )
        
self.WINDOW.setProperty"Episodes.Played" episodes_fields [2] )
        
self.WINDOW.setProperty"TVShows.Count" episodes_fields [0] )
        
self.WINDOW.setProperty"Songs.Count" songs_fields [0] )
        
self.WINDOW.setProperty"Songs.ArtistCount" songs_fields [1] )
        
self.WINDOW.setProperty"Album.Count" album_fields [0] )
        
self.WINDOW.setProperty"Album.ArtistCount" album_fields [1] ) 
Image
Reply
http://xbmc-addons.googlecode.com/svn/pa...lyAdded.py

i added them to the script on svn, with some changes. the property names are below.

pass "totals=True" without quotes in RunScript(pathtoscript,totals=True)

visible conditions:
!IsEmpty(Database.Totals) for the main check

you can use !StringCompare(Movie.Count,0) eg to hide the different sections.

PHP Code:
self.WINDOW.setProperty"Database.Totals""true" )
        
# set properties 
        
self.WINDOW.setProperty"Movies.Count" movies_totals] )
        
self.WINDOW.setProperty"Movies.Watched" movies_totals] )
        
self.WINDOW.setProperty"Movies.UnWatched" strintmovies_totals] ) - intmovies_totals] ) ) )
        
self.WINDOW.setProperty"MusicVideos.Count" mvideos_totals] )
        
self.WINDOW.setProperty"MusicVideos.Watched" mvideos_totals] )
        
self.WINDOW.setProperty"MusicVideos.UnWatched" strintmvideos_totals] ) - intmvideos_totals] ) ) )
        
self.WINDOW.setProperty"TVShows.Count" tvshows_totals] )
        
self.WINDOW.setProperty"TVShows.Watched" tvshows_totals] )
        
self.WINDOW.setProperty"TVShows.UnWatched" strinttvshows_totals] ) - inttvshows_totals] ) ) )
        
self.WINDOW.setProperty"Episodes.Count" tvshows_totals] )
        
self.WINDOW.setProperty"Episodes.Watched" tvshows_totals] )
        
self.WINDOW.setProperty"Episodes.UnWatched" strinttvshows_totals] ) - inttvshows_totals] ) ) )
        
self.WINDOW.setProperty"Music.SongsCount" music_totals] )
        
self.WINDOW.setProperty"Music.AlbumsCount" music_totals] )
        
self.WINDOW.setProperty"Music.ArtistsCount" music_totals] ) 
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
There's already Library.HasMovies etc. available internally.
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
is there any way i could add "ListItem.Trailer" to the list so we can play the trailer on the home page ?

because i don't know how to edit the script to enable this. any help would gratefully received.
Reply
PHP Code:
[RecentlyAdded]
-
added: .Trailer property to movies
-addedpassing trailer=True to script sets .Path to the trailer (if available

http://xbmc-addons.googlecode.com/svn/pa...lyAdded.py
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
Guys (python scripters and skilled skinners) checkout the very much related discussion here:
http://forum.xbmc.org/showthread.php?tid=55490

Wink
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.
Reply
Is there a way of removing items from the list if you've watched them?
Reply
http://forum.xbmc.org/showthread.php?tid=55907

look at all the params you can pass.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8(current)

Logout Mark Read Team Forum Stats Members Help
Is this advanced Home Screen View Mod function idea possible in XBMC Skinning-Engine?1