Re: Does PlaylistManager allow a plugin to 'monitor' a playlist folder?
lachlan-00 <[email protected]> Tue, 12 Dec 2017 16:00:38 +1000
| Newsgroups | gmane.comp.gnome.apps.rhythmbox.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============7844051992346075087== Content-Type: multipart/alternative; boundary="=-CmbuxA3yxATJ8eCY/ufY" --=-CmbuxA3yxATJ8eCY/ufY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit I've managed to corrupt my xml files a fair bit over the years so i always make a backup first now. ;) Thanks for sharing your plugin, editing the xml directly is fine and i can modify yours and my existing code to do what i want. Thank you -----Original Message----- Date: Mon, 11 Dec 2017 12:00:40 +0200 Subject: Re: [Rhythmbox-devel] Does PlaylistManager allow a plugin to 'monitor' a playlist folder? To: [email protected] From: Petko Ditchev <[email protected]> I believe that it's not possible via the PlaylistManager class, but you could use some other python library to watch the folder (I don't know which but I guess there is one out there). I've written an extension to pick a folder for playlists and then manually import or export from it, so if you want to add an auto sync functionality you can use that code. Beware though that it's very easy to corrupt your playlists when you automate the improt/export stuff because RB automatically removes songs from playlists if it doesn't find them (which doesn't normally happen but when you reorganize stuff or use other apps on your library it's a risk). Here's my plugin: https://gith ub.com/petko10/rhythmbox-plugin-playlists-import-export On 11/12/17 04:41, lachlan-00 wrote: > If it's possible I was going to write a plugin to allow the > following > > > > Pick a folder to store playlists (eg > ~/.local/share/rhythmbox/playlists) > When the plugin loads it will search that folder for > playlists. > Once m3u's are found either create or update playlists.xml > Add checks for mod time and a refresh button to preferences. > > > > Does RB.PlaylistManager.parse_file allow this? > > > > > > _______________________________________________ > rhythmbox-devel mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/rhythmbox-devel > > _______________________________________________ rhythmbox-devel mailing list [email protected] https://mail.gnome.org/mailman/listinfo/rhythmbox-devel --=-CmbuxA3yxATJ8eCY/ufY Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit <html><head></head><body><div>I've managed to corrupt my xml files a fair bit over the years so i always make a backup first now. ;)</div><div><br></div><div>Thanks for sharing your plugin, editing the xml directly is fine and i can modify yours and my existing code to do what i want.</div><div><br></div><div>Thank you</div><div><br></div><div>-----Original Message-----</div><div><br></div><div><b>Date</b>: Mon, 11 Dec 2017 12:00:40 +0200</div><div><b>Subject</b>: Re: [Rhythmbox-devel] Does PlaylistManager allow a plugin to 'monitor' a playlist folder?</div><div><b>To</b>: <a href="mailto:[email protected]">[email protected]</a></div><div><b>From</b>: Petko Ditchev <<a href="mailto:Petko%20Ditchev%20%[email protected]%3e">[email protected]</a>></div><!-- text/html --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <div class="moz-cite-prefix">I believe that it's not possible via the PlaylistManager class, but you could use some other python library to watch the folder (I don't know which but I guess there is one out there). I've written an extension to pick a folder for playlists and then manually import or export from it, so if you want to add an auto sync functionality you can use that code. Beware though that it's very easy to corrupt your playlists when you automate the improt/export stuff because RB automatically removes songs from playlists if it doesn't find them (which doesn't normally happen but when you reorganize stuff or use other apps on your library it's a risk). Here's my plugin: <a class="moz-txt-link-freetext" href="https://github.com/petko10/rhythmbox-plugin-playlists-import-export">https://github.com/petko10/rhythmbox-plugin-playlists-import-export</a><br> <br> On 11/12/17 04:41, lachlan-00 wrote:<br> </div> <blockquote type="cite" cite="mid:[email protected]" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"> <div>If it's possible I was going to write a plugin to allow the following</div> <div><br> </div> <div>Pick a folder to store playlists (eg ~/.local/share/rhythmbox/playlists)</div> <div>When the plugin loads it will search that folder for playlists.</div> <div>Once m3u's are found either create or update playlists.xml</div> <div>Add checks for mod time and a refresh button to preferences.</div> <div><br> </div> <div>Does RB.PlaylistManager.parse_file allow this?</div> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ rhythmbox-devel mailing list <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> <a class="moz-txt-link-freetext" href="https://mail.gnome.org/mailman/listinfo/rhythmbox-devel">https://mail.gnome.org/mailman/listinfo/rhythmbox-devel</a> </pre> </blockquote> <p><br> </p> <pre>_______________________________________________ rhythmbox-devel mailing list <a href="mailto:[email protected]">[email protected]</a> <a href="https://mail.gnome.org/mailman/listinfo/rhythmbox-devel">https://mail.gnome.org/mailman/listinfo/rhythmbox-devel</a> </pre></body></html> --=-CmbuxA3yxATJ8eCY/ufY-- --===============7844051992346075087== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rhythmbox-devel mailing list [email protected] https://mail.gnome.org/mailman/listinfo/rhythmbox-devel --===============7844051992346075087==--