[–] 7 points 2 months ago

They claim reverse scrubbing is impossible because they haven’t thought beyond their current frame pipeline.

Wouldn’t be a performance hit if they used a ring buffer of cached frames, but I can see it being a pain in the ass to rewrite.

  • source
  • [–] 1 point 3 months ago*

    It is as you say, just sqlite3 via command line. I’m sure there are guis as well.

    For deleting live tv channels for example I use:

    sqlite3 /appdata/jellyfin/data/jellyfin.db "DELETE FROM BaseItems WHERE Type = 'MediaBrowser.Controller.LiveTv.LiveTvChannel';" sqlite3 /appdata/jellyfin/data/jellyfin.db “DELETE FROM BaseItems WHERE Type = 'MediaBrowser.Controller.LiveTv.LiveTvProgram';"

    Of course make sure Jellyfin is not running as live editing the db will likely result in corruption.

    It can also be wise to do an integrity check to make sure your edits didn’t wreck shit

    sqlite3 /appdata/jellyfin/data/jellyfin.db “PRAGMA integrity_check;"

    Alternatively you may be able to do this more safely via the swagger api but I just learned about this so im not sure: http://[jellyfin-ip]:8096/api-docs/swagger . Documentation here https://api.jellyfin.org/

  • source
  • parent
  • context
  • [–] [S] 1 point 3 months ago (1 child)

    I assume the correct database file is this file in my filesystem:

    docker/jellyfin/jellyfin-config/data/jellyfin.db
    

    How can I run arbitrary SQL commands on this database file? I assume there is a simple way, similar to using SQLite to manipulate a SQLite file via the command line. I understand it is somewhat dangerous to manually manipulate the Jellyfin database, so I am prepared to restore this file from a backup in case I mess anything up.

    As for the tediousness of this process, my big worry is doing this again. I am not sure exactly what I had done to lose my media segment data the first time. If I accidentally lose it again in the future, I want to have a script on hand that provides a relatively quick way to restore them from a backup instead of having to create them manually again and again. I can also share that script here and potentially help someone else who may find themselves in this situation in the future.

  • source
  • parent
  • context
  • [–] [S] 1 point 3 months ago (3 children)

    it would probably be easier to just read the values from a backup and add them back manually

    Is there a way to do it... programmatically? Can I write a script or something to:

    1. Identify the GUIDs for the relevant items in the backup database
    2. Identify what the GUIDs for those same items are now in the current database
    3. Run a command to overwrite the current media segment values with the media segment values from the backup
  • source
  • parent
  • context
  • [–] 1 point 3 months ago (4 children)

    what version and are you actually using the intro skipper plugin? After (iirc) 10.10 the plugin was upstreamed and is now media segments built into the app, though it’s technically still listed as a plugin

    Prior to 10.10 with the 3rd party plugin there should be an introskipper.db file in /config/data/introskipper (full path depends on os/install. After that it was integrated into the main Jellyfin.db in /config/data

    Note that restoring an old Jellyfin.db means any changes since the file was used (watch status, media import, metadata changes, etc) will need to be recreated. This generally isn’t a huge issue (rescan library and mark whatever as watched since backup) unless you’ve made a bunch of manual metadata overrides or custom images or something. Def the easiest option if that’s not the case

    Theoretically you could extract the “MediaSegments” table and insert it into current db but you should definitely back up the current db before you muck around with this. I certainly have had to muck with the db and it can create weirdness (there’s a bug with live tv where orphaned channels never go away so if you change iptv subscriptions every few months you can end up with like 70,000 channels, 90% of which don’t work. Only workaround I’ve found is to manually empty the tables in the db. Been present for at least 5 years but I’m pretty sure tv tuner stuff is a super low priority)

    You are also correct: media identifiers are GUID hashed from the path (including filename). Changing path to media or filename will change the identifier. You could probably remap this in the db too but this is honestly probably a fucking nightmare and it would probably be easier to just read the values from a backup and add them back manually

  • source