Playlistwalker (a playlist generator script)
#1
Star 
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.

http://home.no.net/thor918/xbmc/playlistwalker.zip
Reply
#2
nothing i need but new scripts are always appreciated.

sounds more like it "crawls" than "walks" Confusedaint:
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
@pike
your right, it looks like a crawler Wink
the name is picked because of the phyton command for going trough folders and files  = os.walk
very logic  :p


-------------------------------------------------------
@all
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 :
walkthehd('e:\\music\\test',['mp3','avi','jpg','mpg','mov'])

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!
:p (the sharelib requier both values.don't ask me why)
Reply
#4
great script i have been looking for something like this. thanks!
Reply
#5
Information 
i'm glad at least one found it usefull Wink
Reply
#6
Question 
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.

thanks again!
Reply
#7
hi again.
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
walkthehd('e:\\music\\test',['mp3','avi','jpg','mpg','mov'])
(will add files with mp3,avi,jpg,mpg,mov but nothing else.)

i will checkit out. be right back
Reply
#8
Thumbs Up 
i added a new version now:
http://home.no.net/thor918/xbmc/playlistwalker2.zip

* 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)
Reply
#9
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. :p

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:
Reply
#10
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...
Reply
#11
if i logon ip 10.0.0.6(ip 10.0.0.6 has the computer name "thorsdata") by my windows pc:
i will see these folders
e
f
printers

so i want to playlist genereate f

this works for me :
walkthesmb('f\\','thorsdata', '10.0.0.6' , 'administrator' ,'password',['mp3','avi','jpg','mpg','mov'])



---------------------------------------------------------
the only down thing is that for a unknown reason the share lib by "michael teo " will only return (max 30 files and folders ) for each folder prossessed.


@EvilGoodGuy
i will see if i can add something for you.
be right back.
Reply
#12
thanks thor, it works a treat now. i was missing a colon after my user name. d'oh!
Reply
#13
Thumbs Up 
new version:
http://home.no.net/thor918/xbmc/playlistwalker3.zip

command looks like this now
cleanthehd(['e:\\music']) #removes all playlist it findes in it's path Wink

#          walkdirectory,storebigplaylistdirectory
walkthehd(['e:\\music','e:\\playlists'],['mp3','avi','jpg','mpg','mov'])
this coomand will crawl trough the walkdirectory, and add all to a big file.the playlist will be named after the walkdirectory folder.so there is a chance for overwriting, but this can be avoided by different startfolder(from walkdirectory) names.

(perhaps i will change the storebiglistdirectory to a path and filename. that way it will be easier to store lists without the chance for overwriting existing playlist in that folder.let me know what you think)

#                walkdirectory
#walkthehd(['e:\\music'],['mp3','avi','jpg','mpg','mov'])

#walkthesmb(['f\\musikk\\'],'computername', '10.0.0.6' , 'username ,'password',['mp3','avi','jpg','mpg','mov'])

@Tomkun
good to hear that you got it working  :d
Reply
#14
if there is any other tips or addons
for what you would like to see in this script i will do my best to add it Wink

perhaps there will be a gui for it someday.
Reply
#15
a small little test to show that the lib for smb will only return about 30 files and folders each time it is called.

#--------------------smbtest.py----------------------------
import os, sys, string, socket
import smb, nmb

netbios = nmb.netbios()
print 'connecting to share.............'

remote = smb.smb('computername' , '10.0.0.3' )
remote.login('administrator', 'password')

#list = remote.list_path('share','folder\\/*.*')
list = remote.list_path('c','musikk\\/*.*')
print "total files found " + str(len(list))
#----------------------------------------------------

this has the same result on query of a smb share running on a win2000,winxp.
i did the test from xbox and win2000. same results.

the folder musikk has 50 files, and the smblib will return a total of 32 files. perhaps somebody else can nag the author about it.
Reply

Logout Mark Read Team Forum Stats Members Help
Playlistwalker (a playlist generator script)0