[tvOS] Generic way to open a Collected item

Original Request:

Do you happen to know if Infuse has a generic way to open an item? And which ID they might use? I found this but not sure if there’s a generic way to (attempt to?) open an item.

By generic way to open an item, do you mean a fixed format address to identify an item? For example, sometime like “../[imdb-id]/movie.mkv”? I don’t know if such a thing exists, but suspect not. The file structures are free-form.

In my case I have a directory per movie. The directory and .mkv file naming is the format “[movie-name] ([movie-year]” to aid matching. Including the IMDB id is an option, but just as part of the name to aid matching, and not mandated. The file address is parsed for matching information. If you’re looking for a well structured item address, I don’t believe it exists.

With the tools I use, the collection could be exported to Trakt including the item location address. In my case the library is on an SMB share, and so would present data such as :

movie_imdb_id,movie_title,movie_directory,movie_filenames
tt0114746,Twelve Monkeys,\omv6\Movies\12 Monkeys (1995),12 Monkeys (1995).hddvd.mkv

You’d need to reach out to Firecore for see what else might be possible.

Hmm, okay I’m unsure I have the time to look into it officially but theoretically it might be easy enough in the future to offer a way to open a custom format provided by the user and try open it such as

let movie: TraktMovie // 12 Monkeys
let type = "Movies"
let title = "\(movie.title) (\(movie.year))"
// pretend this comes from your custom format somehow
let user_format = "omv6\\\(type)\\\(title)\\\(title).hddvd.mkv"
// "omv6\Movies\12 Monkeys (1995)\12 Monkeys (1995).hddvd.mkv"
UIApplication.shared.open(
    URL(string: "infuse://x-callback-url/play?\(user_format)")!
)

Or as you say, maybe something could be synced to Trakt from Infuse somehow which we could then just open directly.

Thanks for the info either way!

I understand that this isn’t a priority, and appreciate you considering it.

As an alternative it did occur to me that you could insist that the collection is stored in a specific file directory format -

e.g /[IMDB_id]/movie.mkv

but even this would be problematic, since the transport layer can be different depending on what file sharing system is employed and also the actual video file format isn’t always an MKV. Therefore to accommodate everything supported by Infuse, you need to be able to configure how the file location address is constructed.

If you do find time to look at this, if there is anything I can investigate to help you then please let me know.

The changes you’ve already implemented have already proved valuable to me - there is a movie I’ve been planning to rewatch for a while - I’ve been tracking it waiting for it to appear on one of the streaming services I subscribe to. Yesterday when browsing my tracking list I saw the new green book stack icon next to, and realised that it’s already in my collection of movies!!!

1 Like