Win Export playlist files
#1
Hi all,

My apologies in advance if this post is in the wrong location.

Here is my issue: from Kodi 15.0, I am trying to export playlist files to some external drive. For example, I create a smart playlist of music (e.g. recent electronic music ...) and want to copy all files corresponding to songs inside the playlist to some local folder. This thread (http://forum.kodi.tv/showthread.php?tid=153683) gave me hints but it does not seem to work. In the file manager, when I access the playing (i.e. when I enter the .xsp file), all items have 0 B size and I am unable to copy them.

Am I doing anything wrong? Is there maybe another way to do so? Please note that I am interested in being able to copy any kind of file (mp3, flac, mp4, mkv, etc).

Thank you in advance for your support.
Reply
#2
Press Win key + R:
Copy paste command: %appdata%\Kodi\userdata\playlists\
Hit Enter

This should take you to the storage for your playlist you created, they should be a rough 1kb file size for the .xsp you have (dependent on the number of items, rules, etc)

With the 0 file size, you can open the files in notepad/wordpad to see if there is any text inside and verify they are correct.
Reply
#3
Dear k4sh1n,

Thank you for your quick reply. I probably didn't express myself properly, sorry about that. What I meant is that, in the file manager, the song/movie file size is 0. Here is a screenshot of what I mean:

Image

FYI, my .xsp files do have 1kB size and work properly.

Cheers
Reply
#4
I see what your after..(ignore my prior post)

File manager is actually acting like an explorer view window.

If you've add a source directory it will show the contents and file size similar to MS Windows OS explorer.exe
If you click open a playlist, you are actually looking inside of that playlist at the text written, same as if you were to open the playlist in say notepad and see the text it has inside

As it is just text it has a nil value in size, due to no metadata/file properties to pull or get info from.



Hopefully this helps and I've not added to your/my confusion
Reply
#5
Dear k4sh1n,

Thanks for your message. You have indeed made it clearer. What you said does make sense. I had not thought about the issue that way.

Do you know if there is any way to achieve what I am trying to do though?

Thanks again for your help.
Reply
#6
Unfortunately there is no easy solution for what your after, I think it may not be possible/feasible or easily done with a smart-playlist as they are defined via syntax rules of operator and queries, not an actual file location/pathway.

The smart-playlist uses the syntax to pull from the KODI database/library the list of files and would need interpretation via .py as an add-on in KODI's interface. (You would need to get quite familiar with .json/python)

Alternately, with smart-playlist outside KODI's interface you could achieve via C or C++ and would also require SQL lite or similar to access the stored KODI databases and query the "path table of which "strPath" column contains the files pathway/URL, etc.

All in all, lots of effort for smart-playlists.

It may be more feasible/easier with a normal playlist of just individual queued files via a batch script (.bat file extension easily made in notepad).

Normal playlists do store in plain text the files pathway, so the script would just be a few simple expressions to copy and paste into another folder
(there script possibly would require the inclusion of a regex expression cleanstring to exclude the extra text present in the file path)

Quick use of copy paste .bat:

Code:
@echo off

    xcopy CopyFrom CopyTo

Replace "CopyFrom" with the name of the file or folder that you want to copy.
Replace "CopyTo" with the name of the destination folder.

There are probably more defined versions if you look on Google and tweak as required.
Still some effort required, but would be easier than the above.

Not the only way to go about this, but just my 2¢ as YMMV


(HTH give you some ideas)
Reply
#7
k4sh1n,

Thanks again for your help.

I was just confused because the thread I mentioned earlier seemed to say how easy it was to do so. I was surprised I wasn't able to get it to work and thought I was maybe doing something wrong or my setup had a problem.

Doing it with regular playlists doesn't really interest me. It is the fact of automatically retrieving movies that can be worthy. If I get some spare time, I will try to code some python add-on on my own. It probably wouldn't be too complicated once I get the basics of Kodi add-on writing. I'll definitely share it if I come up with something that works well Big Grin

Thanks again for your help!!
Reply
#8
Any luck with this?

I was using Mediamonkey and paid for both the pc gold version and the android pro version to get wifi sync of smart playlists. Worked ok but no auto sync and I much prefer using kodi for everything media related as mediamonkey isn't great as far as UI for a media center.

Very new to Kodi. Had xbmc way back on the original xbox and finally returning.

The great thing about mediamonkey for my movie syncing was that I could sync a smart playlist that was 20GB of the latest unplayed video files.

Was hoping to do this in kodi, including the play counts so if I watch on my tablet or on my pc the file would be marked as watched.

I'm guessing the original topic would cover this, although duplicate the files (copy to another folder) and then sync using a one way sync to android (file syncing or that folder) but sync the play count data to a central location so the pc smart playlist updates and the synces folder gets updated accordingly....

Thinking this is going to be very hard for a novice like me (idea of vba and Matlab but no experience at python to jump into something complex, as in it worth my effort at the current time)
Reply
#9
Hey Pete_Repeat,

Not really. Haven't had time yet to work on it. Sorry about that ...
Reply

Logout Mark Read Team Forum Stats Members Help
Export playlist files0