Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more interoperable format for DB instead of pickle #8

Open
jose1711 opened this issue Sep 22, 2023 · 1 comment
Open

Use more interoperable format for DB instead of pickle #8

jose1711 opened this issue Sep 22, 2023 · 1 comment

Comments

@jose1711
Copy link

jose1711 commented Sep 22, 2023

I think pickle is not the best choice for storing ShortlistItem objects due to the following reasons:

  • it's difficult to view/process pickled file externally (e. g. in a text editor)
  • a compatibility issue may appear between different (Python/Kodi) versions
  • xml format is typically used for user data in Kodi, other times sqllite or .json is used
@jose1711
Copy link
Author

FWIW here's the way to dump shortlist file to terminal:

cd .kodi/addons/plugin.program.shortlist
python3
import pickle
items = pickle.load(open('/path/to/.kodi/userdata/addon_data/plugin.program.shortlist/shortlist.db', 'rb'))
for item in items: print(item.title, item.thumb, item.filename)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant