Skip to content

feat(triggers): google drive events with a_train #262

@larsenv

Description

@larsenv

Description

Hello @dan-online

I spent the evening modifying A-Train (a discontinued script to monitor Google Drive, which worked with the also discontinued autoscan). As a result I have got autopulse to work with it.

I used ChatGPT to write the code because I don't know Rust, but I think it's working. I got it to spit out a ton of different refreshes to my Jellyfin :-)

Here is my fork http://github.com/larsenv/a-train/ - it needs modification for someone's usage because I hard coded the correct location to my media as the rewrite feature with autopulse didn't seem to work

Config is quite simple

A-Train

[autoscan]
# Replace the URL with your Autoscan URL.
url = "http://autopulse:2875/"
username = "username"
password = "password"

[drive]
# Path to the Service Account key file,
# relative to the configuration file.
account = "./account.json"

Autopulse

targets:
  jellyfin:
    type: "jellyfin"
    token: "token"
    url: "http://jellyfin:8096/"

triggers:
  a-train:
    type: "manual"

app:
  hostname: 0.0.0.0
  port: 2875
  database_url: sqlite://data/autopulse.db

auth:
  username: larsenv
  password: password

I also created a docker image, but again I would have to make changes

This isn't thoroughly tested, I was previously using autoscan but couldn't get that to work with jellyfin. I think that it's doing something though and I hope this can be somehow implemented in the main code

And here's some logs that it outputted

[03:00:19] [INF] [32] Emby.Server.Implementations.IO.LibraryMonitor: Season 15 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 15) will be refreshed.
[03:00:19] [INF] [53] Emby.Server.Implementations.IO.LibraryMonitor: Season 12 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 12) will be refreshed.
[03:00:19] [INF] [33] Emby.Server.Implementations.IO.LibraryMonitor: Season 9 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 9) will be refreshed.
[03:00:19] [INF] [24] Emby.Server.Implementations.IO.LibraryMonitor: Season 11 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 11) will be refreshed.
[03:00:19] [INF] [50] Emby.Server.Implementations.IO.LibraryMonitor: Season 25 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 25) will be refreshed.
[03:00:19] [INF] [58] Emby.Server.Implementations.IO.LibraryMonitor: Season 26 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 26) will be refreshed.
[03:00:19] [INF] [71] Emby.Server.Implementations.IO.LibraryMonitor: Season 15 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 15) will be refreshed.
[03:00:19] [INF] [41] Emby.Server.Implementations.IO.LibraryMonitor: Season 17 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 17) will be refreshed.
[03:00:19] [INF] [39] Emby.Server.Implementations.IO.LibraryMonitor: Season 5 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 5) will be refreshed.
[03:00:19] [INF] [49] Emby.Server.Implementations.IO.LibraryMonitor: Season 31 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 31) will be refreshed.
[03:00:19] [INF] [3] Emby.Server.Implementations.IO.LibraryMonitor: Season 13 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 13) will be refreshed.
[03:00:19] [INF] [46] Emby.Server.Implementations.IO.LibraryMonitor: Season 5 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 5) will be refreshed.
[03:00:19] [INF] [63] Emby.Server.Implementations.IO.LibraryMonitor: Season 13 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 13) will be refreshed.
[03:00:19] [INF] [19] Emby.Server.Implementations.IO.LibraryMonitor: Season 10 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 10) will be refreshed.
[03:00:19] [INF] [71] Emby.Server.Implementations.IO.LibraryMonitor: Season 30 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 30) will be refreshed.
[03:00:19] [INF] [39] Emby.Server.Implementations.IO.LibraryMonitor: Season 31 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 31) will be refreshed.
[03:00:20] [INF] [56] Emby.Server.Implementations.IO.LibraryMonitor: Season 32 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 32) will be refreshed.
[03:00:20] [INF] [45] Emby.Server.Implementations.IO.LibraryMonitor: Season 18 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 18) will be refreshed.
[03:00:20] [INF] [18] Emby.Server.Implementations.IO.LibraryMonitor: Season 14 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 14) will be refreshed.
[03:00:20] [INF] [24] Emby.Server.Implementations.IO.LibraryMonitor: Season 29 (/media/sdc1/hydrobleach/Media/TV Shows/How It's Made/Season 29) will be refreshed.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions