MythMusic Playlist import?
Moderator: Forum Moderators
MythMusic Playlist import?
Is it possible to import a playlist from another system ie I have all my favorite playlists set on WinAmp can I some how import this to MythMusic as I don't really want to repeat this process every time I update it .
Re: MythMusic Playlist import?
There is nothing built into MythMusic to do this. There are a few scripts around that can import playlists from iTunes not sure about WinAmp though. How does WinAmp store the playlist?
Re: MythMusic Playlist import?
I think WinAmp can same playlist in the following formats: M3U, PLS, M3U8, but can you point to those iTunes scripts perhaps I can hack those to suit ..
Re: MythMusic Playlist import?
This is one linked to from the MythMusic wiki page I've no idea if it still works or if it ever worked
http://www.weezey.com/2008/05/itunes-pl ... in-mythtv/
Importing playlists from M3U or PLS files should be possible but wont be straight forward. The playlists in MythMusic are just a comma separated list of track id's stored in a row in the music_playlists table. The id's match the song_id stored in the music_songs table. You would have to read the playlist file and lookup the song_id for each track based on the title and/or the filename stored in the playlist file to construct the comma separated list of id's.
http://www.weezey.com/2008/05/itunes-pl ... in-mythtv/
Importing playlists from M3U or PLS files should be possible but wont be straight forward. The playlists in MythMusic are just a comma separated list of track id's stored in a row in the music_playlists table. The id's match the song_id stored in the music_songs table. You would have to read the playlist file and lookup the song_id for each track based on the title and/or the filename stored in the playlist file to construct the comma separated list of id's.
Re: MythMusic Playlist import?
hmm perhaps there needs to be a exposed API for MythMusic for this situation..
So now looks like need to build one from scratch as that script is syncing files as well..
So now looks like need to build one from scratch as that script is syncing files as well..
Re: MythMusic Playlist import?
Before I start any advice on how this script should read or write to the mythtv database?
Ie if I use perl do i need to use api or just use raw SQL?
Ie if I use perl do i need to use api or just use raw SQL?
Re: MythMusic Playlist import?
ok I have created a row in the db table music_playlists but it doesn't show in the mythtv Frontend?
Re: MythMusic Playlist import?
We generally advise against using raw SQL, there are plans to use an embedded database that would likely remove direct DB access anyway. Having said that there is no built in API to do what you want. The python bindings would be one way to go since they are the most complete and can be easily extended but you would have to speak to Raymond about that.mtrax wrote:Before I start any advice on how this script should read or write to the mythtv database?
Ie if I use perl do i need to use api or just use raw SQL?
If I was doing it I would probably add something to the MythMusic plugin directly to import the playlists using the existing classes. There is stuff in there to parse the PLS and M3U playlists as well as create playlists and reload them etc the only bit missing is finding the song_id from the info in the playlist file.
At the moment if you change the playlist externally you would have to restart the frontend for the playlists to be reloaded.mtrax wrote:
ok I have created a row in the db table music_playlists but it doesn't show in the mythtv Frontend?
Re: MythMusic Playlist import?
At some point I'm going to be expanding the Services API to include options for MythMusic. However I don't have a timeframe in mind.
Re: MythMusic Playlist import?
Great, I've completed my script and works well albeit using direct SQL to create playlist. So this will do me for now.
Just on a side note switching playlist is a bit non intuitive but I eventually found out how
Thanks
Paul
Just on a side note switching playlist is a bit non intuitive but I eventually found out how
Thanks
Paul
Re: MythMusic Playlist import?
I would suggest to try "MusConv" tool.