1. 16 Feb, 2021 1 commit
  2. 15 Feb, 2021 1 commit
  3. 30 Jan, 2021 2 commits
  4. 23 Jan, 2021 1 commit
  5. 07 Jan, 2021 1 commit
  6. 01 Jan, 2021 2 commits
  7. 28 Dec, 2020 4 commits
  8. 24 Dec, 2020 17 commits
    • Jordan Petridis's avatar
      update .gitignore file · c526903d
      Jordan Petridis authored
      c526903d
    • Jordan Petridis's avatar
      flatpak: remove the non-devel manifest · 4276f8ea
      Jordan Petridis authored
      Its trivial to patch the devel manifest to use the normal
      app id and build profile.
      4276f8ea
    • Jordan Petridis's avatar
      Merge branch 'image-cache' into 'master' · b3a812c1
      Jordan Petridis authored
      Refresh cached cover art
      
      Closes #144
      
      See merge request !176
      b3a812c1
    • Jordan Williams's avatar
      Store the image hash as blob · 5fb7574c
      Jordan Williams authored
      The hash of the image uri was previously stored as an integer in the db.
      This has been changed to avoid casting in the hashing function.
      The hash value, a u64, is now stored as 8 u8 values in a binary blob.
      These 8 values are stored in a Vec<u8> instead of an array for the db.
      Conversion functions have been added as required.
      
      Furthermore, a bug involving hashing the image uri has been fixed.
      Previously, the hashing function was erroneously hashing the Option.
      Now, the hashing function only hashes the String value, as expected.
      5fb7574c
    • Jordan Williams's avatar
      Cleanup unit tests for the Show struct's cache-related functions · 05e4561f
      Jordan Williams authored
      This commit removes some test assertions for side effects.
      These checked the title, description, and a couple other fields.
      These were removed due to distracting from the main intent of the tests.
      
      Additionally, any direct hash calculations have been evaluated manually.
      This separates the unit tests from the hashing implementation.
      This follows best practices making the unit tests DAMP.
      05e4561f
    • Jordan Williams's avatar
      Annotate NewShow test-only getters with #[cfg(test)] · faea7a2c
      Jordan Williams authored
      The two new getters are only used for tests.
      It makes sense to annotate them as such.
      The #[cfg(test)] replaces the previous #[allow(dead_code)] annotation.
      
      One of the existing getters had an unnecessary #[allow(dead_code)].
      This has also been removed to keep things tidy.
      faea7a2c
    • Jordan Williams's avatar
      Add initial test case to verify a cached image is refreshed · 269800bf
      Jordan Williams authored
      The truncate_db function has been made public to improve this test case.
      This is not yet working and there will need to be more cases.
      The source id is not found which causes the test to crash.
      269800bf
    • Jordan Williams's avatar
      Test the functions which update the cache values in the database · 7b46397d
      Jordan Williams authored
      This commit also removes the logging from these update functions.
      It might be worth refactoring these tests.
      They could compare against the actual image uri hash values.
      7b46397d
    • Jordan Williams's avatar
      Unit test is_cached_image_valid function · 540835f7
      Jordan Williams authored
      540835f7
    • Jordan Williams's avatar
      Unit test the hashing function · 3bb9e138
      Jordan Williams authored
      3bb9e138
    • Jordan Williams's avatar
      bc19ad5e
    • Jordan Williams's avatar
      Pass the valid duration into is_cached_image_valid · af2e5894
      Jordan Williams authored
      This makes the function extremely easy to test.
      Additionally, the default valid duration is now a static constant.
      af2e5894
    • Jordan Williams's avatar
      Move cached_image_valid function inside the ShowCover struct as a method · 2e28b016
      Jordan Williams authored
      The method has also been renamed to is_cached_image_valid.
      2e28b016
    • Jordan Williams's avatar
      Add my name to the About dialog · 148b6ec9
      Jordan Williams authored
      148b6ec9
    • Jordan Williams's avatar
      Update the changelog · 34ddfc1d
      Jordan Williams authored
      34ddfc1d
    • Jordan Williams's avatar
      Add hash-based image caching · 58b79f53
      Jordan Williams authored
      This commit adds another cache validation parameter.
      Previously, support for time-based caching was added.
      This may not retrieve updated images very quickly for the user.
      Thus, the image's URI is checked for changes.
      A hash value of the image's URI is updated when it is downloaded.
      When feeds are updated, the image URI is checked against this hash.
      If the hash has changed the image is downloaded and the hash updated.
      
      The hash function uses Rust's standard hasher.
      This produces a 64-bit unsigned integer.
      The caveat is that sqlite doesn't support unsigned integer values.
      To get around this, the hash function converts this to a signed integer.
      I should probably double check the corner cases of the cast done here.
      
      Tests still need to be added for this functionality.
      The changelog will also need to be updated in a subsequent commit.
      58b79f53
    • Jordan Williams's avatar
      Add time-based caching mechanism for podcast cover art · 7c20c7ac
      Jordan Williams authored
      Previously, cached podcast cover art was never invalidated.
      When podcasts updated cover art, it would not be updated locally.
      To correct this, a time-based caching mechanism has been introduced.
      This invalidates cached images after a specific amount of time.
      This has been set to 4 weeks.
      Once a podcast cover has been stale for 1 month, it is re-downloaded.
      To get updates earlier, a hash-based mechanism will be implemented.
      The time-based mechanism is mostly a fallback to guarantee updates.
      
      One column is added to the shows table, the timestamp image_cached.
      A database migration has been included as part of this commit.
      
      Testing has yet to be implemented for this functionality.
      7c20c7ac
  9. 22 Dec, 2020 2 commits
  10. 19 Dec, 2020 1 commit
    • nee's avatar
      podcast-gtk: implement #184 (Extract rss feed from soundcloud) · 3357602d
      nee authored
      Soundcloud urls don't offer an rss feed by default, adding
      a soundcloud url in the headerbar add button won't find a podcast.
      
      This solution downloads the html page, extracts the users:id and
      constructs the soundcloud specific feed link from it.
      
      #184
      3357602d
  11. 05 Dec, 2020 1 commit
  12. 29 Nov, 2020 1 commit
  13. 26 Nov, 2020 1 commit
  14. 17 Nov, 2020 2 commits
  15. 15 Nov, 2020 1 commit
  16. 14 Nov, 2020 2 commits