[rhythmbox: 3/8] Submit listens for identified audio CDs



commit f8c4a7a88b4ff9006b5dec5b0035f69d1d98abb0
Author: Philipp Wolfer <phil parolu io>
Date:   Fri Apr 5 10:18:41 2019 +0200

    Submit listens for identified audio CDs
    
    Only supports audio CDs that have successfully been identified by MusicBrainz, as this means we can 
submit proper data and not just "Unknown".

 plugins/listenbrainz/listenbrainz.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/listenbrainz/listenbrainz.py b/plugins/listenbrainz/listenbrainz.py
index f815dc11a..40c1e42f7 100644
--- a/plugins/listenbrainz/listenbrainz.py
+++ b/plugins/listenbrainz/listenbrainz.py
@@ -143,9 +143,11 @@ def _can_be_listened(entry):
                      (title, category.value_name))
         return False
 
-    if entry_type.get_name() != "song":
-        logger.debug("Cannot submit listen%r: Entry type %s" %
-                     (title, entry_type.get_name()))
+    type_name = entry_type.get_name()
+    if  type_name != "song" and not (type_name.startswith("audiocd")
+        and entry.get_string(RB.RhythmDBPropType.MB_ALBUMID)):
+        logger.debug("Cannot submit listen %r: Entry type %s" %
+                     (title, type_name))
         return False
 
     if error is not None:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]