Skip to content

Releases: koebbe14/Snapchat-Parser

Snapchat Parser v2.0

08 Dec 23:42
c9a326e

Choose a tag to compare

Changelog: Snapchat Parser v1.0 → v2.0

Overview

This document summarizes the major changes and improvements between SnapchatParser_v1.0.py and SnapchatParer_v2.0.py.


🚀 Major Architecture Changes

1. Virtual Scrolling Implementation

  • v1.0: Used QTableWidget which loads all rows into memory
  • v2.0: Migrated to QTableView with QAbstractTableModel for virtual scrolling
    • Introduced MessageTableModel class inheriting from QAbstractTableModel
    • Only visible rows are rendered, significantly improving performance with large datasets
    • Better memory efficiency for conversations with thousands of messages

2. Performance Optimizations

  • Conversation-level Caching: Added _conversation_cache to store prepared message data per conversation/filter combination
  • Index Tracking: Implemented _last_displayed_indices to avoid unnecessary table refreshes
  • Lazy Token Index Building: Token index is now built on-demand rather than upfront

🎨 User Interface Improvements

3. Column Width Management

  • Persistent Column Widths: Column width preferences are now saved using QSettings and restored on application restart
  • First-Run Dialog: New FirstRunColumnWidthDialog that appears after data import completion
    • Instructs users to customize column widths
    • Includes "Don't show this message again" checkbox
    • Dialog timing moved from initial launch to post-import phase
  • Default Column Widths: Predefined optimal default widths for all columns
  • Removed Maximum Width Constraint: Columns can now be expanded without artificial limits

4. Custom Delegates

  • MediaThumbnailDelegate: New delegate for rendering media thumbnails with:
    • Consistent thumbnail sizing (100x100px standard)
    • Support for multiple thumbnails per cell
    • Individual blur control per thumbnail
    • Improved thumbnail positioning and spacing
  • HtmlDelegate: Enhanced for better HTML rendering in cells

🔧 Feature Additions

5. User ID to Username Conversion

  • New parse_user_ids_to_usernames() function converts user IDs to human-readable usernames
  • Applied to the following columns:
    • "Saved By"
    • "Screenshotted By"
    • "Replayed By"
    • "Read By"
  • Hyperlink Support: When more than 2 user IDs are present, displays "click to view" hyperlink
    • Opens GroupMembersDialog showing all usernames and IDs
    • Similar functionality to existing "Group Members" column

6. Group Members Column Enhancement

  • Updated format_group_member_display() function
  • Now displays "click to view (N members)" with member count
  • Hyperlinks properly rendered using HtmlDelegate

7. Individual Thumbnail Blur Control

  • Right-Click Context Menu: Right-clicking a thumbnail shows blur/unblur option
  • Per-Thumbnail Blur State: Each thumbnail can be blurred independently
  • Independent of Global Blur: Works separately from the "Blur All Media" button
  • Tracks blur state using blurred_thumbnails set (keyed by media_id)

8. Reaction Parsing

  • New parse_reactions() function converts reaction integers to emoji representations
  • Supports both modern (semicolon-separated) and legacy (comma-separated) formats
  • Maps reaction codes to emojis (e.g., 1 → ❤️, 2 → 😂, 3 → 🔥)

🛠️ Technical Improvements

9. Error Handling

  • Enhanced error handling in if __name__ == '__main__': block
  • Added try-except wrapper to catch fatal exceptions
  • Error messages printed to stderr with full traceback
  • Console window remains open with "Press Enter to exit..." prompt
  • Prevents silent application crashes

10. Blur Settings Standardization

  • Added blur constants matching kik_parser.py:
    • BLUR_KERNEL_SIZE = (401, 401)
    • BLUR_SIGMA = 93
    • THUMBNAIL_SIZE = (100, 100)
  • Consistent blur strength across all media thumbnails

11. Media Path Mapping

  • Enhanced get_media_path() to store _media_path_to_id_map
  • Enables per-thumbnail blur tracking for multiple media in single cells
  • Maps individual media paths to their respective media IDs

📦 Dependencies & Imports

12. New Imports

  • QSettings - For persistent column width storage
  • QAbstractTableModel, QModelIndex - For virtual scrolling
  • QTableView - Replacement for QTableWidget
  • threading, queue - For improved async operations
  • html - For HTML parsing and rendering

🐛 Bug Fixes

13. Fixed Issues

  • Fixed AttributeError when accessing columnCount() on QTableView
  • Fixed AttributeError when accessing itemAt() on QTableView (replaced with indexAt())
  • Fixed TypeError in on_table_cell_double_clicked() signature (now accepts QModelIndex)
  • Fixed double-click opening media files twice
  • Fixed inconsistent row heights and overlapping data
  • Fixed inconsistent thumbnail sizes (some tiny, some normal)
  • Fixed import progress dialog remaining open after Phase 5 completion
  • Fixed indentation errors in multiple code sections
  • Fixed default column widths not being applied correctly

🔄 Migration Notes

For Developers:

  • Table access patterns changed from QTableWidget.item(row, col) to QTableView.model().data(index)
  • Event handlers now receive QModelIndex instead of row/col integers
  • Column width management should use QSettings for persistence
  • Media blur state is tracked per individual media_id, not per cell

For Users:

  • Column widths are now saved automatically
  • First-run dialog appears after data import (not on initial launch)
  • Right-click thumbnails to blur/unblur individually
  • User IDs in certain columns now display as usernames
  • Improved performance with large conversation datasets

📝 Version Information

  • v2.0: `APP_VERSION = "2.0"

This changelog was generated by comparing SnapchatParser_v1.0.py and SnapchatParer_v2.0.py

Snapchat Parser v1.0

17 Nov 19:05
d53d47b

Choose a tag to compare

Snapchat Parser v1.0 Pre-release
Pre-release
Initial commit