{"action":"created","issue":{"url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/issues/1520","repository_url":"https://api.github.com/repos/CERNDocumentServer/cds-videos","labels_url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/issues/1520/labels{/name}","comments_url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/issues/1520/comments","events_url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/issues/1520/events","html_url":"https://github.com/CERNDocumentServer/cds-videos/issues/1520","id":291702365,"number":1520,"title":"No slaves for old videos with a non-supported aspect ratio","user":{"login":"jbenito3","id":717470,"avatar_url":"https://avatars3.githubusercontent.com/u/717470?v=4","gravatar_id":"","url":"https://api.github.com/users/jbenito3","html_url":"https://github.com/jbenito3","followers_url":"https://api.github.com/users/jbenito3/followers","following_url":"https://api.github.com/users/jbenito3/following{/other_user}","gists_url":"https://api.github.com/users/jbenito3/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenito3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenito3/subscriptions","organizations_url":"https://api.github.com/users/jbenito3/orgs","repos_url":"https://api.github.com/users/jbenito3/repos","events_url":"https://api.github.com/users/jbenito3/events{/privacy}","received_events_url":"https://api.github.com/users/jbenito3/received_events","type":"User","site_admin":false},"labels":[{"id":97247539,"url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/labels/bug","name":"bug","color":"fc2929","default":true},{"id":819960261,"url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/labels/in%20progress","name":"in progress","color":"ededed","default":false},{"id":708379923,"url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/labels/major","name":"major","color":"d93f0e","default":false}],"state":"open","locked":false,"assignee":{"login":"ntarocco","id":2089455,"avatar_url":"https://avatars1.githubusercontent.com/u/2089455?v=4","gravatar_id":"","url":"https://api.github.com/users/ntarocco","html_url":"https://github.com/ntarocco","followers_url":"https://api.github.com/users/ntarocco/followers","following_url":"https://api.github.com/users/ntarocco/following{/other_user}","gists_url":"https://api.github.com/users/ntarocco/gists{/gist_id}","starred_url":"https://api.github.com/users/ntarocco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntarocco/subscriptions","organizations_url":"https://api.github.com/users/ntarocco/orgs","repos_url":"https://api.github.com/users/ntarocco/repos","events_url":"https://api.github.com/users/ntarocco/events{/privacy}","received_events_url":"https://api.github.com/users/ntarocco/received_events","type":"User","site_admin":false},"assignees":[{"login":"ntarocco","id":2089455,"avatar_url":"https://avatars1.githubusercontent.com/u/2089455?v=4","gravatar_id":"","url":"https://api.github.com/users/ntarocco","html_url":"https://github.com/ntarocco","followers_url":"https://api.github.com/users/ntarocco/followers","following_url":"https://api.github.com/users/ntarocco/following{/other_user}","gists_url":"https://api.github.com/users/ntarocco/gists{/gist_id}","starred_url":"https://api.github.com/users/ntarocco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntarocco/subscriptions","organizations_url":"https://api.github.com/users/ntarocco/orgs","repos_url":"https://api.github.com/users/ntarocco/repos","events_url":"https://api.github.com/users/ntarocco/events{/privacy}","received_events_url":"https://api.github.com/users/ntarocco/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/milestones/4","html_url":"https://github.com/CERNDocumentServer/cds-videos/milestone/4","labels_url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/milestones/4/labels","id":1543822,"number":4,"title":"v1.0","description":"Goal: Videos on CDSLabs for the public\r\n* Submission form\r\n* UI for home page, search page, channel page, video page\r\n* Migration ","creator":{"login":"egabancho","id":582735,"avatar_url":"https://avatars2.githubusercontent.com/u/582735?v=4","gravatar_id":"","url":"https://api.github.com/users/egabancho","html_url":"https://github.com/egabancho","followers_url":"https://api.github.com/users/egabancho/followers","following_url":"https://api.github.com/users/egabancho/following{/other_user}","gists_url":"https://api.github.com/users/egabancho/gists{/gist_id}","starred_url":"https://api.github.com/users/egabancho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egabancho/subscriptions","organizations_url":"https://api.github.com/users/egabancho/orgs","repos_url":"https://api.github.com/users/egabancho/repos","events_url":"https://api.github.com/users/egabancho/events{/privacy}","received_events_url":"https://api.github.com/users/egabancho/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":166,"state":"open","created_at":"2016-01-26T10:39:42Z","updated_at":"2018-03-01T15:20:54Z","due_on":"2017-08-02T07:00:00Z","closed_at":null},"comments":1,"created_at":"2018-01-25T20:19:21Z","updated_at":"2018-03-01T17:25:44Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Expected behavior\r\n\r\nOld videos with an aspect ratio different from the ones that are available should anyway have slaves (generated by Sorenson) with the closest available aspect ratio.\r\n\r\n### Actual behavior\r\n\r\nSuch old videos do not have any slave and in consequence, the video does not play. See for example https://videos.cern.ch/record/1951286\r\n\r\nThe code getting the closest aspect ratio to the ones available is here: https://github.com/CERNDocumentServer/cds-videos/blob/ea86a0d3b296088e3de21945091e4f6cf0cd58f9/cds/modules/migrator/records.py#L781\r\n\r\nBut it is useless because later, just before sending the request to Sorenson there is another check: \r\n\r\nhttps://github.com/CERNDocumentServer/cds-sorenson/blob/95375b39bf0bb73be27ce98db07fd7d6fde9d240/cds_sorenson/api.py#L205\r\n\r\n### Information about the Issue\r\n\r\nI suggest to move the code to get the closest aspect ratio from:\r\nhttps://github.com/CERNDocumentServer/cds-videos/blob/ea86a0d3b296088e3de21945091e4f6cf0cd58f9/cds/modules/migrator/records.py#L781\r\n\r\nto:\r\n\r\nhttps://github.com/CERNDocumentServer/cds-sorenson/blob/95375b39bf0bb73be27ce98db07fd7d6fde9d240/cds_sorenson/api.py#L205\r\n\r\n### Steps to reproduce the behavior\r\n\r\n  1. go to ipython\r\n  2. run:\r\n\r\n```python\r\nfrom cds.modules.deposit.api import Video\r\nfrom cds.modules.migrator.records import CDSRecordDumpLoader\r\ndeposit = Video.get_record(pid.object_uuid) # e.g. use a4ddec9a-10c0-4479-bf07-b0646b625edb instead of pid.object_uuid\r\nCDSRecordDumpLoader._create_missing_subformats(None, deposit)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/issues/comments/369665742","html_url":"https://github.com/CERNDocumentServer/cds-videos/issues/1520#issuecomment-369665742","issue_url":"https://api.github.com/repos/CERNDocumentServer/cds-videos/issues/1520","id":369665742,"user":{"login":"ntarocco","id":2089455,"avatar_url":"https://avatars1.githubusercontent.com/u/2089455?v=4","gravatar_id":"","url":"https://api.github.com/users/ntarocco","html_url":"https://github.com/ntarocco","followers_url":"https://api.github.com/users/ntarocco/followers","following_url":"https://api.github.com/users/ntarocco/following{/other_user}","gists_url":"https://api.github.com/users/ntarocco/gists{/gist_id}","starred_url":"https://api.github.com/users/ntarocco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntarocco/subscriptions","organizations_url":"https://api.github.com/users/ntarocco/orgs","repos_url":"https://api.github.com/users/ntarocco/repos","events_url":"https://api.github.com/users/ntarocco/events{/privacy}","received_events_url":"https://api.github.com/users/ntarocco/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T17:25:44Z","updated_at":"2018-03-01T17:25:44Z","author_association":"CONTRIBUTOR","body":"I think that https://github.com/CERNDocumentServer/cds-sorenson/pull/38 can be closed, fixed by https://github.com/CERNDocumentServer/cds-sorenson/pull/40"}}
{"actor":{"display_login":"ntarocco"}}