Mtv get lost - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Mtv get lost (/showthread.php?tid=13768) |
- aNtiBiOteK - 2005-07-26 hi, i just made the startupvideodir plugin who's purpose is to start up videos from a folder on your xbox every time you boot up. thereby eliminating the need for mtv and all that other nonsence. it can be found here: http://www.xbmcscripts.com/index.p....ideodir now here is my question. i'm trying to make it not go full screen on boot. cause the videos load, and everything is good. except i still want to see the xbmc in the interface and videos play in the background instead of going full screen every time. how can i do that? antibiotek. - pike - 2005-07-26 this is python related right? ok, so im moving it to right forum - Nuka1195 - 2005-07-26 xbmc.executebuiltin('xbmc.activatewindow(0)') - aNtiBiOteK - 2005-07-27 thanks, that works but only for the fist video, when the next video turns on.. it goes full screen again. antibiotek - bozo8787 - 2005-08-01 (antibiotek @ july 26 2005,21:55 Wrote:hi,your a bad ass cause my girl and i have been talking about this for months now. at least i want what u did get to work. here's my settings: where did i go wrong? could u post ur details so i can compare? thanx in advance. ''' vim: ts=8 sw=4 noexpandtab by: antibiotek ver: 0.1 original script by rune hammersland ver: 0.3 this script is for those of you who love to turn on your xbox and watch music vidoes in the morning. it will take a playlist or a music video directory, randomize all the videos, and play them. be sure to modify your autoexec.py to start it up! ''' import xbmc import os # ---------------------------------------- # # "configuration" # ---------------------------------------- # # change this to your playlist(s). # written like this: ['path\\to\\plist1', 'to\\plist2', 'plist\\3'] playlist_files= ['e:\\media\\music\\playlist.m3u', 'f:\\all.m3u'] # dirs(s) to traverse if playlist does not exist. nb: no trailing slash. # written like this: ['path\\to\\dir1', 'to\\dir2', 'dir\\3'] musicvideos_dirs = ['q:\\scripts\\', 'f:\\media\\musicvideos'] # shuffle playlist if this var equals 1. shuffle_files = 1 # ---------------------------------------- # # code # ---------------------------------------- # # function for adding files to playlist def add_files(pl, dirname, names): for filename in names: if (os.path.isfile(dirname + "\\" + filename)): add = 0 # check extension of file. if (filename[-4:] == ".avi"): add = 1 if (filename[-4:] == ".mpg"): add = 1 if (filename[-4:] == ".wmv"): add = 1 if (filename[-4:] == ".asf"): add = 1 if (filename[-4:] == ".m2v"): add = 1 # if file is to be added, do it. if (add == 1): pl.add(dirname + "\\" + filename) elif (os.path.isdir(dirname + "\\" + filename)): os.path.walk(dirname + "\\" + filename, add_files, pl) # get music playlist from xbmc plist = xbmc.playlist(0) plist.clear() # load playlist if it exists for playlist_file in playlist_files: if (os.path.isfile(playlist_file)): plist.load(playlist_file) # else, find all available music videos else: for musicvideos_dir in musicvideos_dirs: os.path.walk(musicvideos_dir, add_files, plist) # do the shuffle! if (shuffle_files == 1): plist.shuffle() xbmc.player().play(plist) xbmc.executebuiltin('xbmc.activatewindow(0)') and in my autoexec.py where: # auto execute scripts when xbmc starts, place this file in xbmchome\scripts\ # # note: - do not execute more than one script at a time which asks for user input! # import xbmc xbmc.executescript('q:\\scripts\\startup_video.py') - bozo8787 - 2005-08-01 (antibiotek @ july 26 2005,21:55 Wrote:hi,more on the topic. i love when playing a video in the background also as opposed the entire screen. what was the difference between yours and rune hammersland ver: 0.3 also if you get a chance go here at xbox-scence where someone combined videos or music at startup. http://forums.xbox-scene.com/index.p....2820112 btw. all i could get to work was by editing: musicvideos_dirs = ['q:\\scripts\\', 'f:\\media\\musicvideos'] it does boot to some animae video for several seconds then it loads the "loading next video" and it repeats this over and over until i stop it. originally i thought it would have to be like: musicvideos_dirs = ['q:\\scripts\\launchbrowser.py\\favourites.xml', but that does nothing. thanx way in advance for i have been wishing for this script b4 it was written cause untill now i've been successful with auto loading my music files - aNtiBiOteK - 2005-08-03 i think you need to specify a directory with all your music videos like f:\media\musicvideos - pike - 2005-08-03 bozo8787, bold is to mark certain words, not for entire posts. please refrain from using it on entire posts. tia - bozo8787 - 2005-08-03 (pike @ aug. 03 2005,06:48 Wrote:bozo8787,my bad, i been posting in all bold for over 5 years now in many forums, and i've never had anyone actually tell i to stop writing in bold. i always agreed with peeps flaming others with all caps was used completely. so this is new to me, well i actually had someone over in the tivo forums tell me it strainded their eyes so when i go there i kinda withhold my trademark. i c u have almost 2000 posts so this is pretty much your domain :bowdown: thus i will adhere to your request and in this forum i will change my style. i love the xbox scence and enemies is the last thing i want over a habit i picked up 1/2 a decade ago. thruth be told i can't stand plain old non-bold, to me it looks vanilla and i just wanted to add some color and seperate myself without yelling. btw, i thought i knew the net etiquete until now, i stand corrected. - bozo8787 - 2005-08-03 (antibiotek @ aug. 03 2005,05:34 Wrote:i think you need to specify a directory with all your music videos like f:\media\musicvideoswell i actually don't have any music videos. all i have is a favorites list from "launchbrowser" cause as of now i have over 300 on a favorites list on launch browser and when i select the list it randomly streams them over for hours. so i can c this is for actual video files on your hdd. i got confused with the playlist thing. cause i technically have a playlist but from streamed vids only. thanx for the response though. ps i'm trying to be good aint: but this is gonna be hard to leave my :evil:boldness at the door when i enter this forum, i'm already getting withdrawl symptoms plus i'm feeling so plain but guess i'll just get used to it, lol - rcrh - 2005-08-13 first, let me say i've been looking for something like this for a very long time. i don't want it for quite the same purpose, but very close. i've got tonnes of tv episodes stored on a server, and i want to be able to play then in a random order. sort of like syndicated tv. you can get rid of mtv, & i'll get rid if tbs! so, i want to edit your scirpt so that musicvideos_dirs points to where i have a particular show storied. then, when i run the script it should queue up all of the episode, but in a random order. so far, so good. but, i've not replaced the hd in my xbox so all of my media is on a server. i can't figure out syntax that the script needs to be able to find the files on my server. antibiotek, can you help? thanks a tonne. hope you get back to me on this. richard |