gpodder / gpodder-sailfish

gPodder 4 for Sailfish OS Packaging
https://openrepos.net/content/keeperofthekeys/gpodder
49 stars 29 forks source link

gpodder doesn't show subscriptions since SFOS 4.5.0 #168

Closed dimpflmoser closed 1 year ago

dimpflmoser commented 1 year ago

Yesterday I upgraded to SFOS 4.5.0.? Since then, gpodder v 4.12.90 doesn't show its subscriptions anymore.

This is the output I get on the shell without invoker / firejail:

[nemo@xa2 harbour-org.gpodder.sailfish]$ sailfish-qml harbour-org.gpodder.sailfish
[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - Got library name:  "/usr/lib/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
[W] unknown:51 - file:///usr/share/harbour-org.gpodder.sailfish/qml/common/GPodderPlayback.qml:51:38: QML Connections: Cannot assign to non-existent property "onAudioBecomingNoisy"
[W] unknown:42 - file:///usr/share/harbour-org.gpodder.sailfish/qml/CoverContainer.qml:42:5: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column. Column will not function.
[D] onCompleted:580 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:48 - file:///usr/share/harbour-org.gpodder.sailfish/qml/CoverContainer.qml:48:37: Unable to assign [undefined] to QString
[W] unknown:52 - file:///usr/share/harbour-org.gpodder.sailfish/qml/common/GPodderPlayback.qml:52: ReferenceError: platform is not defined
/usr/share/harbour-org.gpodder.sailfish/minidb.py:144: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if (exc_type, exc_value, traceback) is (None, None, None):
[D] :52 - gPodder Core 4.12.0
[D] :53 - gPodder QML UI 4.12.90
[D] :54 - Podcastparser 0.6.6
[D] :55 - PyOtherSide 1.5.9
[D] :56 - Python 3.8.11
WARNING:gpodder.model:Unknown external file: /home/nemo/.local/share/harbour-org.gpodder.sailfish/das ARD radiofeature/ard_sendereihenbild11-100~_v-Podcast.png
WARNING:gpodder.model:Unknown external file: /home/nemo/.local/share/harbour-org.gpodder.sailfish/das ARD radiofeature/ard_sendereihenbild-106~_v-Podcast.jpg
WARNING:gpodder.model:Unknown external file: /home/nemo/.local/share/harbour-org.gpodder.sailfish/Netzpolitik Podcast – netzpolitik.org/cropped-np_favicon_004-1-484x484.png
[D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/main.py\", line 152, in load_podcasts\n    podcasts = self._get_podcasts_sorted()\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/main.py\", line 149, in _get_podcasts_sorted\n    return sorted(self.core.model.get_podcasts(), key=lambda podcast: (podcast.section, sort_key(podcast)))\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/gpodder/model.py\", line 981, in get_podcasts\n    podcast.check_download_folder()\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/gpodder/model.py\", line 607, in check_download_folder\n    wanted_filename = episode.local_filename(create=True, return_wanted_filename=True)\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/gpodder/model.py\", line 391, in local_filename\n    fn_template = util.sanitize_filename(util.filename_from_url(self.url)[0], self.MAX_FOLDERNAME_LENGTH)\n\nAttributeError: 'PodcastEpisode' object has no attribute 'MAX_FOLDERNAME_LENGTH'\n"
[D] onError:95 - Python failure: Return value of PyObject call is NULL: Traceback (most recent call last):

  File "/usr/share/harbour-org.gpodder.sailfish/main.py", line 152, in load_podcasts
    podcasts = self._get_podcasts_sorted()

  File "/usr/share/harbour-org.gpodder.sailfish/main.py", line 149, in _get_podcasts_sorted
    return sorted(self.core.model.get_podcasts(), key=lambda podcast: (podcast.section, sort_key(podcast)))

  File "/usr/share/harbour-org.gpodder.sailfish/gpodder/model.py", line 981, in get_podcasts
    podcast.check_download_folder()

  File "/usr/share/harbour-org.gpodder.sailfish/gpodder/model.py", line 607, in check_download_folder
    wanted_filename = episode.local_filename(create=True, return_wanted_filename=True)

  File "/usr/share/harbour-org.gpodder.sailfish/gpodder/model.py", line 391, in local_filename
    fn_template = util.sanitize_filename(util.filename_from_url(self.url)[0], self.MAX_FOLDERNAME_LENGTH)

AttributeError: 'PodcastEpisode' object has no attribute 'MAX_FOLDERNAME_LENGTH'

[D] onError:95 - Python failure: file:///usr/share/harbour-org.gpodder.sailfish/qml/common/util.js:22: TypeError: Cannot read property 'length' of undefined
dimpflmoser commented 1 year ago

As a workaround I checked the list of subscribed podcasts with sqlite3 and re-added one of the podcasts via UI. This brought back the whole list of podcasts.

After I close and re-open gpodder the situation repeats, list of subscribed podcasts is empty, I need to add a new podcast to recover the list.

Keeper-of-the-Keys commented 1 year ago

Hey thanks for reporting!

I just updated my phone to 4.5.0.16 and was not able to reproduce the issue you had, I do need to allow gPodder some time to read the database but after that it displays everything (23 podcasts almost 3k episodes), can you try re-installing maybe the install got messed up by the update?

I will try and run from CLI tomorrow to see if I get similar errors to you.

dimpflmoser commented 1 year ago

Hm, there are a few issues that may differ to your installation:

Reinstallation didn't make any change

carmenfdezb commented 1 year ago

Hi @dimpflmoser ! I'm on sfos 4.5.0.16 and I use symbolic link to my sdcard for downloading my podcasts, but I don't have this issue. It's weird, maybe it's a problem with your symbolic link or permissions to access your symbolic link?

dimpflmoser commented 1 year ago

Thanks for sharing your point.

As gpodder shows fresh and downloaded episodes and immediately shows the list of podcasts when I add a new one (even if the URL is invalid), I would bet that gpodder has full access to the database file. I got the impression that's some kind of race condition that the list of podcasts has not yet been (fully) read when the GUI starts presenting it. If there was another way to force reassembling the list there was a chance to get around this behaviour. This is what I try with adding a (false) podcast URL.

If I find some time, eventually, I'll try to backup/rename my old folder and create a new one to see whether this is related to my current configuration of podcasts & episodes or whether this is related to my phone setup.

Keeper-of-the-Keys commented 1 year ago

@dimpflmoser do you still have issues? If not I want to close the issue since we're not able to reproduce.

dimpflmoser commented 1 year ago

I ran out of ideas and couldn't fix it. So I removed my database and restarted from scratch. It works since then with the new setup.