Playlistwalker (a playlist generator script) - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: Playlistwalker (a playlist generator script) (/showthread.php?tid=10040)
- thor918 - 2005-02-16 23:30
it walks trough folders on harddrive or a network share,
while it walks it generates a 'playlistwalker.m3u' file in each folder.
the playlist that is generated can consist of 'mp3','avi','jpg' or whatever.
hope this script will get more comments than my first script.
- pike - 2005-02-17 00:37
nothing i need but new scripts are always appreciated.
sounds more like it "crawls" than "walks" :saint:
- thor918 - 2005-02-17 21:58
your right, it looks like a crawler
the name is picked because of the phyton command for going trough folders and files = os.walk
to use the script you will have to copy lib files and extract them to the phyton lib directory on xbmc.
then extract the playlistwalker.py to scripts directory on xbmx.
after this you will have to add walk commands at the bottom of the playlistwalker.py script.
the command looks like this
if you want to crawl the harddrive of the xbox :
if you want to crawl a network share:
walkthesmb('share\\folder\\','computername', '10.0.0.6' , 'username' ,'password',['mp3','avi','jpg','mpg','mov'])
and remember to enable write premissions on the share.
you look at the share crawl command and say, is it really nesseasary to have both computername and ipadress.
then i say yes!
(the sharelib requier both values.don't ask me why)
- deemeph - 2005-02-18 00:53
great script i have been looking for something like this. thanks!
- thor918 - 2005-02-22 02:54
i'm glad at least one found it usefull
- deemeph - 2005-02-28 00:42
okay this is great, but i have 2 comments, one would it be possible to name the playlist the same as the folder? and also i have a folder.jpg in each of my music folders (and some video but i use this script for music only) and i get the folder.jpg in each playlist not a big deal but if you could put something in to ignore these, also <filename>.tbn
other then that this is perfect, did about 500 music album folders in 2mins with no problems.
- thor918 - 2005-02-28 03:24
name the playlist the same as the folder. yes
> ignore these, also <filename>.tbn
but it sholdn't add tbn files unless it is specified
(will add files with mp3,avi,jpg,mpg,mov but nothing else.)
i will checkit out. be right back
- thor918 - 2005-02-28 06:36
i added a new version now:
* discard folder.jpg
* added foldername in progressdialog
* added a variable to choose from [foldername].m3u or playlistwalker.m3u
(if we are walking in the root the playlist will be playlistwalker.m3u always)
- EvilGoodGuy - 2005-03-04 03:13
first off great script. but i was wondering if you would help me with a few slight modifications. i'm not to good with advanced python so i can't do it myself.
1.) i would like to save the playlists named as the folder they were originated in in the designated playlist area so that a randomplaylist chooser can pick them out easily. i just didn't know where exactly in the write command the destination folder was.
2.) i have all of my music in a f:/mp3/artist/album format. could you possibly alter your code for me so that it will walk into each artist folder forming only one playlist containing all albums? i tried doing this myself, but ran into problems where it would just be overwritting the previous foler's playlist instead of adding to it.
if you could do this that would be wonderful, if not then no problem at all. thanks for the script so far, and i hope you have time for this modification :bowdown:
- Tomkun - 2005-03-04 15:45
i can't get this to work with my smb shares... what could i be doing wrong? can someone give me an example of how to edit the script properly? perhaps i did it wrong...