Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add manual torrent adding #121

Merged
merged 8 commits into from
Oct 26, 2024
Merged

Conversation

davidemarcoli
Copy link
Collaborator

@davidemarcoli davidemarcoli commented Oct 12, 2024

Merge after rivenmedia/riven#785

@filiptrplan
Copy link
Collaborator

filiptrplan commented Oct 13, 2024

Not sure if this is ready but it currently does not work.

I tried to add the movie Inside Out 2 with the hash 8FAE371CB820400ECC974A39912E42CAB138C263 but it throws an error:

sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) null value in column "item_id" of relation "MediaItem" violates not-null constraint
DETAIL:  Failing row contains (208, null, null, mediaitem, 2024-10-13 15:01:44.363347, riven, null, null, null, 0, {}, f, null, 0, null, null, null, null, {}, f, null, tt22022452, null, null, null, null, null, null, null, [], null, null, null, null, Unknown).

[SQL: INSERT INTO "MediaItem" (item_id, number, type, requested_at, requested_by, requested_id, indexed_at, scraped_at, scraped_times, active_stream, symlinked, symlinked_at, symlinked_times, symlink_path, file, folder, alternative_folder, aliases, is_anime, title, imdb_id, tvdb_id, tmdb_id, network, country, language, aired_at, year, genres, key, guid, update_folder, overseerr_id, last_state) VALUES (%(item_id)s, %(number)s, %(type)s, %(requested_at)s, %(requested_by)s, %(requested_id)s, %(indexed_at)s, %(scraped_at)s, %(scraped_times)s, %(active_stream)s, %(symlinked)s, %(symlinked_at)s, %(symlinked_times)s, %(symlink_path)s, %(file)s, %(folder)s, %(alternative_folder)s, %(aliases)s, %(is_anime)s, %(title)s, %(imdb_id)s, %(tvdb_id)s, %(tmdb_id)s, %(network)s, %(country)s, %(language)s, %(aired_at)s, %(year)s, %(genres)s, %(key)s, %(guid)s, %(update_folder)s, %(overseerr_id)s, %(last_state)s) RETURNING "MediaItem"._id]
[parameters: {'item_id': None, 'number': None, 'type': 'mediaitem', 'requested_at': datetime.datetime(2024, 10, 13, 15, 1, 44, 363347), 'requested_by': 'riven', 'requested_id': None, 'indexed_at': None, 'scraped_at': None, 'scraped_times': 0, 'active_stream': '{}', 'symlinked': False, 'symlinked_at': None, 'symlinked_times': 0, 'symlink_path': None, 'file': None, 'folder': None, 'alternative_folder': None, 'aliases': '{}', 'is_anime': False, 'title': None, 'imdb_id': 'tt22022452', 'tvdb_id': None, 'tmdb_id': None, 'network': None, 'country': None, 'language': None, 'aired_at': None, 'year': None, 'genres': '[]', 'key': None, 'guid': None, 'update_folder': None, 'overseerr_id': None, 'last_state': 'Unknown'}]

EDIT: Just saw your message on Discord, I'll help to debug it :)

EDIT 2: Fixed on the backend PR!

@filiptrplan
Copy link
Collaborator

Also the Request button is still visible after the movie is requested and added. This doesn't happen in dev so it should be something in this PR.

@AyushSehrawat
Copy link
Member

Also the Request button is still visible after the movie is requested and added. This doesn't happen in dev so it should be something in this PR.

Don't think that's the issue. Issue is that when someone requests the media, it's not added instantaneously into db after backend api call (sometimes it's quick sometimes it's slow). So you need to manually reload to see it

@filiptrplan
Copy link
Collaborator

Also the Request button is still visible after the movie is requested and added. This doesn't happen in dev so it should be something in this PR.

Don't think that's the issue. Issue is that when someone requests the media, it's not added instantaneously into db after backend api call (sometimes it's quick sometimes it's slow). So you need to manually reload to see it

No, it's there even when it is added. So it has the Manage and Delete buttons along with Request.

@AyushSehrawat
Copy link
Member

Also the Request button is still visible after the movie is requested and added. This doesn't happen in dev so it should be something in this PR.

Don't think that's the issue. Issue is that when someone requests the media, it's not added instantaneously into db after backend api call (sometimes it's quick sometimes it's slow). So you need to manually reload to see it

No, it's there even when it is added. So it has the Manage and Delete buttons along with Request.

Oh that's weird then. I suspect it's related to backend or maybe using old code to get from data

@davidemarcoli
Copy link
Collaborator Author

Also the Request button is still visible after the movie is requested and added. This doesn't happen in dev so it should be something in this PR.

This is fixed with the latest commit

@AyushSehrawat AyushSehrawat marked this pull request as ready for review October 18, 2024 16:33
Base automatically changed from dev to main October 19, 2024 08:16
filiptrplan and others added 5 commits October 26, 2024 13:36
* feat: add discord release yml

* chore(main): release 0.13.0 (#101)

* chore: removed a sponsor

* fix: update discord notification

* chore: fix notification breaking syntax

* fix: add new states to the frontend (#106)

* add new states to frontend

* lint the previous commit

* add new states to summary view

* lint the workflow at request of @AyushSehrawat

* fix: minor statistics page improvement

* chore(main): release 0.13.1 (#102)

* feat: enable adding torrent with magnet links

* feat: add folder information to manage sheet

* style: make the button text clearer

* refactor: cleanup debug code

* feat: magnet link add for shows

* feat: improve error messages

* feat: information about the selected episode/season

* refactor: remove debug property

* style: formatting

---------

Co-authored-by: Ayush Sehrawat <[email protected]>
Co-authored-by: Spoked <[email protected]>
@dreulavelle dreulavelle changed the title Add manual torrent adding feat: add manual torrent adding Oct 26, 2024
@dreulavelle dreulavelle merged commit 26ccefa into main Oct 26, 2024
4 checks passed
@AyushSehrawat AyushSehrawat deleted the feature/manual-torrent-adding branch October 28, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants