私の Plex サーバーは Netflix よりも優れた映画を推奨するようになりました。これはまさに私がそれを構築した方法です。
私は、これまで使用してきた映画レコメンデーション エンジンが正常に動作しないことにうんざりしていました。彼らは、私が映画を気に入った理由や、新しい映画を私に最も勧める方法を実際に理解することはありませんでした。そこで、AI と Plex の視聴履歴を使って独自のものを構築することに決めたのですが、もっと早くやっておけばよかったです。
タウトゥリは私にとって Plex の歴史の中心です
誰がいつ何を見たのかがわかります
映画の検索を支援する AI エージェントの構築に着手したとき、車輪の再発明は望んでいませんでした。そこで、私は Plex サーバーですでに何年も実行していた信頼できるツールである Tautulli に目を向けました。
Tautulli については以前に書きましたが、聞いたことがない方のために説明すると、これはサーバー上で Plex と一緒に実行されるシンプルな Plex 追跡ツールです。 Plex と統合して、どのユーザーがどのタイトルをどのデバイスでいつ視聴したかのログを保持します。 Tautulli は、デバッグを改善するために、より詳細なストリーミング分析も提供します。
しかし、私が使用している Tautulli の最大の部分は追跡部分です。 Tautulli は、視聴されたメディアを追跡し、そのメディアの何パーセントが視聴されたかを報告します。さらに、Tautulli は Codex などのツールからアクセスできる API を公開しており、まさに私がそれを使用している方法です。
Codex との統合の構築は簡単でした
私がしなければならなかったのは、Tautulli API キーをファイルに入れるだけで、それは消えてしまいました。
私が構築するほとんどの Codex 拡張機能やスキルと同様に、Codex にツール自体を構築してもらいました。私は単に自分が何をして欲しいかを説明し、何が私に必要かを尋ねました。私のホームラボの設定をすでに知っていた Codex は、Tautulli を開始するために API キーを提供するように私に求めました。
API キーを Codex、Gemini、ChatGPT、Claude、またはその他の AI プラットフォームに貼り付けないでください。コンピューター上のファイルへのアクセスを許可すること自体が危険ですが、テキスト ボックスに API キーをプレーン テキストで貼り付けることはさらに危険です。
そこで、API キーを取得して、Codex が読み取りアクセスできるコンピューター上のフォルダーに置き、ファイルの場所を Codex に伝えました。テキスト ボックスに貼り付けるよりも優れているわけではありませんが、それでもわずかに優れています。
そこから、Codex は私が構築を依頼したレコメンデーション エンジンの足場を簡単に構築することができました。
Codex に映画のおすすめを尋ねることができるようになり、私の好みを認識してくれるようになりました。
Codex はハードデータを使用して、私が何を好んで何を好まないのかを把握します
Codex が私の Tautulli にアクセスできるようになったことで、私の時計履歴の分類を開始し、妻の時計履歴を私と他の家族の時計履歴から区別することができました。
私はまず、最近観た映画のいくつかとその評価、および好きか嫌いな映画についての情報を Codex に伝えることから始めました。次に、私が見る映画の基準に関する情報を入力しました。たとえば、映画を見るのをやめてしまう内容 (非常に強い言葉遣い、特定の種類の生々しいシーン)、本当に好きな俳優や女優、その他の基本的な内容です。
そこで、お勧めの映画をいくつか聞いてみました。次に、Codex は、私のタウトゥリの視聴履歴全体と、初期設定時に入力した内容とを組み合わせて映画を推奨し、それらの映画を推奨する理由を教えてくれました。
私は推奨される映画のいくつかを視聴し始め、特定の映画が機能した理由、または機能しなかった理由についてフィードバックを提供しました。これにより、推奨エンジンがさらに改良されました。システムをセットアップしてから 1 か月ほど経った現在、かなり安定しています。
時々、Codex が私にとって間違った推奨事項を受け取ることがあります。ぴったりの映画を教えてくれるので、それを観て途中で止めるか、最後まで見ることになります。素晴らしいのは、Codex が Tautulli にアクセスできるため、私が映画のどこまで登場したかを確認できることです。次に、その映画が適合しなかった理由を伝え、推奨エンジンを更新して、次の映画に進みます。
私が構築したこのレコメンデーション エンジンで気に入っている点の 1 つは、毎日のレビュー用に Codex を設定している方法です。私には、毎日午前 2 時頃に実行される「朝のブリーフ」というスケジュールされたタスクがあります。
Codex が行うことの 1 つは、前日に消費されたメディアを保存することで、そのメディアに関するフィードバックをまだ提供していない場合は、Codex にフィードバックを提供できます。これは、私が何かをどれだけ好きか嫌いかを分かりやすく伝え、それに基づいてメディアを厳選してくれる自動システムです。
私がこれまで使用したメディア レコメンデーション システムは、これほどパーソナルなものは他にありませんでした。世の中のレコメンデーション エンジンのほとんどは、映画が好きかどうか、そしてどの程度好きかに基づいています。私の Codex 推奨エンジンは次のことを検討しています なぜ 映画が好きか嫌いか、それに基づいておすすめをします。
例として、私はヌードのある映画は見ません。つまり、私が映画 A を観て気に入った場合、ほとんどのレコメンデーション エンジンは、比較的似ているがヌードが含まれているという理由で映画 B を推薦するでしょう。Codex は、それを私に推薦しないことを知っています。だからこそ、私は Codex レコメンデーション エンジンをとても気に入っています。
Codex (または Claude) で独自のレコメンデーション エンジンの構築を開始するためのプロンプトは次のとおりです。
I want you to build a private, reusable movie recommendation system using Codex, my Plex viewing history, Tautulli, and my Obsidian vault.
The goal is not merely to recommend movies similar to ones I watched. I want the system to understand why I liked or disliked something, remember my personal viewing standards, distinguish my activity from other Plex users, and improve as I provide feedback.
My Obsidian vault is located at:
(OBSIDIAN VAULT PATH)
Use Obsidian as the durable source of truth for my preferences, ratings, viewing standards, and opinions. Do not rely solely on Codex’s conversation memory.
Before building anything, inspect my vault structure and ask me for any information you still need.
Create a media area in Obsidian containing:
- A dashboard or hub for my media system
- A human-readable viewing-preferences document
- One note per movie or television series when a durable record is needed
- A structured view of what I am watching, want to watch, have watched, liked, disliked, paused, or dropped
- A document explaining how the Tautulli integration works
- A folder-specific AGENTS.md file containing the permanent rules Codex should follow when working with my media library
- A daily activity area for recording recently consumed media without storing raw API responses
Keep imported viewing information separate from my personal opinions. Tautulli may update playback history, progress, completion, and last-watched information, but it must never overwrite my ratings, preferences, content standards, or written reactions.
Create a secure local environment file with blank fields for:
TAUTULLI_URL=
TAUTULLI_API_KEY=
PLEX_USERNAME=
I will enter the credentials directly into that file. Never ask me to paste an API key into the conversation. Never print credentials in terminal output, store them in Obsidian, include them in documentation, or commit them to version control. Restrict the credential file so it is readable only by my local user account.
Use read-only Tautulli API requests. Do not modify Plex, delete history, or perform any other write operations.
Once connected to Tautulli:
1. Resolve the correct Plex user instead of assuming a numeric user ID.
2. Read my Plex libraries and viewing history.
3. Record which movies and shows I completed, partially watched, recently watched, or repeatedly watched.
4. Group television episodes under their respective series.
5. Use stable Plex, IMDb, TMDB, or TVDB identifiers when available.
6. Do not assume that playing or completing something means I liked it.
7. Do not treat a short or partial play as a completed movie.
8. Ask me why I stopped watching something instead of inventing a reason.
9. Preserve the percentage or episode where I stopped so that information can inform future questions.
My Plex account may be shared with my spouse or other family members. Ask me which users, devices, titles, or viewing patterns belong to each person. Store viewer attribution separately using values such as me, spouse, together, family member, or unknown.
Do not use another person’s viewing history to determine my preferences. When the available information cannot reliably identify the viewer, mark it as unknown instead of guessing.
Interview me about my initial preferences, including:
- Recent movies and shows I watched
- How I would rate each one
- What I specifically liked or disliked about them
- Favorite genres, actors, actresses, directors, themes, and types of stories
- Pacing, tone, or storytelling styles I enjoy
- Movies or shows I stopped watching and why
- Content I want excluded from recommendations
- Content that should be reported as a caution but is not an automatic exclusion
- Whether recommendations are for me, my spouse, or something we will watch together
Store these answers in my Obsidian viewing-preferences document and update it whenever I provide new information.
When I request a recommendation, consider:
- What I say I am in the mood for
- Titles I explicitly liked or loved
- Why I liked those titles
- Titles I disliked, paused, or abandoned
- Why those titles did not work for me
- My preferred genres, actors, themes, tone, pacing, and story elements
- My firm content exclusions
- Whether the recommendation is for me or another viewer
- Whether I have already watched the candidate
- Whether the candidate is available in my Plex library
- How confident you are that the candidate fits
Do not recommend something based on genre similarity alone. A movie can be similar to something I loved and still be a poor recommendation because of its content, tone, pacing, or another quality I have said I dislike.
Research promising candidates before recommending them. If I have firm content exclusions, check detailed and credible sources rather than relying only on an age rating or genre label. Clearly distinguish confirmed information from uncertain or conflicting reports. Do not claim that a movie fits my standards when the available evidence is incomplete.
For each recommendation, provide:
- Title and release year
- A concise explanation of why I might enjoy it
- The movies, shows, or preferences it was matched against
- Whether it is already available in Plex
- Whether Tautulli indicates I have watched it
- Any relevant content concerns
- A confidence level
Give me a short ranked list and finish with one clear first choice.
Create a feedback loop so the system improves over time. When I watch a recommendation, ask me:
- Whether I finished it
- How I would rate it
- What I liked
- What I disliked
- Whether any content made it a poor fit
- Whether my response changes an existing preference or only applies to that title
Preserve my answers in Obsidian. Do not automatically generalize one isolated reaction into a permanent rule unless I confirm that it represents a broader preference.
Also create a daily media review workflow suitable for a scheduled Codex Morning Brief. It should:
1. Read the previous day’s Tautulli activity.
2. Separate activity by known viewer when possible.
3. Store a concise daily record in Obsidian.
4. Identify completed and partially watched titles.
5. Ask for my opinion when a title does not already have feedback.
6. Avoid repeatedly asking about activity that has already been reviewed.
7. Never treat unreviewed playback as proof that I liked something.
Make all sync operations idempotent so running them more than once does not create duplicate notes or duplicate activity records. Do not store raw Tautulli API responses in my vault.
Before creating files or importing a large amount of history, show me the proposed folder structure, note schema, integration boundaries, and daily workflow. Wait for my approval before performing a bulk import.
私の Codex の旅は、Obsidian と統合してから無限に良くなりました。
このレコメンデーション エンジン全体の基盤は技術的には Codex ですが、実際には Obsidian です。私は Codex 内のすべてを Obsidian ボールトから実行し、各最上位フォルダーにカスタム AGENTS.md ファイルを入れます。
そのため、Codex に映画やテレビ番組に関するメモを送信したり、評価を付けたりするたびに、その情報が Obsidian のドキュメントに保存されるだけです。これにより、Codex 自体の記憶機能に依存する必要がなく、後でその情報を簡単に呼び出すことができます。これは私にとって常に当たり外れがありました。
関連情報は以下のリンクからご確認いただけます
関連記事
- デバイスが長期間再起動されていないと Windows が表示される
- Gemini で AI 音楽を無料で生成できるようになりました
- Fire TV Stickの速度が遅くなるのは愚かな理由で、修正には30秒かかります