Re: Does PlaylistManager allow a plugin to 'monitor' a playlist folder?

Petko Ditchev <[email protected]> Mon, 11 Dec 2017 12:00:40 +0200
Newsgroups gmane.comp.gnome.apps.rhythmbox.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============2593715168268672218==
Content-Type: multipart/alternative;
 boundary="------------BB1E54D526F2B85F65F2EEE3"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------BB1E54D526F2B85F65F2EEE3
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

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://github.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



--------------BB1E54D526F2B85F65F2EEE3
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <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]">
      <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>
  </body>
</html>

--------------BB1E54D526F2B85F65F2EEE3--

--===============2593715168268672218==
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

--===============2593715168268672218==--