After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 534062 - [ Python Interface ] RhythmDBEntryType attributes are missing.
[ Python Interface ] RhythmDBEntryType attributes are missing.
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Programmatic interfaces
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-20 14:48 UTC by Mats Taraldsvik
Modified: 2008-06-08 06:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
adds the save_to_disk attribute to RhythmDBEntryType (453 bytes, patch)
2008-05-20 18:39 UTC, Mats Taraldsvik
none Details | Review
adds read/write in Python to attribute save_to_disk in entry_type (RhythmDBEntryType) (2.15 KB, patch)
2008-05-22 20:56 UTC, Mats Taraldsvik
committed Details | Review

Description Mats Taraldsvik 2008-05-20 14:48:38 UTC
RhythmDBEntryType attributes are missing.

Especially the save_to_disk attribute is useful if you want your plugin to add entries to the database. Now, they are deleted when rhythmbox is closed.

rhythmdb.defs : 28

The only thing that needs to be added, is: '("gboolean" "save_to_disk") as far as I can tell, but I have no experience in this.
Comment 1 Mats Taraldsvik 2008-05-20 18:39:52 UTC
Created attachment 111246 [details] [review]
adds the save_to_disk attribute to RhythmDBEntryType
Comment 2 Mats Taraldsvik 2008-05-20 18:40:55 UTC
However, I still can't access the attribute:

---
Traceback (most recent call last):
  • File "/home/meastp/.ROOT//lib/rhythmbox/plugins/audiobooks/__init__.py", line 24 in activate
    self.entry_type.save_to_disk = True
AttributeError: attribute 'save_to_disk' of 'rhythmdb.EntryType' objects is not writable
---

How to fix this?
Comment 3 Mats Taraldsvik 2008-05-22 20:56:25 UTC
Created attachment 111363 [details] [review]
adds read/write in Python to attribute save_to_disk in entry_type (RhythmDBEntryType)

I think I solved it. However, this is my first attempt to make a patch, so please notify me if anything is wrong.
Comment 4 Jonathan Matthew 2008-06-08 06:43:14 UTC
There were a few minor problems with the patch (save_to_disk is not a RhythmDBEntryTypeCategory), but I've fixed those up and committed it.  Thanks.